Difference between revisions of "Template:NLFurnitureVillagers"

From Nookipedia, the Animal Crossing wiki
(creating template for future usage)
 
(adding not-re-tail parameter)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine: result-house | {{#cargo_query: table=nl_house,nl_villager|join on=nl_villager.name = nl_house.villager|fields=CONCAT( '[[File:', nl_villager.icon, '|x25px|', nl_house.villager, ']] [[', nl_house._pageTitle, '|', nl_house.villager, ']]' )|where=nl_house.items LIKE '%"{{#replace:{{{item|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki/> <nowiki/>(New Leaf)|}}}}}|'|\'}}"%'|limit=300|default=}}}}{{#vardefine: result-rv | {{#cargo_query: table=nlwa_rv|fields=CONCAT( '[[File:', nlwa_rv.name, '\'s Pic NL Texture.png|x25px|', nlwa_rv.name, ']] [[', nlwa_rv._pageTitle, '|', nlwa_rv.name, ']]' )|where=nlwa_rv.items LIKE '%"{{#replace:{{{item|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki/> <nowiki/>(New Leaf)|}}}}}|'|\'}}"%'|limit=300|default=}}}}{{#if: {{#var: result-house}}|This item appears in the homes of the following villagers: {{#var: result-house}}.{{#if: {{#var: result-rv}}|&#32;This item also appears in the [[RV]] of the following characters: {{#var: result-rv}}}}|{{#if: {{#var: result-rv}}|&#32;This item appears in the [[RV]] of the following characters: {{#var: result-rv}}|No characters have this item in their home, nor in their [[RV]].}}}}<noinclude>{{clear}}<br>{{Documentation}}[[Category:Cargo templates]]</noinclude>
+
{{#invoke:NLVillagerItemOutput|furnitureOutput|{{{item|{{#replace:{{#titleparts:{{PAGENAME}}||-1}}|<nowiki/> <nowiki/>(New Leaf)|}}}}}|disable-clothing={{{disable-clothing|}}}|clothing={{#incat:New Leaf tops|yes|{{#incat:New Leaf dresses|yes}}}}|not-purchasable={{{not-purchasable|}}}|not-re-tail={{{not-re-tail|}}}}}<noinclude>{{clear}}{{Documentation}}[[Category:Cargo templates]]</noinclude>

Latest revision as of 13:36, November 14, 2022

No villagers have this item in their home, nor do any characters have this item in their RV.

Template documentation (view)


Lua Logo.svg
This template is using a Lua module
To change certain features of this template, the following modules will need to be edited:
  • Module:NLVillagerItemOutput
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
    Lua Logo.svg
    This template is using a Lua module
    To change certain features of this template, the following modules will need to be edited:
  • Module:NLVillagerItemOutput
  • Note that any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
    More Cargo templates

    When placed on a Animal Crossing: New Leaf furniture page, this template will automatically produce a list of villagers whose houses have that furniture by default. If the item also appears in an RV, the list of character will also be generated. If no villagers have the item in their house by default and no RV character have this item in their RV, the template will output "No villagers have this item in their home, nor do any characters have this item in their RV.".

    This template will automatically extract the furniture name from the page title, so there is no need to specify any parameters; if needed, however, the item can be specified via the item parameter. If the item is not purchasable, the parameter not-purchasable removes the sentence "As a result, this item has a chance to be purchasable by the player if they were invited by any of the preceding villagers." If the item does not meet the requirements to be featured on Re-Tail, the parameter not-re-tail removes the sentence "Villagers may also put this item on Re-Tail for 50% to 90% of the item's buy price, in increments of 10%."

    This template pulls data from the nl_house and nlwa_rv Cargo table. If a villager's mention is inaccurate, it should be fixed in the New Leaf house info template and Welcome amiibo RV info template respectively that appears on their article. For more information on Cargo, refer to our Cargo documentation.

    Examples

    {{NLFurnitureVillagers|item=Blue Bed}}

    This item appears as a furniture item in the homes of Antonio, Bluebear, Jeremiah, Mitzi, Pierce, Punchy, and Sydney. As a result, this item can be purchased by the player if they were invited by any of the preceding villagers. These villagers may also put this item up for sale at the Re-Tail flea market for 50% to 90% of the item's buy price, in increments of 10%.

    {{NLFurnitureVillagers|item=Cabana Chair|not-re-tail=yes}}

    This item appears as a furniture item in the homes of Shari. As a result, this item can be purchased by the player if they were invited by any of the preceding villagers.


    Cite error: <ref> tags exist for a group named "nb", but no corresponding <references group="nb"/> tag was found