Difference between revisions of "Template:NHPhoto"

From Nookipedia, the Animal Crossing wiki
(adding height to posters/photos using switch statements)
(Show other games.)
 
(13 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
|identifier = String
 
|identifier = String
 
|en_name = String
 
|en_name = String
 +
|catalog_num = Integer
 
|name_sort = String
 
|name_sort = String
 
|category = String
 
|category = String
Line 20: Line 21:
 
|custom_kits = Integer
 
|custom_kits = Integer
 
|custom_body_part = String
 
|custom_body_part = String
 +
|cyrus_price = Integer
 
|grid_size = String
 
|grid_size = String
 
|length = Float
 
|length = Float
Line 28: Line 30:
 
|unlocked = Boolean
 
|unlocked = Boolean
 
|notes = String
 
|notes = String
}}</noinclude><includeonly>{{DISPLAYTITLE:{{#replace:{{SUBPAGENAME}}|New Horizons|''New Horizons''}}}}{{#ifeq:{{NAMESPACE}}|Item|<!--Attach to other tables -->{{NHLang/CargoAttach}}{{NHIdentifer/CargoAttach}}{{#if: {{{mat1|}}} | {{NHRecipe/CargoAttach}}}}{{NHPhotoVariations/CargoAttach}}<!-- Cargo Store for furniture data (not including images or variations) -->{{#cargo_store:
+
}}</noinclude><includeonly>{{DISPLAYTITLE:{{#replace:{{SUBPAGENAME}}|New Horizons|''New Horizons''}}}}{{#ifeq:{{NAMESPACE}}|Item|<!--Attach to other tables -->{{NHLang/CargoAttach}}{{NHIdentifier/CargoAttach}}{{#if: {{{mat1|}}} | {{NHRecipe/CargoAttach}}}}{{NHPhotoVariations/CargoAttach}}<!-- Cargo Store for furniture data (not including images or variations) -->{{#cargo_store:
 
_table=nh_photo
 
_table=nh_photo
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}
+
|en_name = {{{name|}}}
 +
|catalog_num = {{{num|}}}
 
|name_sort = {{{name-sort|{{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}}}}
 
|name_sort = {{{name-sort|{{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}}}}
 
|category = {{{category|}}}
 
|category = {{{category|}}}
Line 46: Line 49:
 
|availability2 = {{{availability2|}}}
 
|availability2 = {{{availability2|}}}
 
|availability2_note = {{{availability2-note|}}}
 
|availability2_note = {{{availability2-note|}}}
|customizable = {{{customizable|}}}
+
|customizable = {{#if: {{{customizable|}}} | Yes | No }}
 
|custom_kits = {{{custom-kits|}}}
 
|custom_kits = {{{custom-kits|}}}
 
|custom_body_part = {{{custom-body-part|}}}
 
|custom_body_part = {{{custom-body-part|}}}
 +
|cyrus_price = {{{cyrus-price|}}}
 
|grid_size = {{{grid-size|}}}
 
|grid_size = {{{grid-size|}}}
 
|length = {{{length|}}}
 
|length = {{{length|}}}
Line 59: Line 63:
 
}}<!-- Cargo Store for different language names -->{{#cargo_store:
 
}}<!-- Cargo Store for different language names -->{{#cargo_store:
 
_table=nh_language_name
 
_table=nh_language_name
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}
+
|en_name = {{{name|}}}
 +
|type = {{#switch: {{{category|}}}|Photos = Photo|Posters = Poster}}
 
|engb_name = {{{engb-name|}}}
 
|engb_name = {{{engb-name|}}}
 
|de_name = {{{de-name|}}}
 
|de_name = {{{de-name|}}}
Line 76: Line 81:
 
}}<!-- Cargo Store for identifiers -->{{#cargo_store:
 
}}<!-- Cargo Store for identifiers -->{{#cargo_store:
 
_table=nh_identifier
 
_table=nh_identifier
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}
+
|en_name = {{{name|}}}
|category = {{{category|}}}
+
|category = {{#switch: {{{category|}}}|Photos = Photo|Posters = Poster}}
}}{{#if: {{{variation1|}}} | {{#forargs: variation | key | value | <!-- Cargo Store for variations --> {{#cargo_store:
+
}}{{#if: {{{variation1|}}} | {{#forargs: variation | key | value | <!-- Cargo Store for variations --> {{#seo:|image={{filepath:{{{image|{{#invoke:TitleCase|main|{{{name|}}}}} ({{#invoke:TitleCase|main|{{{variation1|}}}}}) NH Icon.png}}}}}}}{{#cargo_store:
 
_table=nh_photo_variation
 
_table=nh_photo_variation
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}
+
|en_name = {{{name|}}}
|image = {{{image|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}}) NH Icon.png}}}
+
|image = {{{image|{{#invoke:TitleCase|main|{{{name|}}}}} ({{#invoke:TitleCase|main|{{{variation{{#var: key }}|}}}}}) NH Icon.png}}}
|image_url = {{filepath:{{{image|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}}) NH Icon.png}}}}}
+
|image_url = {{filepath:{{{image|{{#invoke:TitleCase|main|{{{name|}}}}} ({{#invoke:TitleCase|main|{{{variation{{#var: key }}|}}}}}) NH Icon.png}}}}}
 
|variation = {{{variation{{#var: key }}|}}}
 
|variation = {{{variation{{#var: key }}|}}}
 
|variation_number = {{#var: key }}
 
|variation_number = {{#var: key }}
 
|color1 = {{{var{{#var: key }}-color1|}}}
 
|color1 = {{{var{{#var: key }}-color1|}}}
 
|color2 = {{{var{{#var: key }}-color2|}}}
 
|color2 = {{{var{{#var: key }}-color2|}}}
}} }} | <!-- Cargo Store for sole item (no variations) -->{{#cargo_store:
+
}} }} | <!-- Cargo Store for sole item (no variations) -->{{#seo:|image={{filepath:{{{image|{{#invoke:TitleCase|main|{{{name|}}}}} NH Icon.png}}}}}}}{{#cargo_store:
 
_table=nh_photo_variation
 
_table=nh_photo_variation
|identifier = {{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
|identifier = {{{identifier|}}}
|en_name = {{{name|{{{identifier|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}}}}
+
|en_name = {{{name|}}}
|image = {{{image|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} NH Icon.png}}}
+
|image = {{{image|{{#invoke:TitleCase|main|{{{name|}}}}} NH Icon.png}}}
|image_url = {{filepath:{{{image|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} NH Icon.png}}}}}
+
|image_url = {{filepath:{{{image|{{#invoke:TitleCase|main|{{{name|}}}}} NH Icon.png}}}}}
 
|variation =
 
|variation =
 
|variation_number = 1
 
|variation_number = 1
Line 102: Line 107:
 
  | primarycolor    = 39 100
 
  | primarycolor    = 39 100
 
  | secondarycolor  = 42 73
 
  | secondarycolor  = 42 73
  | title            = {{{name|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}}}}
+
  | title            = {{{title|{{#invoke:SentenceCase|main|{{{name|}}}}}}}}
| subtitleabove    = {{#if:{{{series|}}}{{{set|}}}{{{function1|}}}|<span style{{=}}"display:inline-block;">|}}{{#if:{{{series|}}}|[[{{{series-link|{{{series|}}}}}} Series|{{{series|}}} Series]]|}}{{#if:{{{set|}}}|{{#if:{{{series|}}}|,&nbsp;|}}[[{{{set-link|{{{set|}}}}}} Set|{{{set|}}} Set]]|}}{{#if:{{{function1|}}}|{{#if:{{{series|}}}{{{set|}}}|&nbsp;&nbsp;{{Colorshow|dcab00|'''{{!}}'''}}&nbsp;&nbsp;}}{{{function1|}}}{{#if:{{{function2|}}}|,&nbsp;{{{function2|}}}}}{{#if:{{{function3|}}}|,&nbsp;{{{function3|}}}}}}}{{#if:{{{series|}}}{{{set|}}}{{{function1|}}}|</span>|}}
+
| lefticon        = [[File:Furniture NH Inv Icon.png|sub|32px|link=Photo]]
  | lefticon        = [[File:{{#switch: {{{category|}}}
+
  | righticon        = [[File:{{#switch: {{{category|}}}
 
  | Photos = Residents NH Category Icon.png{{!}}Type of photo
 
  | Photos = Residents NH Category Icon.png{{!}}Type of photo
 
  | Posters = Poster NH Category Icon.png{{!}}Type of poster
 
  | Posters = Poster NH Category Icon.png{{!}}Type of poster
  | All NH Category Icon.png{{!}}Type of item}}|sub|20px|link=]]
+
  | All NH Category Icon.png{{!}}Type of item}}|sub|20px|link=]]{{#if:{{{num|}}}|&nbsp;'''<nowiki>#</nowiki>{{#invoke:formatnum|main|lang=en|{{{num|}}}}}'''}}
| righticon      = &nbsp;
 
  
  | image            = {{#ifexist:File:{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} {{#if:{{{variation1|}}}|({{{variation1|}}}{{#if:{{{pattern1|}}}| &nbsp;- {{{pattern1|}}}}})}}{{#if:{{{pattern1|}}}|{{#if:{{{variation1|}}}||({{{pattern1|}}})}}}} NH Icon.png|[[File:{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} {{#if:{{{variation1|}}}|({{{variation1|}}}{{#if:{{{pattern1|}}}| &nbsp;- {{{pattern1|}}}}})}}{{#if:{{{pattern1|}}}|{{#if:{{{variation1|}}}||({{{pattern1|}}})}}}} NH Icon.png|128px|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}]]|[[File:Nia.png|128px|No image available|link=]]}}
+
  | image            = {{#ifexist:File:{{#invoke:TitleCase|main|{{{name|}}}}} {{#if:{{{variation1|}}}|({{#invoke:TitleCase|main|{{{variation1|}}}}})}} NH Icon.png|[[File:{{#invoke:TitleCase|main|{{{name|}}}}} {{#if:{{{variation1|}}}|({{#invoke:TitleCase|main|{{{variation1|}}}}})}} NH Icon.png|128px|{{#invoke:SentenceCase|main|{{{name|}}}}}]]|[[File:Nia.png|128px|No image available|link=]]}}
  | caption          = {{#if:{{{variation1|}}}|{{#if:{{{pattern1|}}}|{{Colorshow|666|Variation shown: '''{{{variation1|}}}''' ({{{pattern1|}}})}}|{{Colorshow|666|Variation shown: '''{{{variation1|}}}'''}}}}|{{#if:{{{pattern1|}}}|{{Colorshow|666|Pattern shown: '''{{{pattern1|}}}'''}}|}}}}
+
  | caption          = {{#if:{{{variation1|}}}|{{Colorshow|666|Variation shown: '''{{{variation1|}}}'''}}}}
  
 
  | leftlabel        = Buy price
 
  | leftlabel        = Buy price
Line 132: Line 136:
  
 
  | label2          = Customize
 
  | label2          = Customize
  | data2            = {{#if:{{{cyrus-price|}}}{{{customizable|}}}|{{#if:{{{cyrus-price|}}}|{{Availability|Cyrus|nb=true}}: {{Currency|Bells|{{{cyrus-price|}}}}}<br />|}}{{#if:{{{customizable|}}}|[[File:{{#switch:{{{custom-kit-type|Customization Kit}}}|Customization Kit = Customization Kit|Pumpkin = Orange Pumpkin|Rainbow Feather = Rainbow Feather}} NH Inv Icon.png|22px|link=|Remake kit]] {{{custom-kits|}}} {{{custom-kit-type|kit}}}{{#ifexpr:{{{custom-kits|}}} > 1|s|}}<br />}}{{#if:{{{variation1|}}}|[[File:Customization NH Icon.png|22px|link=|Variations]] {{#expr:{{#if:{{{variation1|}}}|1|0}}+{{#if:{{{variation2|}}}|1|0}}+{{#if:{{{variation3|}}}|1|0}}+{{#if:{{{variation4|}}}|1|0}}+{{#if:{{{variation5|}}}|1|0}}+{{#if:{{{variation6|}}}|1|0}}+{{#if:{{{variation7|}}}|1|0}}+{{#if:{{{variation8|}}}|1|0}}}}&nbsp;variations{{#if:{{{customizable-variation|}}}||{{#if:{{{pattern1|}}}|&nbsp;(Cyrus&nbsp;only)}}}}}}{{#if:{{{pattern1|}}}|{{#if:{{{variation1|}}}|<br />}}[[File:Fabric NH Icon.png|22px|link=|Patterns]] {{#expr:{{#if:{{{pattern1|}}}|1|0}}+{{#if:{{{pattern2|}}}|1|0}}+{{#if:{{{pattern3|}}}|1|0}}+{{#if:{{{pattern4|}}}|1|0}}+{{#if:{{{pattern5|}}}|1|0}}+{{#if:{{{pattern6|}}}|1|0}}+{{#if:{{{pattern7|}}}|1|0}}+{{#if:{{{pattern8|}}}|1|0}}}}&nbsp;patterns|}}|No customization options.}}
+
  | data2            = {{#if:{{{cyrus-price|}}}{{{customizable|}}}|{{#if:{{{cyrus-price|}}}|{{Availability|Cyrus|nb=true}}: {{Currency|Bells|{{{cyrus-price|}}}}}<br />|}}{{#if:{{{customizable|}}}|[[File:{{#invoke:TitleCase|main|{{{custom-kit-type|customization kit}}}}} NH Customization Icon.png|22px|link=|Remake kit]] {{{custom-kits|}}} {{{custom-kit-type|kit}}}{{#ifexpr:{{{custom-kits|}}} > 1|s|}}<br />}}{{#if:{{{variation1|}}}|[[File:Customization NH Icon.png|22px|link=|Variations]] {{#expr:{{#if:{{{variation1|}}}|1|0}}+{{#if:{{{variation2|}}}|1|0}}+{{#if:{{{variation3|}}}|1|0}}+{{#if:{{{variation4|}}}|1|0}}+{{#if:{{{variation5|}}}|1|0}}+{{#if:{{{variation6|}}}|1|0}}+{{#if:{{{variation7|}}}|1|0}}+{{#if:{{{variation8|}}}|1|0}}}}&nbsp;variations{{#if:{{{customizable-variation|}}}||{{#if:{{{pattern1|}}}|&nbsp;(Cyrus&nbsp;only)}}}}}}{{#if:{{{pattern1|}}}|{{#if:{{{variation1|}}}|<br />}}[[File:Fabric NH Icon.png|22px|link=|Patterns]] {{#expr:{{#if:{{{pattern1|}}}|1|0}}+{{#if:{{{pattern2|}}}|1|0}}+{{#if:{{{pattern3|}}}|1|0}}+{{#if:{{{pattern4|}}}|1|0}}+{{#if:{{{pattern5|}}}|1|0}}+{{#if:{{{pattern6|}}}|1|0}}+{{#if:{{{pattern7|}}}|1|0}}+{{#if:{{{pattern8|}}}|1|0}}}}&nbsp;patterns|}}|No customization options.}}{{#if:{{{custom-pattern-part|}}}{{{custom-body-part|}}}|{{#if:{{{cyrus-price|}}}||[[Category:New Horizons items with missing Cyrus price parameters]]}}}}
  
 
  | label3          = HHA points
 
  | label3          = HHA points
Line 147: Line 151:
 
{{#forargs: variation | key | value | <div class="nh_item-flex-item nh_item-var">
 
{{#forargs: variation | key | value | <div class="nh_item-flex-item nh_item-var">
 
<div class="nh_item-var-img">
 
<div class="nh_item-var-img">
[[File:{{#if:{{{var{{#var: key }}-img|}}}|{{#ifexist:File:{{{var{{#var: key }}-img|}}}|{{{var{{#var: key }}-img|}}}|Nia.png}}|{{#if:{{{pattern1|}}}|{{#ifexist:File:{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}} - {{{pattern1|}}}) NH Icon.png|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}} - {{{pattern1|}}}) NH Icon.png|Nia.png}}|{{#ifexist:File:{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}}) NH Icon.png|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}} ({{{variation{{#var: key }}|}}}) NH Icon.png|Nia.png}}}}}}|36px|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki> </nowiki>(New Horizons)|}}'s {{{variation{{#var: key }}|}}} variant]]</div></div>}}</div>
+
[[File:{{#if:{{{var{{#var: key }}-img|}}}|{{#ifexist:File:{{{var{{#var: key }}-img|}}}|{{{var{{#var: key }}-img|}}}|Nia.png}}|{{#ifexist:File:{{#invoke:TitleCase|main|{{{name|}}}}} ({{#invoke:TitleCase|main|{{{variation{{#var: key }}|}}}}}) NH Icon.png|{{#invoke:TitleCase|main|{{{name|}}}}} ({{#invoke:TitleCase|main|{{{variation{{#var: key }}|}}}}}) NH Icon.png|Nia.png}}}}|36px|{{#invoke:SentenceCase|main|{{{name|}}}}}'s {{{variation{{#var: key }}|}}} variant]]</div></div>}}</div>
 
| <div style="width:100%; text-align: center;">None</div> }}
 
| <div style="width:100%; text-align: center;">None</div> }}
  
Line 153: Line 157:
 
  | widebottomdata2  = {{{notes|}}}
 
  | widebottomdata2  = {{{notes|}}}
  
  | languages        = Name
+
| widebottomlabel3 = In other games
 +
| widebottomdata3  = {{#cargo_query:tables=pg_furniture|fields=CONCAT("[[Item:", pg_furniture.en_name, " (Animal Crossing)|''Animal Crossing'' (", pg_furniture.en_name, ")]]<br />")|where=pg_furniture.identifier="{{{identifier|}}}"|delimiter=|default=}}{{#cargo_query:tables=nl_photo|fields=CONCAT("[[Item:", nl_photo.en_name, " (New Leaf)|''New Leaf'' (", nl_photo.en_name, ")]]<br />")|where=nl_photo.identifier="{{{identifier|}}}"|delimiter=|default=}}
 +
 
 +
  | languages        = Names
 
  | ja-name          = {{{ja-name|}}}
 
  | ja-name          = {{{ja-name|}}}
 
  | ko-name          = {{{ko-name|}}}
 
  | ko-name          = {{{ko-name|}}}
Line 176: Line 183:
 
  | Photos = photos
 
  | Photos = photos
 
  | Posters = posters
 
  | Posters = posters
  | {{{category|}}}}}]][[Category:New Horizons items introduced in {{{version-added|}}}]]{{#if: {{{series|}}} | [[Category:{{{series|}}} Series]]}}{{#if: {{{set|}}} | [[Category:{{{set|}}} Set]]}}{{#if: {{{availability1|}}} | [[Category:Acquired from {{#ifeq:{{{availability1|}}}|Crafting|crafting|{{{availability1|}}}}}]]}}{{#if: {{{availability2|}}} | [[Category:Acquired from {{#ifeq:{{{availability2|}}}|Crafting|crafting|{{{availability2|}}}}}]]}}|}}</includeonly><noinclude>{{clear}}<br>{{Documentation}}[[Category:Cargo templates]]</noinclude>
+
  | {{{category|}}}}}]][[Category:New Horizons items introduced in {{{version-added|}}}]]{{#if: {{{series|}}} | [[Category:{{{series|}}} Series]]}}{{#if: {{{set|}}} | [[Category:{{{set|}}} Set]]}}{{#if: {{{availability1|}}} | [[Category:Acquired from {{{availability1|}}}]]}}{{#if: {{{availability2|}}} | [[Category:Acquired from {{{availability2|}}}]]}}|}}</includeonly><noinclude>{{clear}}<br>{{Documentation}}[[Category:Cargo templates]]</noinclude>

Latest revision as of 19:22, January 24, 2023

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

Furniture NH Inv Icon.png Type of item
No image available
Buy price Sell price
Not for sale Unknown
Size
0.0 x 0.0 0.0 × 0.0
Obtain via
Customize No customization options.
Colors
Unknown
 
Unknown
Variations
None
Names in other languages
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown
 Unknown


No documentation for Template:NHPhoto exists. Create it.