Animal Crossing: Pocket Camp Wiki
(fixed some weirdness, removed unused stuff, added conditionals)
(38 intermediate revisions by 4 users not shown)
Line 10: Line 10:
 
|Class=String
 
|Class=String
 
|Villager=String
 
|Villager=String
|Availibility=Wikitext
+
|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|}}}
|PassingGrade={{{passingGrade|}}}
 
|PerfScore={{{perfScore|}}}
 
 
|FirstTimeRew={{{firstTimeRew|}}}
 
|FirstTimeRew={{{firstTimeRew|}}}
 
|PassingGrade={{{medal1Req|}}}
  +
|PerfScore={{#if:{{{perfScore|}}}|{{{perfScore|}}}|{{#var:perfScore}}}}
 
|Medal1Req={{{medal1Req|}}}
 
|Medal1Req={{{medal1Req|}}}
|Medal1RewAmt={{{medal1RewAmt|}}}
 
 
|Medal2Req={{{medal2Req|}}}
 
|Medal2Req={{{medal2Req|}}}
|Medal2RewAmt={{{medal2RewAmt|}}}
 
 
|Medal3Req={{{medal3Req|}}}
 
|Medal3Req={{{medal3Req|}}}
 
|Medal1RewAmt={{{medal1RewAmt|}}}
 
|Medal2RewAmt={{{medal2RewAmt|}}}
 
|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|}}}
|passingGrade={{{passingGrade|}}}
+
|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 [[File:{{{villager}}} Icon.png|30px|link={{{villager}}}]] [[{{{villager}}}|{{{villager|}}}]] and items mainly from the [[:Category: Catalog {{{catalogCategory}}}|{{{catalogCategory|}}}]]. {{#if: {{{event|}}} | <br><br>This course is a limited time event course linked to [[{{{event}}}]] and is only available during the event's duration.| }}
+
{{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]] }} points
+
| style="padding:1em;" | {{#if: {{{medal1Req}}} | {{{medal1Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points
| style="padding:1em;" | {{#if: {{{medal2Req}}} | {{{medal2Req|}}}+ | ? [[Category:Classes Missing Information]] }} points
+
| style="padding:1em;" | {{#if: {{{medal2Req}}} | {{{medal2Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points
| style="padding:1em;" | {{#if: {{{medal3Req}}} | {{{medal3Req|}}}+ | ? [[Category:Classes Missing Information]] }} points
+
| style="padding:1em;" | {{#if: {{{medal3Req}}} | {{{medal3Req|}}}+ | ? [[Category:Classes Missing Information]] }} Points
| style="padding:1em;" | {{#ifeq: {{{PerfScore}}} | points | ? points [[Category:Classes Missing Information]] | {{{perfScore}}} }}
+
| style="padding:1em;" | {{#if: {{{perfScore}}} | {{#ifeq:{{{perfScore|}}}|{{#var:perfScore}}|{{{perfScore|}}}|{{{perfScore}}}[[Category:PerfScore Mismatch]]}}|{{#var:perfScore}}}} Points
 
|}
 
|}
   
Line 119: Line 160:
 
|}
 
|}
   
=On-Point Furniture=
+
=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: {{{furnReq1|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq1|}}}" OR Name="{{{furnReq1|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq1|}}} }} | {{On Point Clothing Row|{{{furnReq1|}}} }} }} | }}
+
{{#if:{{{furnReq1|}}}|{{On Point {{#var:item1}} Row|{{{furnReq1|}}}}}|}}
{{#if: {{{furnReq2|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq2|}}}" OR Name="{{{furnReq2|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq2|}}} }} | {{On Point Clothing Row|{{{furnReq2|}}} }} }} | }}
+
{{#if:{{{furnReq2|}}}|{{On Point {{#var:item2}} Row|{{{furnReq2|}}}}}|}}
{{#if: {{{furnReq3|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq3|}}}" OR Name="{{{furnReq3|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq3|}}} }} | {{On Point Clothing Row|{{{furnReq3|}}} }} }} | }}
+
{{#if:{{{furnReq3|}}}|{{On Point {{#var:item3}} Row|{{{furnReq3|}}}}}|}}
{{#if: {{{furnReq4|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq4|}}}" OR Name="{{{furnReq4|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq4|}}} }} | {{On Point Clothing Row|{{{furnReq4|}}} }} }} | }}
+
{{#if:{{{furnReq4|}}}|{{On Point {{#var:item4}} Row|{{{furnReq4|}}}}}|}}
{{#if: {{{furnReq5|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq5|}}}" OR Name="{{{furnReq5|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq5|}}} }} | {{On Point Clothing Row|{{{furnReq5|}}} }} }} | }}
+
{{#if:{{{furnReq5|}}}|{{On Point {{#var:item5}} Row|{{{furnReq5|}}}}}|}}
{{#if: {{{furnReq6|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq6|}}}" OR Name="{{{furnReq6|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq6|}}} }} | {{On Point Clothing Row|{{{furnReq6|}}} }} }} | }}
+
{{#if:{{{furnReq6|}}}|{{On Point {{#var:item6}} Row|{{{furnReq6|}}}}}|}}
{{#if: {{{furnReq7|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq7|}}}" OR Name="{{{furnReq7|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq7|}}} }} | {{On Point Clothing Row|{{{furnReq7|}}} }} }} | }}
+
{{#if:{{{furnReq7|}}}|{{On Point {{#var:item7}} Row|{{{furnReq7|}}}}}|}}
{{#if: {{{furnReq8|}}} | {{#if: {{#cargo_query:tables=Furniture|where=_pageName="{{{furnReq8|}}}" OR Name="{{{furnReq8|}}}"|field=_pageName|default=|no html}} | {{On Point Furniture Row|{{{furnReq8|}}} }} | {{On Point Clothing Row|{{{furnReq8|}}} }} }} | }}
+
{{#if:{{{furnReq8|}}}|{{On Point {{#var:item8}} Row|{{{furnReq8|}}}}}|}}
 
|}
 
|}
   
=Room Furniture Requirements=
+
=Room Requirements=
{{#if:{{{specImage}}} | [[File:{{{specImage}}}.png|300px|link=]]|No image yet [[Category:Classes Missing Information]]}}
+
{{#ifexist: File:{{{specImage}}}.png | [[File:{{{specImage}}}.png|300px|link=]]|No image yet [[Category:Classes Missing Images]]}}
   
 
=Completed Room=
 
=Completed Room=
{{#if:{{{compImage}}} | [[File:{{{compImage}}}.png|300px|link=]]|No image yet [[Category:Classes Missing Information]]}}
+
{{#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

Template-info Documentation

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.

This template defines the table "Class". View table.