Template:Infobox item: Difference between revisions
Salty Nori (talk | contribs) mNo edit summary |
Salty Nori (talk | contribs) (line break label for farm conditions) |
||
(40 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
-->|Resource<!-- crafting mat | -->|Resource<!-- crafting mat | ||
-->|Resource equipment|Artisan equipment<!-- crafting | -->|Resource equipment|Artisan equipment<!-- crafting | ||
-->|Artisan product<!-- artisan product | |||
-->|Animal product<!-- ranching | -->|Animal product<!-- ranching | ||
-->|Scavengeable|Mushroom<!-- foraging | -->|Scavengeable|Mushroom<!-- foraging | ||
Line 32: | Line 33: | ||
-->|Fish<!-- fishing | -->|Fish<!-- fishing | ||
-->|Misc<!-- misc | -->|Misc<!-- misc | ||
-->|Farming<!-- farming stuff | -->|Farming|Ranch<!-- farming stuff | ||
-->|Decor<!-- farm decor | -->|Decor<!-- farm decor | ||
-->|Cooking utensil<!-- cooking | -->|Cooking utensil<!-- cooking | ||
Line 40: | Line 41: | ||
</format> | </format> | ||
</data> | </data> | ||
<data source=" | <data source="item_group"> | ||
<label>Item | <label>Item group</label> <!-- Gifting, and ingredient categories all in one --> | ||
<format> | <format>{{Array|{{{item_group|}}}|;|[[{item}]]|<br />}}</format> | ||
</data> | </data> | ||
<data source="journal"> | <data source="journal"> | ||
<label>Journal category</label> | <label>Journal category</label> | ||
<format>{{{journal|}}}</format> <!-- Journal side nav --> | <format>{{{journal|}}}</format> <!-- Journal side nav --> | ||
</data> | |||
<data source="farm"> | |||
<label>Farm<br />conditions</label> | |||
<format><!-- | |||
-->{{#switch:{{{farm}}}<!-- | |||
-->|Land = Terrestrial/Land<!-- | |||
-->|Ocean = Ocean<!-- | |||
-->|#default = {{{farm|}}}<!-- | |||
-->}} | |||
</format> | |||
</data> | |||
<data source="size"> | |||
<label>Size</label> | |||
<format>{{{size|}}}</format> | |||
</data> | </data> | ||
<data source="season"> | <data source="season"> | ||
Line 60: | Line 71: | ||
-->}} | -->}} | ||
</format> | </format> | ||
</data> | </data> | ||
<data source="seed"> | <data source="seed"> | ||
<label>Seed</label> | <label>Seed</label> | ||
<format>{{Icon|{{{seed|}}}|note={{#if:{{{seed_price|}}}|{{ | <format>{{Icon|{{{seed|}}}|note={{#if:{{{seed_price|}}}|{{c|{{{seed_price|}}}}}}}}}</format> | ||
</data> | </data> | ||
<data source="growth"> | <data source="growth"> | ||
Line 73: | Line 80: | ||
<format><!-- | <format><!-- | ||
-->{{{growth|}}} days<!-- | -->{{{growth|}}} days<!-- | ||
-->{{#if:{{{growth_note|}}}| ({{{growth_note|}}})}}<!-- | |||
-->{{#if:{{{regrowth|}}}|<br />{{{regrowth|}}} {{#ifeq:{{{regrowth|}}}|1|day|days}} (regrowth)}} | -->{{#if:{{{regrowth|}}}|<br />{{{regrowth|}}} {{#ifeq:{{{regrowth|}}}|1|day|days}} (regrowth)}} | ||
</format> | </format> | ||
</data> | |||
<data source="giant_crop"> | |||
<label>[[Crop#Giant crops|Giant crop]]</label> | |||
</data> | |||
<data source="wild_seed"> | |||
<label>[[Wild seeds]]</label> | |||
</data> | </data> | ||
<data> | <data> | ||
Line 96: | Line 110: | ||
<data source="enchanting"> | <data source="enchanting"> | ||
<label>[[Enchanting]] value</label> | <label>[[Enchanting]] value</label> | ||
</data> | </data> | ||
<data source="produced_by"> | |||
<label>Produced by</label> | |||
<format>{{Icon|{{{produced_by|}}}|note={{#if:{{{produced_note|}}}|{{{produced_note|}}}}}}}</format> | |||
<data source = " | |||
</data> | </data> | ||
<data source="source"> | <data source="source"> | ||
<label> | <label>Source</label> | ||
<format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format> | <format>{{Array|{{{source|}}}|;|{item}|<hr />}}</format> | ||
</data> | </data> | ||
</group> | </group> | ||
<group layout="horizontal"> | <group layout="horizontal"> | ||
Line 136: | Line 125: | ||
<label>Base</label> | <label>Base</label> | ||
<format>{{#switch:{{lc:{{{sell|}}}}} | <format>{{#switch:{{lc:{{{sell|}}}}} | ||
| 0 = ''Unsellable'' | |0 = ''Unsellable'' | ||
| #default= | |#default= {{formatnum:{{{sell|}}}}} | ||
}}</format> | }}</format> | ||
</data> | </data> | ||
Line 143: | Line 132: | ||
<label>{{q|1}}</label> | <label>{{q|1}}</label> | ||
<default>{{#if:{{{diff_quality|}}}|{{Sell prices|B|{{{sell|}}}}}}}</default> | <default>{{#if:{{{diff_quality|}}}|{{Sell prices|B|{{{sell|}}}}}}}</default> | ||
<format>{{formatnum:{{{bronze}}}}}</format> | |||
</data> | </data> | ||
<data source="silver"> | <data source="silver"> | ||
<label>{{q|2}}</label> | <label>{{q|2}}</label> | ||
<default>{{#if:{{{diff_quality|}}}|{{Sell prices|S|{{{sell|}}}}}}}</default> | <default>{{#if:{{{diff_quality|}}}|{{Sell prices|S|{{{sell|}}}}}}}</default> | ||
<format>{{formatnum:{{{silver}}}}}</format> | |||
</data> | </data> | ||
<data source="gold"> | <data source="gold"> | ||
<label>{{q|3}}</label> | <label>{{q|3}}</label> | ||
<default>{{#if:{{{diff_quality|}}}|{{Sell prices|G|{{{sell|}}}}}}}</default> | <default>{{#if:{{{diff_quality|}}}|{{Sell prices|G|{{{sell|}}}}}}}</default> | ||
<format>{{formatnum:{{{gold}}}}}</format> | |||
</data> | </data> | ||
<data source="osmium"> | <data source="osmium"> | ||
<label>{{q|4}}</label> | <label>{{q|4}}</label> | ||
<default>{{#if:{{{diff_quality|}}}|{{Sell prices|O|{{{sell|}}}}}}}</default> | <default>{{#if:{{{diff_quality|}}}|{{Sell prices|O|{{{sell|}}}}}}}</default> | ||
<format>{{formatnum:{{{osmium}}}}}</format> | |||
</data> | </data> | ||
</group> | </group> | ||
Line 211: | Line 204: | ||
</infobox><!-- | </infobox><!-- | ||
-->{{Namespace|main=<!-- | -->{{Namespace|main=<!-- | ||
Type | Type | ||
-->{{#switch:{{{type}}}<!-- | -->{{#switch:{{{type}}}<!-- | ||
-->|Vegetable|Fruit|Flower|Herb|Grain=<!-- crops | -->|Vegetable|Fruit|Flower|Herb|Grain=<!-- crops | ||
-->[[Category:Crops]]<!-- | -->[[Category:Crops]]<!-- | ||
-->[[Category:{{{type}}}s]]<!-- | |||
-->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | |||
-->|[[Category:Any season crops}}]]<!-- | |||
-->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!-- | |||
-->}}}}<!-- | |||
-->|Seed|Seedling=<!-- seeds | |||
-->{{#ifeq:{{{type}}}|Seed|[[Category:Seeds]]|[[Category:Seedlings]]}}<!-- | |||
-->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | |||
-->|[[Category:Any season {{lc:{{{type}}}s}}]]<!-- | |||
-->|{{Array|{{{season}}}|;|[[Category:{item} {{lc:{{{type}}}s}}]]}}<!-- | |||
-->}}}}<!-- | |||
-->|Resource=<!-- crafting mat | |||
-->[[Category:Resources]]<!-- | |||
-->{{#if:{{{seed}}}|[[Category:Crops]][[Category:Crop|{{{journal_id}}}]]}}<!-- | |||
-->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | -->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | ||
-->|[[Category:Any season crops}}]]<!-- | -->|[[Category:Any season crops}}]]<!-- | ||
-->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!-- | -->|{{Array|{{{season}}}|;|[[Category:{item} crops]]}}<!-- | ||
-->}}}}<!-- | -->}}}}<!-- | ||
-->|Cooked dish=<!-- food | |||
--> [[Category:{{{type}}}es]]<!-- | |||
-->|Scavengeable|Mushroom=<!-- foraging | |||
{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | -->[[Category:Forageables]]<!-- | ||
-->[[Category:{{{type}}}s]]<!-- | |||
-->{{#if:{{{season|}}}|{{#ifeq:{{{season|}}}|Any<!-- | |||
-->|[[Category:Any season forageables}}]]<!-- | |||
-->|{{Array|{{{season}}}|;|[[Category:{item} forageables]]}}<!-- | |||
-->}}}}<!-- | |||
-->|Bomb|Decoy<!-- combat | -->|Bomb|Decoy<!-- combat | ||
-->|Resource equipment|Artisan equipment<!-- crafting | -->|Resource equipment|Artisan equipment<!-- crafting | ||
-->|Artisan product<!-- artisan product | |||
-->|Animal product<!-- ranching | -->|Animal product<!-- ranching | ||
-->|Bug<!-- land catcheables | -->|Bug<!-- land catcheables | ||
-->|Ocean critter<!-- ocean catcheables | -->|Ocean critter<!-- ocean catcheables | ||
Line 248: | Line 253: | ||
-->|Fish<!-- fishing | -->|Fish<!-- fishing | ||
-->|Misc<!-- misc | -->|Misc<!-- misc | ||
-->|Farming<!-- farming stuff | -->|Farming|Ranch<!-- farming stuff | ||
-->|Decor<!-- farm decor | -->|Decor<!-- farm decor | ||
-->|Others<!-- | |||
-->= [[Category:{{{type}}}]]<!-- | -->= [[Category:{{{type}}}]]<!-- | ||
-->|#default = [[Category:Pages with wrong input]]<!-- | |||
-->}}<!-- | |||
Farm | |||
-->{{#switch:{{{farm}}}<!-- | |||
-->|Land|Ocean=<!-- crops | |||
-->[[Category:{{{farm}}} crops]]<!-- | |||
-->|#default = [[Category:Pages with wrong input]]<!-- | |||
-->}}<!-- | |||
Seed type | |||
-->{{#if:{{{seed|}}}|<!-- | |||
-->{{If match|{{{seed|}}}<!-- | |||
-->|seedlings?$<!-- | |||
-->|saplings?$<!-- | |||
-->|seeds?$<!-- | |||
-->|true1=[[Category:Seedling crops]]<!-- | |||
-->|true2=[[Category:Sapling crops]]<!-- | |||
-->|true3=[[Category:Seed crops]]<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
Animal products | |||
-->{{#if:{{{produced_by|}}}|<!-- | |||
-->{{#switch:{{{produced_by}}}<!-- | |||
-->|Chicken|Duck|Peafowl|Quail = [[Category:{{{produced_by}}} products]][[Category:Coop products]]<!-- | |||
-->|Pig|Luwak|Goat|Cow|Llama|Sheep = [[Category:{{{produced_by}}} products]][[Category:Barn products]]<!-- | |||
-->|#default = [[Category:{{{produced_by}}} products]]<!-- | |||
-->}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
-->{{#ifeq:{{{produced_note|}}}|winner|[[Category:Golden animal products]]}}<!-- | |||
Categories<!-- | Categories<!-- | ||
-->{{#if:{{{category|}}}|{{Array|{{{category|}}}|;|[[Category:{item}]]}}}}<!-- | -->{{#if:{{{category|}}}|{{Array|{{{category|}}}|;|[[Category:{item}]]}}}}<!-- | ||
{{#if:{{{regrowth|}}}|[[Category:Regrowing crops]]}}<!-- | -->{{#if:{{{item_group|}}}|{{Array|{{{item_group}}}|;|[[Category:{item}s]]}}}}<!-- | ||
-->{{#if:{{{regrowth|}}}|[[Category:Regrowing crops]]}}<!-- | |||
-->{{#if:{{{rank|}}}|[[Category:Town rank {{{rank}}}]]}}<!-- | -->{{#if:{{{rank|}}}|[[Category:Town rank {{{rank}}}]]}}<!-- | ||
-->{{#if:{{{year|}}}|[[Category:Year {{{year}}}]]}}<!-- | -->{{#if:{{{year|}}}|[[Category:Year {{{year}}}]]}}<!-- | ||
-->{{#if:{{{giant_crop|}}}|[[Category:Giant crops]]}}<!-- | -->{{#if:{{{giant_crop|}}}|[[Category:Giant crops]]}}<!-- | ||
-->{{# | -->{{#ifeq:{{{wild_seed|}}}|Yes|[[Category:Crops from wild seeds]]}}<!-- | ||
-->{{#if:{{{health|}}}|[[Category:Consumables]][[Category:Edible ingredients]]}}<!-- | -->{{#if:{{{health|}}}|[[Category:Consumables]][[Category:Edible ingredients]]}}<!-- | ||
Sorting categories based on journal order | Sorting categories based on journal order | ||
-->{{#switch:{{{type}}}<!-- | -->{{#switch:{{{type}}}<!-- | ||
Line 270: | Line 302: | ||
-->|#default=<!-- | -->|#default=<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}}<!-- | |||
Necessary new line due to styling issues | Necessary new line due to styling issues | ||
--> | --> | ||
Line 275: | Line 308: | ||
Examples | Examples | ||
--><noinclude>{{Documentation| | --><noinclude>{{Documentation|Type=Infobox}}</noinclude> | ||
}}</noinclude> |
Latest revision as of 12:03, 16 July 2024
Note: parts of or the entire template might not be visible without values provided.
Main | Documentation | Sandbox | Usage |
Example 1
Example 2
Example 3
Infobox for items
Parameter | Description | Type | Status | |
---|---|---|---|---|
Item Description | description | In-game description. Displayed as the caption of the item's image, so will not be visible if there isn't an image file with the same name as the item. | Unknown | optional |
Type | type | Type shown in in-game details
| String | suggested |
Item group | item_group | Semicolon-separated list of gifting, and ingredient categories all in one | String | optional |
Journal category | journal | Journal side nav | String | optional |
Farm conditions | farm | Which farm can this be planted/used in
| String | optional |
Size | size | Footprint when placed on farm
| String | optional |
Season(s) | season | Semicolon-separated list of seasons a crop can be grown in, or "All"
| String | optional |
Seed | seed | Seed that, when planted, produces this item. | Page name | optional |
Seed price | seed_price | How much this item's seed costs. Only displayed if "Seed" is set.
| Number | optional |
Growth rate | growth | Number of days needed for this crop to grow to maturity
| Number | optional |
Growth note | growth_note | Additional notes on growth. Only displayed if "Growth rate" is set. | String | optional |
Regrowth | regrowth | Number of days needed for this crop to regrow. Only displayed if "Growth rate" is set.
| Number | optional |
Unlock Requirements: Town rank | rank | What town rank is required to unlock this item. Adds the page to the corresponding "Town rank X" category.
| String | optional |
Unlock Requirements: Year | year | What year this item is unlocked. Only displayed if "Unlock Requirements: Town rank. Adds the page to the corresponding "Year X" category.
| Number | optional |
Unlock Requirements: Building | building | What building and upgrade level are required. Only displayed if "Unlock Requirements: Town rank" is set. | Unknown | optional |
Unlock Requirements: Mastery level | mastery | Required mastery name, and optionally the required mastery level. Level is separated from the name by a semicolon.
| Unknown | optional |
Produced by | produced_by | What animal or equipment produces this item. If a png file exists with this name, it will be used as the image icon. Adds the page to the corresponding "products" category (birds -> "Coop products", barn animals -> "Barn products", others -> "X products"). Case sensitive!
| String | optional |
Produced by notes | produced_note | Additional details on the production of this item. | String | optional |
Sources | source | Semicolon-separated list of sources | String | optional |
Automatically calculate bronze/silver/gold/osmium values? | diff_quality | If set to a non-empty value, automatically calculates missing sell, health and energy values. See "Template:Sell prices".
| Unknown | optional |
Sell Price: Base | sell | Item's base sell price. If 0, displayed value will be "Unsellable"
| Number | optional |
Sell Price: Bronze | bronze | If set, indicates the bronze sell price. If "sell" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Sell Price: Silver | silver | If set, indicates the silver sell price. If "sell" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Sell Price: Gold | gold | If set, indicates the bronze sell price. If "sell" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Sell Price: Osmium | osmium | If set, indicates the bronze sell price. If "sell" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Restores Health: Base | health | Amount of health consuming this item restores when it has no quality.
| Number | optional |
Restores Health: Bronze | health_bronze | Amount of health consuming this item restores when it is bronze quality. If "health" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Restores Health: Silver | health_silver | Amount of health consuming this item restores when it is silver quality. If "health" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Restores Health: Gold | health_gold | Amount of health consuming this item restores when it is gold quality. If "health" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Restores Health: Osmium | health_osmium | Amount of health consuming this item restores when it is osmium quality. If "health" and "diff_quality" are both also set, this will override the auto-calculated value.
| Number | optional |
Restores Energy: Base | energy | Amount of energy consuming this item restores when it has no quality. Only shown if the corresponding health value would be shown.
| Number | optional |
Restores Energy: Bronze | energy_bronze | Amount of energy consuming this item restores when it is bronze quality. If "energy" and "diff_quality" are both also set, this will override the auto-calculated value. Only shown if the corresponding health value would be shown. | Unknown | optional |
Restores Energy: Silver | energy_silver | Amount of energy consuming this item restores when it is silver quality. If "energy" and "diff_quality" are both also set, this will override the auto-calculated value. Only shown if the corresponding health value would be shown.
| Number | optional |
Restores Energy: Gold | energy_gold | Amount of energy consuming this item restores when it is gold quality. If "energy" and "diff_quality" are both also set, this will override the auto-calculated value. Only shown if the corresponding health value would be shown.
| Number | optional |
Restores Energy: Osmium | energy_osmium | Amount of energy consuming this item restores when it is osmium quality. If "energy" and "diff_quality" are both also set, this will override the auto-calculated value. Only shown if the corresponding health value would be shown.
| Number | optional |
Journal ID | journal_id | Position in the journal that this item appears in. Counting starts from "01" (zero padded) left-right top-bottom.
| String | suggested |
Categories | category | Semicolon-separated list of additional categories this page will be added to. | String | optional |
Can be a giant crop? | giant_crop | no description
| String | optional |
Can sprout from wild seeds? | wild_seed | no description
| String | optional |
Effects | effect | no description | Unknown | optional |
Enchanting value | enchanting | How much fuel does this item provide while enchanting?
| Number | optional |