Difference between revisions of "Template:PGTools"

From Nookipedia, the Animal Crossing wiki
m
(CF identifier.)
 
(41 intermediate revisions by 7 users not shown)
Line 23: Line 23:
 
|availability_other = List (,) of String
 
|availability_other = List (,) of String
 
|availability_other_note = String
 
|availability_other_note = String
 +
|availability_dnm = List (,) of String
 +
|availability_dnm_note = String
 +
|availability_plus = List (,) of String
 +
|availability_plus_note = String
 +
|availability_pg = List (,) of String
 +
|availability_pg_note = String
 +
|availability_e_plus = List (,) of String
 +
|availability_e_plus_note = String
 
|universal_code = String
 
|universal_code = String
 
|universal_code_plus = String
 
|universal_code_plus = String
 
|notes = String
 
|notes = String
}}</noinclude><includeonly>{{DISPLAYTITLE:{{#replace:{{SUBPAGENAME}}|Animal Crossing|''Animal Crossing''}}}}{{#ifeq:{{NAMESPACE}}|Item|<!--Attach to other tables -->{{PGLang/CargoAttach}}{{#cargo_store:
+
}}</noinclude><includeonly>{{DISPLAYTITLE:{{#invoke:Items|italicizeGameInTitle|{{SUBPAGENAME}}}}}}{{#ifeq:{{NAMESPACE}}|Item|<!--Attach to other tables -->{{PGLang/CargoAttach}}{{PGIdentifier/CargoAttach}}{{#cargo_store:
 
_table=pg_tool
 
_table=pg_tool
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(Animal Crossing)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(Animal Crossing)|}}}}}}}}
+
|en_name = {{{name|}}}
 
|in_dnm = {{#if:{{{num-dnm|}}}|Yes|{{{in-dnm|No}}}}}
 
|in_dnm = {{#if:{{{num-dnm|}}}|Yes|{{{in-dnm|No}}}}}
 
|in_plus = {{#if:{{{num-plus|}}}|Yes|{{{in-plus|No}}}}}
 
|in_plus = {{#if:{{{num-plus|}}}|Yes|{{{in-plus|No}}}}}
Line 39: Line 47:
 
|catalog_num_pg = {{{num-pg|}}}
 
|catalog_num_pg = {{{num-pg|}}}
 
|catalog_num_e_plus = {{{num-e-plus|}}}
 
|catalog_num_e_plus = {{{num-e-plus|}}}
|catalog_num_e_plus = {{{num-ique|}}}
+
|catalog_num_ique = {{{num-ique|}}}
 
|type = {{{type|}}}
 
|type = {{{type|}}}
 
|image = {{{image|}}}
 
|image = {{{image|}}}
Line 50: Line 58:
 
|availability_other = Nook, Dump, Booker (Common), Birthday, Wisp, One Day Sale
 
|availability_other = Nook, Dump, Booker (Common), Birthday, Wisp, One Day Sale
 
|availability_other_note = {{{availability-other-note|}}}
 
|availability_other_note = {{{availability-other-note|}}}
 +
|availability_dnm = {{{availability-dnm|}}}
 +
|availability_dnm_note = String
 +
|availability_plus = {{{availability-plus|}}}
 +
|availability_plus_note = String
 +
|availability_pg = {{{availability-pg|}}}
 +
|availability_pg_note = String
 +
|availability_e_plus = {{{availability-e-plus|}}}
 +
|availability_e_plus_note = String
 
|universal_code = {{{universal-code|}}}
 
|universal_code = {{{universal-code|}}}
 
|universal_code_plus = {{{universal-code-plus|}}}
 
|universal_code_plus = {{{universal-code-plus|}}}
Line 63: Line 79:
 
|ja_name = {{{ja-name|}}}
 
|ja_name = {{{ja-name|}}}
 
|zh_name = {{#if:{{{num-ique|}}}|{{{zh-name|}}}|}}
 
|zh_name = {{#if:{{{num-ique|}}}|{{{zh-name|}}}|}}
 +
}}<!-- Cargo Store for identifiers -->{{#cargo_store:
 +
_table=pg_identifier
 +
|identifier = {{{identifier|}}}
 +
|en_name = {{{name|}}}
 +
|category = {{#switch:{{{type|}}}|Umbrella = Umbrella|Fan|Pinwheel|Party popper=Handheld item|#default=Tool}}
 
}}}}</includeonly>{{Infobox 2.0
 
}}}}</includeonly>{{Infobox 2.0
 
  | primarycolor    = 39 100
 
  | primarycolor    = 39 100
 
  | secondarycolor  = 42 73
 
  | secondarycolor  = 42 73
  | title            = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(Animal Crossing)|}}}}}}}}
+
  | title            = {{{title|{{#invoke:SentenceCase|main|{{{name|}}}}}}}}
| lefticon        = {{#if:{{{num-pg|}}}|'''<nowiki>#</nowiki>{{{num-pg|}}}'''|&nbsp;}}
+
| lefticon        = [[File:{{#switch: {{{type|}}}
| righticon        = &nbsp;
+
| Umbrella = Umbrella PG Inv Icon.png{{!}}Type of umbrella
 +
| Balloon = Balloon PG Inv Icon.png{{!}}Type of balloon
 +
| Fan = Fan PG Inv Icon.png{{!}}Type of fan
 +
| Pinwheel = Pinwheel PG Inv Icon.png{{!}}Type of pinwheel
 +
| Party popper = Cracker DnMe+ Inv Icon.png{{!}}Type of handheld item
 +
| Axe = {{{inv-icon|}}}{{!}}Type of tool
 +
| Fishing rod = {{{inv-icon|}}}{{!}}Type of tool
 +
| Net = {{{inv-icon|}}}{{!}}Type of tool
 +
| Shovel = {{{inv-icon|}}}{{!}}Type of tool}}|sub|class=sprite|link=]]
 +
| righticon        = {{#if:{{{num-e-plus|}}}|'''<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num-e-plus|}}}}}'''|&nbsp;}}{{#if:{{{num-dnm|}}}{{{num-plus|}}}{{{num-e-plus|}}}{{{num-ique|}}}|{{Note|{{#if:{{{num-pg|}}}|{{PG}} catalog number<nowiki>;</nowiki>&#32;}}{{#if:{{{num-dnm|}}}|<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num-dnm|}}}}} in {{DnM}}{{#if:{{{num-plus|}}}{{{num-e-plus|}}}{{{num-ique|}}}|<nowiki>;</nowiki>&#32;}}}}{{#if:{{{num-plus|}}}|<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num-plus|}}}}} in {{DnM+}}{{#if:{{{num-e-plus|}}}{{{num-ique|}}}|<nowiki>;</nowiki>&#32;}}}}{{#if:{{{num-e-plus|}}}|<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num-e-plus|}}}}} in {{DnMe+}}{{#if:{{{num-ique|}}}|<nowiki>;</nowiki>&#32;}}}}{{#if:{{{num-ique|}}}|<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num-ique|}}}}} in {{iQue}}}}}}}}
  
  | image            = [[File:{{{image|}}}|200px|{{{name|}}}]]
+
  | image            = [[File:{{{image|}}}|200px|{{#invoke:SentenceCase|main|{{{name|}}}}}]]
 
  | caption          =  
 
  | caption          =  
  
Line 77: Line 107:
 
  | leftdata        = {{#if:{{{buy|}}}|{{Currency|Bells|{{{buy|}}}|short=yes}}|Not for sale}}
 
  | leftdata        = {{#if:{{{buy|}}}|{{Currency|Bells|{{{buy|}}}|short=yes}}|Not for sale}}
 
  | rightdata        = {{#if:{{{sell|}}}|{{Currency|Bells|{{{sell|}}}}}|Cannot be sold}}
 
  | rightdata        = {{#if:{{{sell|}}}|{{Currency|Bells|{{{sell|}}}}}|Cannot be sold}}
 +
| label            = Obtain via
 +
| data            = {{#if:{{{availability1|}}}|<div style="width:100%; overflow-x: hidden; overflow-y: auto; max-height: 200px;">{{Availability|{{{availability1|}}}|note={{{availability1-note|}}}}}{{#if:{{{availability2|}}}|{{Availability|{{{availability2|}}}|note={{{availability2-note|}}}}}}}{{#if:{{{availability3|}}}|{{Availability|{{{availability3|}}}|note={{{availability3-note|}}}}}}}{{#if: {{{availability-other|}}} | {{#invoke: Items | outputAvailabilitiesFromList | {{{availability-other|}}} }} | }}</div>}}
 +
| label2 =
 +
{{#if: {{{availability-dnm|}}}
 +
    |{{#if: {{{num-ique|}}}
 +
        |Obtain via:<br>({{DnM|shortest}}/{{iQue|shortest}})
 +
        |Obtain via:<br>({{DnM|shortest}})
 +
    }}
 +
    |{{#if: {{{num-ique|}}}
 +
        |Obtain via:<br>({{iQue|shortest}})
 +
    }}
 +
}}
 +
 +
| data2 =
 +
{{#if: {{{availability-dnm|}}}
 +
    | {{#invoke: Items| outputAvailabilitiesFromList | {{{availability-dnm|}}}}} {{#if: {{{availability-dnm-other|}}} |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-dnm-other|}}}}}|}}
 +
    | {{#if: {{{availability-ique|}}}
 +
        | {{#invoke: Items| outputAvailabilitiesFromList | {{{availability-ique|}}}}} {{#if: {{{availability-ique-other|}}} |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-ique-other|}}}}}|}}
 +
    }}
 +
}}
 +
 +
  | label3 =
 +
{{#if: {{{availability-plus|}}}
 +
        | {{#switch: {{{availability-plus}}}{{{availability-plus-other|}}}
 +
            | {{{availability-pg}}}{{{availability-pg-other|}}} =
 +
            {{#ifeq: {{{availability-plus}}}{{{availability-plus-other|}}} | {{{availability-e-plus}}}{{{availability-e-plus-other|}}}
 +
                | Obtain via:<br>({{DnM+|shortest}}/{{PG|shortest}}/{{nowrap|{{DnMe+|shortest}}}})
 +
                | Obtain via:<br>({{DnM+|shortest}}/{{PG|shortest}})
 +
            }}
 +
            | {{{availability-e-plus}}}{{{availability-e-plus-other|}}} = Obtain via:<br>({{DnM+|shortest}}/{{DnMe+|shortest}})
 +
            | Obtain via:<br>({{DnM+|shortest}})
 +
        }}
 +
}}
 +
 +
| data3 =
 +
{{#if: {{{availability-plus|}}}
 +
    |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-plus|}}}}}{{#if: {{{availability-plus-other|}}} |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-plus-other|}}}}}|}}
 +
}}
 +
 +
 +
| label4 =
 +
{{#if: {{{availability-pg|}}}
 +
    | {{#switch: {{{availability-pg}}}{{{availability-pg-other|}}}
 +
        | {{{availability-plus}}}{{{availability-plus-other|}}} =
 +
        | {{{availability-e-plus}}}{{{availability-e=plus-other|}}} = Obtain via:<br>({{PG|shortest}}/{{DnMe+|shortest}})
 +
        | Obtain via:<br>({{PG|shortest}})
 +
    }}
 +
}}
 +
 +
| data4  =
 +
{{#if: {{{availability-pg|}}}
 +
    |{{#switch: {{{availability-pg}}}{{{availability-pg-other|}}}
 +
        | {{{availability-plus}}}{{{availability-plus-other|}}} =
 +
        |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-pg|}}}}}{{#if: {{{availability-pg-other|}}} |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-pg-other|}}}}}|}}}}
 +
}}
 +
  
| label            = Obtain via
+
| label5 =  
| data            = {{Availability|{{{availability1|}}}|note={{{availability1-note|}}}}}{{#if:{{{availability2|}}}|{{Availability|{{{availability2|}}}|note={{{availability2-note|}}}}}}}{{#if:{{{availability3|}}}|{{Availability|{{{availability3|}}}|note={{{availability3-note|}}}}}}} {{#if: {{{availability-other|}}} | <div class="mw-collapsible mw-collapsed" style="width:100%">
+
{{#if: {{{availability-e-plus|}}}
Also available from...
+
    | {{#switch: {{{availability-e-plus}}}{{{availability-e-plus-other|}}}
<div class="mw-collapsible-content">
+
        | {{{availability-plus}}}{{{availability-plus-other|}}} =
{{#invoke: Items | outputAvailabilitiesFromList | {{{availability-other|}}} }}
+
        | {{{availability-pg}}}{{{availability-pg-other|}}} =
</div>
+
        | Obtain via:<br>({{DnMe+|shortest}})
</div> | }}
+
    }}
 +
}}
 +
 
 +
| data5  =
 +
{{#if: {{{availability-e-plus|}}}
 +
    |{{#switch: {{{availability-e-plus}}}{{{availability-e-plus-other|}}}
 +
    | {{{availability-plus}}}{{{availability-plus-other|}}} =
 +
        | {{{availability-pg}}}{{{availability-pg-other|}}} =
 +
    | {{#invoke: Items| outputAvailabilitiesFromList | {{{availability-e-plus|}}}}}{{#if: {{{availability-e-plus-other|}}} |{{#invoke: Items| outputAvailabilitiesFromList | {{{availability-e-plus-other|}}}}}|}}}}
 +
}}
  
  | label2           = Type
+
  | label6           = Type
  | data2           = [[{{{type|}}}]]
+
  | data6           = [[{{{type|}}}]]
  
  | label4           = [[Happy Home Academy|HRA]] points
+
  | label7           = [[Happy Home Academy|HRA]] points
  | data4           = {{{hra-base|}}}
+
  | data7           = {{{hra-base|}}}
  
  | label5           = {{#if: {{{color|}}} | [[Fêng shui|Feng shui]]}}
+
  | label8           = {{#ifeq: {{{type|}}} | Balloon | [[Fêng shui|Feng shui]]|}}
  | data5           = {{#if: {{{color|}}} | [[Furniture/Animal Crossing/{{{color|}}}|{{color|{{{color|}}}}}]]}}
+
  | data8           = {{#ifeq:{{{type|}}} | Balloon | {{#if: {{{color|}}} | [[Furniture/Animal Crossing/{{{color|}}}|{{color|{{{color|}}}}}]] | None }} | }}
  
 
  | widebottomlabel  = Appearances
 
  | widebottomlabel  = Appearances
  | widebottomdata  = {{#if: {{{num-dnm|}}} | {{Infobox Appearance|game={{DnM|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnM|shortest}}|appears=no}} }}{{#if: {{{num-plus|}}} | {{Infobox Appearance|game={{DnM+|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnM+|shortest}}|appears=no}} }}{{#if: {{{num-pg|}}} | {{Infobox Appearance|game={{PG|shortest}}|appears=yes}}| {{Infobox Appearance|game={{PG|shortest}}|appears=no}} }}{{#if: {{{num-e-plus|}}} | {{Infobox Appearance|game={{DnMe+|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnMe+|shortest}}|appears=no}} }}
+
  | widebottomdata  = {{#if: {{{num-dnm|}}} | {{Infobox Appearance|game={{DnM|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnM|shortest}}|appears=no}} }}{{#if: {{{num-plus|}}} | {{Infobox Appearance|game={{DnM+|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnM+|shortest}}|appears=no}} }}{{#if: {{{num-pg|}}} | {{Infobox Appearance|game={{PG|shortest}}|appears=yes}}| {{Infobox Appearance|game={{PG|shortest}}|appears=no}} }}{{#if: {{{num-e-plus|}}} | {{Infobox Appearance|game={{DnMe+|shortest}}|appears=yes}}| {{Infobox Appearance|game={{DnMe+|shortest}}|appears=no}} }}{{#if: {{{num-ique|}}} | {{Infobox Appearance|game={{iQue|shortest}}|appears=yes}}| {{Infobox Appearance|game={{iQue|shortest}}|appears=no}} }}
  
 
  | widebottomlabel2 = Notes
 
  | widebottomlabel2 = Notes
Line 102: Line 197:
  
 
  | widebottomlabel3 = In other games
 
  | widebottomlabel3 = In other games
  | widebottomdata3  = {{#cargo_query:tables=nh_clothing|fields=CONCAT("[[Item:", nh_clothing.en_name, " (New Horizons)|''New Horizons'' (", nh_clothing.en_name, ")]]<br />")|where=nh_clothing.identifier="{{{identifier|}}}"|default=}}
+
  | widebottomdata3  = {{#cargo_query:tables=ww_identifier|fields=CONCAT("[[Item:", ww_identifier.en_name, " (Wild World)|''Wild World'' (", ww_identifier.en_name, ")]]<br />")|where=ww_identifier.identifier="{{{identifier|}}}"|delimiter=|default=}}{{#cargo_query:tables=cf_identifier|fields=CONCAT("[[Item:", cf_identifier.en_name, " (City Folk)|''City Folk'' (", cf_identifier.en_name, ")]]<br />")|where=cf_identifier.identifier="{{{identifier|}}}"|delimiter=|default=}}{{#cargo_query:tables=nl_identifier|fields=CONCAT("[[Item:", nl_identifier.en_name, " (New Leaf)|''New Leaf'' (", nl_identifier.en_name, ")]]<br />")|where=nl_identifier.identifier="{{{identifier|}}}"|delimiter=|default=}}{{#cargo_query:tables=nh_identifier|fields=CONCAT("[[Item:", nh_identifier.en_name, " (New Horizons)|''New Horizons'' (", nh_identifier.en_name, ")]]<br />")|where=nh_identifier.identifier="{{{identifier|}}}"|delimiter=|default=}}
  
  | languages        = Name
+
  | languages        = Names
  | ja-name          = {{{ja-name|}}}
+
  | ja-name          = {{#if:{{{ja-name|}}}|{{{ja-name|}}}|N/A}}
  | zh-name          = {{#if:{{{num-dnm|}}}|{{{zh-name|}}}|N/A}}
+
  | zh-name          = {{#if:{{{zh-name|}}}|{{{zh-name|}}}|N/A}}
  | fr-name          = {{{fr-name|}}}
+
  | fr-name          = {{#if:{{{fr-name|}}}|{{{fr-name|}}}|N/A}}
  | es-name          = {{{es-name|}}}
+
  | es-name          = {{#if:{{{es-name|}}}|{{{es-name|}}}|N/A}}
  | it-name          = {{{it-name|}}}
+
  | it-name          = {{#if:{{{it-name|}}}|{{{it-name|}}}|N/A}}
  | de-name          = {{{de-name|}}}
+
  | de-name          = {{#if:{{{de-name|}}}|{{{de-name|}}}|N/A}}
 
  | zht-name        = N/A
 
  | zht-name        = N/A
 
  | ko-name          = N/A
 
  | ko-name          = N/A
Line 117: Line 212:
 
  | nl-name          = N/A
 
  | nl-name          = N/A
 
  | ru-name          = N/A
 
  | ru-name          = N/A
}}<includeonly>{{#if:{{{num-dnm|}}}|[[Category:Doubutsu no Mori umbrellas]]}}{{#if:{{{num-pg|}}}|[[Category:Animal Crossing umbrellas]]}}{{#if:{{{num-e-plus|}}}|[[Category:Doubutsu no Mori e+ umbrellas]]}}{{#if:{{{num-ique|}}}|[[Category:Doubutsu no Mori umbrellas]]}}</includeonly><noinclude>{{clear}}
+
}}<includeonly>{{PGCat|type={{{type|}}}}}{{#if:{{{num-dnm|}}}|{{PGCat|dnm|type={{{type|}}}}}}}{{#if:{{{num-plus|}}}|{{PGCat|plus|type={{{type|}}}}}}}{{#if:{{{num-pg|}}}|{{PGCat|pg|type={{{type|}}}}}}}{{#if:{{{num-e-plus|}}}|{{PGCat|e-plus|type={{{type|}}}}}}}{{#if:{{{num-ique|}}}|{{PGCat|ique|type={{{type|}}}}}}}{{#if: {{{availability1|}}} | [[Category:Acquired from {{{availability1|}}}]]}}{{#if: {{{availability2|}}} | [[Category:Acquired from {{{availability2|}}}]]}}{{#if: {{{availability3|}}} | [[Category:Acquired from {{{availability3|}}}]]}}{{#if: {{{availability-other|}}} | {{#invoke: Items| outputAvailabilitiesCategoriesFromList | {{{availability-other|}}}}}}}</includeonly><noinclude>{{clear}}
 
== Notes ==
 
== Notes ==
 
{{Note list}}
 
{{Note list}}

Latest revision as of 22:44, April 19, 2024

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

[[File:|sub|class=sprite|link=]]  
[[File:|200px|]]
Buy price Sell price
Not for sale Cannot be sold
Type [[]]
Appearances
Names in other languages
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A
 N/A

Notes



Template documentation (view)


More Cargo templates

Parameters

Names

identifier
An identifier that connects this item to items in other iterations of Animal Crossing. If an item changes name from game to game, the identifier remains constant. The identifier should be the name of the item as it appears in the earliest Animal Crossing game. For items which can only be obtained as a customization option in a later game (e.g. the Black Pawn & White Pawn become customization options for the Pawn in ACNL), the later name is used instead.
Default value: Item name in page title.
name
The English name of the item.
Default value: Item name in page title.
ja-name
The Japanese name of the item.
fr-name
The French name of the item.
de-name
The German name of the item.
it-name
The Italian name of the item.
zh-name
The Simplified Chinese name of the item.
es-name
The Spanish name of the item.

Metadata

hra-base
The base Happy Room Academy score of the item.
color
The fêng shui color of the item, if applicable. (Only will appear for balloons.)
type
The type of handheld item/tool the item is. This will determine the category.
num-dnm
The item's number in the catalog in Doubutsu no Mori, if applicable.
num-plus
The item's number in the catalog in Doubutsu no Mori+, if applicable.
num-pg
The item's number in the catalog in Animal Crossing, if applicable.
num-e-plus
The item's number in the catalog in Doubutsu no Mori e+, if applicable.
num-ique
The item's number in the catalog in Dòngwù Sēnlín, if applicable.

Acquiring

availability1, availability2
How the item can be acquired. Value should match one of the options in Template:Availability.
availability1_note, availability2_note
Specification of how the item can be acquired; see the note parameter in Template:Availability.
buy
Cost to purchase in Bells.
sell
Sell price in Bells.

Other

universal-code
The item's universal code in Animal Crossing. Does not currently appear on the page.