Difference between revisions of "Template:HHPVillagerInfo"

From Nookipedia, the Animal Crossing wiki
(Placeholder template; feel free to make modifications to it, I'm not an expertise at templates.)
 
(Title case and sentence case for items.)
 
(68 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| class="styled color-blue" style="margin: 0; width: 40%;"
+
<noinclude>{{#cargo_declare:
 +
_table=hhp_villager
 +
|name = String
 +
|name_sort = String
 +
|icon = String
 +
|icon_url = String
 +
|special_character = Boolean
 +
|facility = Boolean
 +
|thought = String
 +
|thought_wikitext = Wikitext string
 +
|request = String
 +
|item1 = String
 +
|item2 = String
 +
|item3 = String
 +
|song = String
 +
|unlocked_items = Text
 +
|housemates = List (,) of String
 +
}}</noinclude><includeonly>{{#ifeq:{{NAMESPACE}}||{{#cargo_store:
 +
_table=hhp_villager
 +
|name = {{{name|{{PAGENAME}}}}}
 +
|name_sort = {{{name-sort|{{{name|{{PAGENAME}}}}}}}}
 +
|icon = {{{icon|{{{name|{{PAGENAME}}}}} NH {{#if:{{{special-character|}}}|Character|Villager}} Icon.png}}}
 +
|icon_url = {{filepath:{{{icon|{{{name|{{PAGENAME}}}}} NH {{#if:{{{special-character|}}}|Character|Villager}} Icon.png}}}}}
 +
|special_character = {{{special-character|No}}}
 +
|facility = {{{facility|No}}}
 +
|thought = {{#invoke:Plain text|main|{{{thought|}}}}}
 +
|thought_wikitext = {{{thought|}}}
 +
|request = {{{request|}}}
 +
|item1 = {{{item1|}}}
 +
|item2 = {{{item2|}}}
 +
|item3 = {{{item3|}}}
 +
|song = {{{song|}}}
 +
|unlocked_items = [ {{#forargs: furn | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{furn{{#var: key}}|}}}", "img": "{{{f{{#var: key }}-img|{{{furn{{#var: key }}|}}}{{#if:{{{f{{#var: key }}-var|}}}|_({{{f{{#var: key }}-var|}}})}}_NH_Icon.png}}}", "link": "{{{f{{#var: key }}|{{I|{{{furn{{#var: key }}|}}}|NH}}}}}", "type": "furniture" } }}{{#if:{{{inter1|}}}|, {{#forargs: inter | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{inter{{#var: key}}|}}}", "img": "{{{in{{#var: key }}-img|{{{inter{{#var: key }}|}}}_NH_Icon.png}}}", "link": "{{{in{{#var: key }}|{{I|{{{inter{{#var: key }}|}}}|NH}}}}}", "type": "interior" } }}}}{{#if:{{{cloth1|}}}|, {{#forargs: cloth | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{cloth{{#var: key}}|}}}", "img": "{{{c{{#var: key }}-img|{{{cloth{{#var: key }}|}}}{{#if:{{{c{{#var: key }}-var|}}}|_({{{c{{#var: key }}-var|}}})}}_NH_Icon.png}}}", "link": "{{{c{{#var: key }}|{{I|{{{cloth{{#var: key }}|}}}|NH}}}}}", "type": "clothing" } }}}}{{#if:{{{otheritems1|}}}|, {{#forargs: otheritems | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{otheritems{{#var: key}}|}}}", "img": "{{{oi{{#var: key }}-img|{{{otheritems{{#var: key }}|}}}{{#if:{{{oi{{#var: key }}-var|}}}|_({{{oi{{#var: key }}-var|}}})}}_NH_Icon.png}}}", "link": "{{{oi{{#var: key }}|{{I|{{{otheritems{{#var: key }}|}}}|NH}}}}}", "type": "item" } }}}}{{#if:{{{plant1|}}}|, {{#forargs: plant | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"name": "{{{plant{{#var: key}}|}}}", "img": "{{{p{{#var: key }}-img|{{{plant{{#var: key }}|}}}_NH_Icon.png}}}", "link": "{{{p{{#var: key }}|{{I|{{{plant{{#var: key }}|}}}|NH}}}}}", "type": "plant" } }}}}{{#if:{{{house1|}}}|, {{#forargs: house | key | value | {{#ifexpr: {{#var: key}} > 1 | , }} {"house-name": "{{{house{{#var: key}}|}}}"} }}}} ]
 +
|housemates = {{{housemates|}}}
 +
}}}}</includeonly>
 +
<div style="display: grid; vertical-align: top; background: #{{#if:{{{special-character|}}}|c6f570|93C5D9}}; margin-left: 10px; margin-bottom: 10px; {{roundy|15px}} border: 3px solid #{{#if:{{{special-character|}}}|c6f570|93C5D9}}; max-width: 700px; padding: 2px; {{#if:{{{minwidth|}}}|min-width: {{{minwidth}}}}};">
 +
{{#if: {{{collapse|}}} | <div class="infobox mw-customtoggle-{{{collapse-id|1}}}">Click to toggle.</div>}}
 +
<div style="text-align: center">'''[[Animal Crossing: New Horizons – Happy Home Paradise/Client information|{{HHP|nolink|short}} client information]]'''</div>
 +
<div {{#if: {{{collapse|}}} | id="mw-customcollapsible-{{{collapse-id|1}}}"}} class="flex-container {{#if: {{{collapse|}}} | mw-collapsible mw-collapsed mw-collapsible-content}}">
 +
<div class="flex-item">
 +
{| style="display: inline-table; width: 100%; height: 100%;" |
 +
|-
 +
! colspan="3" style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{roundytl|9px}} {{roundytr|9px}} | {{{name|{{PAGENAME}}}}}
 +
|- {{#if:{{{thought|}}}|
 +
{{!-}}
 +
! style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{#if:{{{request|}}}||{{roundybl|9px}}}}" {{!}} '''Thought bubble'''
 +
{{!}} colspan="2" style="background:#ffffff; padding:0 0 0 6px; {{#if:{{{request|}}}||{{roundybr|9px}}}}" {{!}} {{{thought|}}}}}
 +
|- {{#if:{{{request|}}}|
 +
{{!-}}
 +
! style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{#if:{{{housemates|}}}{{{item1|}}}||{{roundybl|9px}}}}" {{!}} '''Client's vision'''
 +
{{!}} colspan="2" style="background:#ffffff; padding:0 0 0 6px;  {{#if:{{{housemates|}}}{{{item1|}}}||{{roundybr|9px}}}}" {{!}} {{{request|}}}}}
 +
|- {{#if:{{{housemates|}}}|
 +
{{!-}}
 +
! style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{#if:{{{item1|}}}||{{roundybl|9px}}}}" {{!}} '''Shares house with'''
 +
{{!}} colspan="2" style="background:#ffffff; padding:0 0 0 6px; {{#if:{{{item1|}}}||{{roundybr|9px}}}}" {{!}} {{#invoke: Items | outputHousemates | {{{housemates|}}} }}}}
 +
|- {{#if:{{{item1|}}}|
 +
{{!-}}
 +
! style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{#if:{{{song|}}}||{{roundybl|9px}}}}" {{!}} '''Required items'''
 +
{{!}} colspan="2" style="background:#ffffff; padding:0 0 0 6px; {{#if:{{{song|}}}||{{roundybr|9px}}}}" {{!}} {{#if:{{{items|}}}|{{{items|-}}}|{{#forargs: item
 +
| key
 +
| value
 +
| <nowiki /> [[File:{{{img{{#var: key }}|{{{item{{#var: key }}|}}}}}}_NH_Icon.png|27px|alt=|link=]]{{{i{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{item{{#var: key }}|}}}}}|NH}}}}}<br>}}}}}}
 +
|- {{#if:{{{song|}}}|
 +
{{!-}}
 +
! style="background: #{{#if:{{{special-character|}}}|e3fab7|C8E2ED}}; text-align:center; {{roundybl|9px}}" {{!}} '''Favorite song'''
 +
{{!}} colspan="2" style="background:#ffffff; padding:0 0 0 6px; {{roundybr|9px}}" {{!}} [[File:{{{song|}}}_NH Texture.png|27px|alt=|link=]]&nbsp;[[{{{song|}}}]]}}
 
|-
 
|-
! colspan=2 | {{HHP|nolink|short}} client information
 
|- {{#if: {{{thought|}}} | | style="display: none;" }}
 
! style="width: 25%;" | Thought bubble
 
| style="padding: 1%;" | {{{thought|}}}
 
|- {{#if: {{{request|}}} | | style="display: none;" }}
 
! Client's vision
 
| style="padding: 1%;" | {{{request|}}}
 
|- {{#if: {{{item1|}}} | | style="display: none;" }}
 
! Required items
 
| style="padding: 1%;" | {{#if:{{{items|}}}|{{{items|-}}}|{{#if:{{{item1|}}}|[[File:{{{img1|{{{item1|}}}}}}_NH_Icon.png|30px|alt=|link=]]{{{item1|}}}|}}{{#if:{{{item2|}}}|<br>[[File:{{{img2|{{{item2|}}}}}}_NH_Icon.png|30px|alt=|link=]]{{{item2|}}}|}}{{#if:{{{item3|}}}|<br>[[File:{{{img3|{{{item3|}}}}}}_NH_Icon.png|30px|alt=|link=]]{{{item3|}}}}}|}}
 
 
|}
 
|}
 +
</div>
 +
</div>
 +
</div>
 +
<div style="vertical-align: top; margin-left: 10px; margin-bottom: 10px; {{roundy|15px}}; max-width: 700px; padding: 2px;">
 +
{| class="mw-collapsible mw-collapsed" align="center" cellpadding="0px" style="width: 100%; text-align:center; background-color:#FFDD66; border-top: 3px solid #FFDD66; border-right: 3px solid #FFDD66; border-left: 3px solid #FFDD66; {{roundy|10px}}"
 +
! colspan="2" | {{Anchor|Happy Home Paradise unlocked items|Unlocked items}}
 +
|-
 +
{{#if:{{{furn1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Furniture:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}}; width:85%;" align="left" {{!}}{{Columns-list|colwidth=170px|{{#forargs: furn
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{f{{#var: key }}-img|{{#invoke:TitleCase|main|{{{furn{{#var: key }}|}}}}}{{#if:{{{f{{#var: key }}-var|}}}|_({{#invoke:TitleCase|main|{{{f{{#var: key }}-var|}}}}})}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{f{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{furn{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
{{#if:{{{inter1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Interior:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}};" align="left" {{!}} {{Columns-list|colwidth=170px|{{#forargs: inter
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{in{{#var: key }}-img|{{#invoke:TitleCase|main|{{{inter{{#var: key }}|}}}}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{in{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{inter{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
{{#if:{{{cloth1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Clothing:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}};" align="left" {{!}} {{Columns-list|colwidth=170px|{{#forargs: cloth
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{c{{#var: key }}-img|{{#invoke:TitleCase|main|{{{cloth{{#var: key }}|}}}}}{{#if:{{{c{{#var: key }}-var|}}}|_({{#invoke:TitleCase|main|{{{c{{#var: key }}-var|}}}}})}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{c{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{cloth{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
{{#if:{{{otheritems1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Other items:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}};" align="left" {{!}} {{Columns-list|colwidth=170px|{{#forargs: otheritems
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{oi{{#var: key }}-img|{{#invoke:TitleCase|main|{{{otheritems{{#var: key }}|}}}}}{{#if:{{{oi{{#var: key }}-var|}}}|_({{#invoke:TitleCase|main|{{{oi{{#var: key }}-var|}}}}})}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{oi{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{otheritems{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
{{#if:{{{plant1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Nature:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}};" align="left" {{!}} {{Columns-list|colwidth=170px|{{#forargs: plant
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{p{{#var: key }}-img|{{#invoke:TitleCase|main|{{{plant{{#var: key }}|}}}}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{p{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{plant{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
{{#if:{{{house1|}}}|
 +
{{!}} style="max-width: 100px; padding: 3px; text-align:right; vertical-align:top;" {{!}} '''Housing:'''
 +
{{!}} style="background: #ffffff; padding: 0 0 0 9px; {{roundy}};" align="left" {{!}} {{Columns-list|colwidth=170px|{{#forargs: house
 +
| key
 +
| value
 +
| <nowiki /><li style="list-style: none;">[[File:{{{h{{#var: key }}-img|{{#invoke:TitleCase|main|{{{house{{#var: key }}|}}}}}}}}_NH_Icon.png|27px|alt=|link=]]&nbsp;<span style="font-size:0.8em;>{{{h{{#var: key }}|{{I|{{#invoke:SentenceCase|main|{{{house{{#var: key }}|}}}}}|NH}}}}}</span></li>
 +
}}
 +
}}
 +
}}
 +
|-
 +
|}</div>{{clear}}<includeonly>{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Articles with Happy Home Paradise info]] {{#if:{{{special-character|}}}||{{#if:{{{thought|}}}||[[Category:Villagers with missing Happy Home Paradise thought bubble info]]}} {{#if:{{{request|}}}||[[Category:Villagers with missing Happy Home Paradise request info]]}} {{#if:{{{item1|}}}||[[Category:Villagers with missing Happy Home Paradise required items]]}} {{#if:{{{song|}}}||[[Category:Villagers with missing Happy Home Paradise song info]]}}}} {{#if:{{{furn1|}}}||[[Category:Villagers with missing Happy Home Paradise unlocked item info]]}}}}</includeonly><noinclude>{{Documentation}}[[Category:Villager info templates]]</noinclude>

Latest revision as of 21:27, January 1, 2023

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

Unlocked items

Template documentation (view)


Usage

General Example

Unlocked items
{{HHPVillagerInfo
|name = 
|thought = 
|request = 
|item1 = 
|img1 = 
|item2 = 
|img2 = 
|item3 = 
|img3 = 
|song = 
}}

Maple Example

Maple
Thought bubble I think a home with lots of plush bears would be so fun.
Client's vision A Bountiful Bear Bungalow
Required items Papa bear
Mama bear
Ranch wardrobe
Favorite song  Neapolitan
Unlocked items
Furniture:
Interior:
Clothing:
Other items:
{{HHPVillagerInfo
|thought = I think a home with lots of <span style="color:dodgerblue">plush bears</span> would be so fun.
|request = A Bountiful Bear Bungalow
|item1 = Papa bear
|img1 = Papa Bear (Cream - None)
|item2 = Mama bear
|img2 = Mama Bear (Cream - None)
|item3 = ranch wardrobe
|img3 = Ranch Wardrobe (Natural)
|song = Neapolitan
|furn1 = garden chair
|f1-var = White
|furn2 = ranch chair
|f2-var = Natural
|furn3 = log stool
|f3-var = Dark wood
|furn4 = double sofa
|f4-var = Red
|furn5 = log bench
|f5-var = Dark wood
|furn6 = wild log bench
|f6-var = Dark wood
|furn7 = garden table
|f7-var = White
|furn8 = ranch tea table
|f8-var = Natural - None
|furn9 = ranch lowboard
|f9-var = Natural - None
|furn10 = log dining table
|f10-var = Dark wood - None
|furn11 = log round table
|f11-var = Dark wood - none
|furn12 = camping cot
|f12-var = Green
|furn13 = hammock
|f13-var = Brown - Colorful
|furn14 = sleeping bag
|f14-var = Green
|furn15 = ranch wardrobe
|f15-var = Natural
|furn16 = clothes closet
|f16-var = White
|furn17 = log decorative shelves
|f17-var = Dark wood - None
|furn18 = ranch cupboard
|f18-var = Natural
|furn19 = ranch kitchen
|f19-var = Natural
|furn20 = Mama bear
|f20-var = Cream - None
|furn21 = Papa bear
|f21-var = Cream - None
|furn22 = giant teddy bear
|f22-var = Cream - None
|furn23 = Mama panda
|furn24 = Papa panda
|furn25 = kids' tent
|f25-var = White
|furn26 = campfire cookware
|furn27 = picnic basket
|f27-var = Red
|furn28 = portable radio
|f28-var = White
|furn29 = camp stove
|f29-var = Yellow
|furn30 = Baby bear
|f30-var = Cream - None
|furn31 = Baby panda
|furn32 = Maple's photo
|f32-var = Natural wood
|furn33 = Maple's poster
|inter1 = cabin wall
|inter2 = tent wall
|inter3 = paw-print wall
|inter4 = glowing-moss forest wall
|inter5 = light herringbone flooring
|inter6 = natural-block flooring
|inter7 = tent flooring
|inter8 = glowing-moss flooring
|inter9 = simple medium avocado mat
|inter10 = red vinyl sheet
|inter11 = yellow vinyl sheet
|inter12 = glowing-moss rug
|inter13 = round glowing-moss rug
|cloth1 = bear tee
|cloth2 = bear costume
|c2-var = Brown
|cloth3 = bear costume
|c3-var = Black
|cloth4 = bear costume
|c4-var = Pink
|cloth5 = bear costume
|c5-var = Blue
|cloth6 = bear cap
|c6-var = Brown
|cloth7 = bear cap
|c7-var = Black
|cloth8 = bear cap
|c8-var = Pink
|cloth9 = bear cap
|c9-var = Blue
|cloth10 = bear umbrella
|cloth11 = panda umbrella
|otheritems1 = Neapolitan
|oi1 = [[Neapolitan]]
|otheritems2 = wasp nest
}}