MstrPoptart (talk | contribs) (fixed some weirdness, removed unused stuff, added conditionals) |
MstrPoptart (talk | contribs) |
||
(38 intermediate revisions by 4 users not shown) | |||
Line 10: | Line 10: | ||
|Class=String |
|Class=String |
||
|Villager=String |
|Villager=String |
||
− | | |
+ | |Availability=Wikitext |
|StartDate=Date |
|StartDate=Date |
||
|EndDate=Date |
|EndDate=Date |
||
Line 38: | Line 38: | ||
|FurnReq7=String |
|FurnReq7=String |
||
|FurnReq8=String |
|FurnReq8=String |
||
+ | |NumFurnReq=Integer |
||
}}</noinclude><includeonly><!-- |
}}</noinclude><includeonly><!-- |
||
+ | |||
+ | // This determines if each on-point item is Furniture or Clothing |
||
+ | -->{{#vardefine:item1|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq1|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item2|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq2|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item3|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq3|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item4|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq4|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item5|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq5|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item6|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq6|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item7|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq7|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | -->{{#vardefine:item8|{{#if:{{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq8|}}}"|default=}}|Furniture|Clothing}}}}<!-- |
||
+ | |||
+ | // PerfScore calc variables |
||
+ | -->{{#vardefine:score1|78}}<!-- ★ |
||
+ | -->{{#vardefine:score2|78}}<!-- ★★ |
||
+ | -->{{#vardefine:score3|88}}<!-- ★★★ |
||
+ | -->{{#vardefine:score4|93}}<!-- ★★★★ |
||
+ | -->{{#vardefine:score5|103}}<!--★★★★★ |
||
+ | -->{{#vardefine:SpecReq| |
||
+ | {{#switch:{{#cargo_query:tables=Villagers|where=_pageName="{{{villager|}}}"|fields=Reward3|no html}} |
||
+ | |{{{furnReq1|}}}=15 |
||
+ | |{{{furnReq2|}}}=15 |
||
+ | |{{{furnReq3|}}}=15 |
||
+ | |{{{furnReq4|}}}=15 |
||
+ | |{{{furnReq5|}}}=15 |
||
+ | |{{{furnReq6|}}}=15 |
||
+ | |{{{furnReq7|}}}=15 |
||
+ | |{{{furnReq8|}}}=15 |
||
+ | |0}}}}<!-- |
||
+ | |||
+ | // PerfScore calc |
||
+ | -->{{#vardefine:perfScore|{{#expr:{{#var:SpecReq}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item1}}|where=_pageName="{{{furnReq1|}}}"|fields={{#ifeq:{{#var:item1}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item2}}|where=_pageName="{{{furnReq2|}}}"|fields={{#ifeq:{{#var:item2}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item3}}|where=_pageName="{{{furnReq3|}}}"|fields={{#ifeq:{{#var:item3}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item4}}|where=_pageName="{{{furnReq4|}}}"|fields={{#ifeq:{{#var:item4}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item5}}|where=_pageName="{{{furnReq5|}}}"|fields={{#ifeq:{{#var:item5}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item6}}|where=_pageName="{{{furnReq6|}}}"|fields={{#ifeq:{{#var:item6}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item7}}|where=_pageName="{{{furnReq7|}}}"|fields={{#ifeq:{{#var:item7}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | +{{#var:score{{#len:{{#cargo_query:tables={{#var:item8}}|where=_pageName="{{{furnReq8|}}}"|fields={{#ifeq:{{#var:item8}}|Furniture|CraftingDifficulty|DifficultyToObtain}}|no html|default=}}}}|0}} |
||
+ | }}}}<!-- |
||
// Storing the inputs into the declared Cargo table |
// Storing the inputs into the declared Cargo table |
||
Line 49: | Line 90: | ||
|Class={{{class|}}} |
|Class={{{class|}}} |
||
|Villager={{{villager|}}} |
|Villager={{{villager|}}} |
||
+ | |Availability={{#if: {{{endDate|}}} | {{#time: M. j, Y|{{{startDate|}}}}} - {{#time: M. j, Y|{{{endDate|}}}}} | Always }} |
||
− | |Availibility={{{availibility|}}} |
||
|StartDate={{{startDate|}}} |
|StartDate={{{startDate|}}} |
||
|EndDate={{{endDate|}}} |
|EndDate={{{endDate|}}} |
||
Line 60: | Line 101: | ||
|ClassCostAmt={{{classCostAmt|}}} |
|ClassCostAmt={{{classCostAmt|}}} |
||
|ClassCostType={{{classCostType|}}} |
|ClassCostType={{{classCostType|}}} |
||
⚫ | |||
− | |PerfScore={{{perfScore|}}} |
||
|FirstTimeRew={{{firstTimeRew|}}} |
|FirstTimeRew={{{firstTimeRew|}}} |
||
⚫ | |||
+ | |PerfScore={{#if:{{{perfScore|}}}|{{{perfScore|}}}|{{#var:perfScore}}}} |
||
|Medal1Req={{{medal1Req|}}} |
|Medal1Req={{{medal1Req|}}} |
||
⚫ | |||
|Medal2Req={{{medal2Req|}}} |
|Medal2Req={{{medal2Req|}}} |
||
⚫ | |||
|Medal3Req={{{medal3Req|}}} |
|Medal3Req={{{medal3Req|}}} |
||
⚫ | |||
⚫ | |||
|Medal3RewAmt={{{medal3RewAmt|}}} |
|Medal3RewAmt={{{medal3RewAmt|}}} |
||
|FurnReq1={{{furnReq1|}}} |
|FurnReq1={{{furnReq1|}}} |
||
Line 77: | Line 118: | ||
|FurnReq7={{{furnReq7|}}} |
|FurnReq7={{{furnReq7|}}} |
||
|FurnReq8={{{furnReq8|}}} |
|FurnReq8={{{furnReq8|}}} |
||
+ | |NumFurnReq={{#if:{{{furnReq3|}}}|{{#if:{{{furnReq4|}}}|{{#if:{{{furnReq5|}}}|{{#if:{{{furnReq6|}}}|{{#if:{{{furnReq7|}}}|{{#if:{{{furnReq8|}}}|8|7}}|6}}|5}}|4}}|3}}|2}} |
||
}}<!-- |
}}<!-- |
||
Line 87: | Line 129: | ||
|catalogCategory={{{catalogCategory|}}} |
|catalogCategory={{{catalogCategory|}}} |
||
|theme={{{theme|}}} |
|theme={{{theme|}}} |
||
− | | |
+ | |medal1Req={{{medal1Req|}}} |
+ | |availability={{#if:{{{endDate|}}}|{{#time: M. j, Y|{{{startDate|}}}}} - {{#time: M. j, Y|{{{endDate|}}}}}|Always}} |
||
− | |startDate={{{startDate|}}} |
||
− | |endDate={{{endDate|}}} |
||
}} |
}} |
||
=Description= |
=Description= |
||
− | {{PAGENAME}} is a [[Happy Homeroom]] class that features |
+ | {{PAGENAME}} is a [[Happy Homeroom]] class that features {{vt|{{{villager}}}}} and items mainly from the {{#if:{{{catalogCategory}}}|[[:Category: Catalog {{{catalogCategory}}}|{{{catalogCategory|}}}]]|?[[Category:Classes Missing Information]]}} category. {{#if:{{{event|}}}|<br><br>This course is a limited time event course linked to [[{{{event}}}]] and is only available during the event's duration.|}} |
=Medal Requirements= |
=Medal Requirements= |
||
Line 102: | Line 143: | ||
! Perfect Score |
! Perfect Score |
||
|- |
|- |
||
− | | style="padding:1em;" | {{#if: {{{medal1Req}}} | {{{medal1Req|}}}+ | ? [[Category:Classes Missing Information]] }} |
+ | | style="padding:1em;" | {{#if: {{{medal1Req}}} | {{{medal1Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points |
− | | style="padding:1em;" | {{#if: {{{medal2Req}}} | {{{medal2Req|}}}+ | ? [[Category:Classes Missing Information]] }} |
+ | | style="padding:1em;" | {{#if: {{{medal2Req}}} | {{{medal2Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points |
− | | style="padding:1em;" | {{#if: {{{medal3Req}}} | {{{medal3Req|}}}+ | ? [[Category:Classes Missing Information]] }} |
+ | | style="padding:1em;" | {{#if: {{{medal3Req}}} | {{{medal3Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points |
− | | style="padding:1em;" | {{# |
+ | | style="padding:1em;" | {{#if: {{{perfScore}}} | {{#ifeq:{{{perfScore|}}}|{{#var:perfScore}}|{{{perfScore|}}}|{{{perfScore}}}[[Category:PerfScore Mismatch]]}}|{{#var:perfScore}}}} Points |
|} |
|} |
||
Line 119: | Line 160: | ||
|} |
|} |
||
− | =On-Point |
+ | =On-Point Items= |
{| class="wikitable sortable" style="text-align:center;" |
{| class="wikitable sortable" style="text-align:center;" |
||
! Name |
! Name |
||
! Type |
! Type |
||
+ | ! data-sort-type="number" | Size |
||
+ | ! Rarity |
||
! Materials |
! Materials |
||
− | ! Bell Cost |
+ | ! data-sort-type="number" | Bell Cost |
− | ! Craft Time |
+ | ! data-sort-type="number" | Craft Time |
− | ! Obtained by |
||
! Unlocked by |
! Unlocked by |
||
|- |
|- |
||
− | {{#if: |
+ | {{#if:{{{furnReq1|}}}|{{On Point {{#var:item1}} Row|{{{furnReq1|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq2|}}}|{{On Point {{#var:item2}} Row|{{{furnReq2|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq3|}}}|{{On Point {{#var:item3}} Row|{{{furnReq3|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq4|}}}|{{On Point {{#var:item4}} Row|{{{furnReq4|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq5|}}}|{{On Point {{#var:item5}} Row|{{{furnReq5|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq6|}}}|{{On Point {{#var:item6}} Row|{{{furnReq6|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq7|}}}|{{On Point {{#var:item7}} Row|{{{furnReq7|}}}}}|}} |
− | {{#if: |
+ | {{#if:{{{furnReq8|}}}|{{On Point {{#var:item8}} Row|{{{furnReq8|}}}}}|}} |
|} |
|} |
||
− | =Room |
+ | =Room Requirements= |
− | {{# |
+ | {{#ifexist: File:{{{specImage}}}.png | [[File:{{{specImage}}}.png|300px|link=]]|No image yet [[Category:Classes Missing Images]]}} |
=Completed Room= |
=Completed Room= |
||
− | {{# |
+ | {{#ifexist: File:{{{compImage}}}.png | [[File:{{{compImage}}}.png|300px|link=]]|No image yet [[Category:Classes Missing Images]]}} |
[[Category:Happy Homeroom Class]] [[Category:{{{type|}}} Class]] |
[[Category:Happy Homeroom Class]] [[Category:{{{type|}}} Class]] |
Revision as of 06:50, 8 October 2020
Description
This is the template used for all class pages.
Usage
{{Class Page |image= |class= |villager= |type= <!-- Normal or Event --> |event= |startDate= |endDate= |reStartDate= |reEndDate= |difficulty= <!-- Easy Normal or Hard --> |catalogCategory= |theme= |classCost= <!-- Only needed if not HH Voucher --> |passRew= <!-- Only needed if not HH Material --> |medal1Req= |medal2Req= |medal3Req= |perfScore= |medal1RewAmt= |medal2RewAmt= |medal3RewAmt= |furnReq1= |furnReq2= |furnReq3= |furnReq4= |furnReq5= |furnReq6= |furnReq7= |furnReq8= |specImage= |compImage= }}
Parameters
image | Class thumbnail image provided by datamine. |
---|---|
class | Course and class number, e.g.: 2-1 |
villager | The name of the villager associated with this class. |
type | A class is ether Normal or Event. |
event | The name of the event the class is linked to if applicable. |
startDate | The first date the class is available. Format YYYY-MM-DD |
endDate | The last date the class is available. Format YYYY-MM-DD |
reStartDate | The first date the class is reissued. Format YYYY-MM-DD |
reEndDate | The last date the class is reissued. Format YYYY-MM-DD |
difficulty | Difficulty level of the class |
catalogCategory | The catalog category that the *majority* of items in the class come from. |
theme | The main theme of the class, e.g.: Cute, Cool, Historical, etc. |
classCost | The type of currency required to start the class. |
passRew | The reward for passing the class for the first time. |
medal1Req | Points required to clear the first medal |
medal2Req | Points required to clear the second medal |
medal3Req | Points required to clear the third medal |
perfScore | The total points achievable from using all correct "On-Point" items. |
medal1RewAmt | Bells received for clearing the first medal |
medal2RewAmt | Bells received for clearing the first medal |
medal3RewAmt | Bells received for clearing the third medal |
furnReq1 furnReq2 furnReq3 furnReq4 furnReq5 furnReq6 furnReq7 furnReq8 |
The "On-Point" items required to receive a perfect score. |
specImage | Image with the required item type icons depicted and their placement in the room. |
compImage | Completed class image with all the correct on-point items. |
The above documentation is transcluded from Template:Class Page/doc. (edit | history)
This template defines the table "Class". View table.