Difference between revisions of "Template:NHVillagerHobby"

From Nookipedia, the Animal Crossing wiki
m (i made a mistake)
m (Item link to dumbbell.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine:hobby |{{#cargo_query: table=nh_villager|fields=nh_villager.hobby=hobby|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:name |{{#cargo_query: table=villager|fields=villager.name |where=villager.name = "{{{villager|{{PAGENAME}}}}}" OR villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:gender |{{#cargo_query: table=nh_villager|fields=nh_villager.gender=gender|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:result | {{#cargo_query: table=nh_villager|fields=CONCAT( nh_villager.name, ' has the ', LOWER(nh_villager.hobby), ' [[hobby]]')|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=}}}}{{#if:{{#var: result}}|In {{NH|short|nolink}}, {{#var: result}}|{{#var: name}}'s hobby in {{NH|short|nolink}} is currently unknown.}} {{#switch:{{#var:hobby}}|Fitness = and will wear {{I|Sporty Shades|New Horizons}} and lift heavy dumbbells while exercising.|Nature = and may be found reading a book pertaining to an item {{#switch:{{#var:gender}}|Male = he|Female = she|}} is studying, which can be either flowers, bugs, fish, or fossils.|Education = and can be seen wearing {{I|Rimmed Glasses|New Horizons}}, reading a novel-type book while outside, and using a magnifying glass when near certain objects.|Fashion = and may be seen wearing a pink purse with a white flower on it, as well as a specific headwear or accessory item.|Music = and may sing anywhere without the need of a [[stereo]].|Play = and can run around with {{#switch:{{#var:gender}}|Male = his|Female = her|}} arms extended at any time, rather than only outside Resident Services during a scripted activity with a group of villagers.|}}<noinclude>{{clear}}<br>{{Documentation}}[[Category:Cargo templates]]</noinclude>
+
{{#vardefine:hobby |{{#cargo_query: table=nh_villager|fields=nh_villager.hobby=hobby|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:name |{{#cargo_query: table=villager|fields=villager.name |where=villager.name = "{{{villager|{{PAGENAME}}}}}" OR villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:gender |{{#cargo_query: table=nh_villager|fields=nh_villager.gender=gender|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=|no html}}}}{{#vardefine:result | {{#cargo_query: table=nh_villager|fields=CONCAT( nh_villager.name, ' has the ', LOWER(nh_villager.hobby), ' [[hobby]]')|where=nh_villager.name = "{{{villager|{{PAGENAME}}}}}" OR nh_villager._pageName = "{{{villager|{{PAGENAME}}}}}"|limit=300|default=}}}}{{#if:{{#var: result}}|In {{NH|short|nolink}}, {{#var: result}}|{{#var: name}}'s hobby in {{NH|short|nolink}} is currently unknown.}} {{#switch:{{#var:hobby}}|Fitness = and will wear {{I|sporty shades|NH}} and lift heavy {{I|dumbbell|NH}}s while exercising.|Nature = and may be found reading a book pertaining to an item {{#switch:{{#var:gender}}|Male = he|Female = she|}} is studying, which can be either flowers, bugs, fish, or fossils.|Education = and can be seen wearing {{I|rimmed glasses|NH}}, reading a novel while outside, and using a magnifying glass when near certain objects.|Fashion = and may be seen wearing a {{#switch:{{#var:gender}}|Male = brown leather bag|Female = pink purse with a white flower on it|}}, as well as a specific headwear or accessory item.|Music = and may sing anywhere without the need of a [[stereo]].|Play = and can run around with {{#switch:{{#var:gender}}|Male = his|Female = her|}} arms extended at any time, rather than only outside Resident Services during a scripted activity with a group of villagers.|}}<noinclude>{{clear}}<br>{{Documentation}}[[Category:Cargo templates]][[Category:Pages using the Variables extension]]</noinclude>

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

's hobby in New Horizons is currently unknown.


Template documentation (view)


More Cargo templates

When placed on a villager's page (if they are in Animal Crossing: New Horizons, this template will automatically produce the villager's hobby and what activity it pertains to. If the villager does not match the conditions, the template will show blank. If needed, the villager can be specified via the villager parameter.

This template pulls data from the nh_villager Cargo table. If a villager's mention is inaccurate, it should be fixed in NHVillagerInfo template that appears on their article. For more information on Cargo, refer to our Cargo documentation.

Examples

{{NHVillagerHobby|villager=Raymond}}

In New Horizons, Raymond has the nature hobby and may be found reading a book pertaining to an item he is studying, which can be either flowers, bugs, fish, or fossils.