Difference between revisions of "Template:Infobox"
Jump to navigation
Jump to search
Margotbean (talk | contribs) (added parameter to show how many items are produced per craft) |
Margotbean (talk | contribs) (Cleaning up the code, will test to see if it breaks anything) |
||
Line 1: | Line 1: | ||
− | <noinclude>{{construction}}</noinclude><includeonly> | + | <noinclude>{{construction}}</noinclude> |
− | + | <includeonly> | |
{{#arraydefine:qualities|normal,silver,gold|,|unique}}<!-- Excludes iridium, as it is currently handled by {{{iridium}}}. --> | {{#arraydefine:qualities|normal,silver,gold|,|unique}}<!-- Excludes iridium, as it is currently handled by {{{iridium}}}. --> | ||
{{#arraydefine:qualities to show | {{#arraydefine:qualities to show | ||
− | | {{#switch:{{{quality|true}}} | + | | {{#switch:{{{quality|true}}} |
− | + | | true = normal, silver, gold, {{#ifeq:{{{iridium|true}}}|true|iridium}} | |
− | + | | false = normal | |
− | + | | #default = normal, {{{quality|}}}, {{#ifeq:{{{iridium|true}}}|true|iridium}} | |
− | + | }} | |
− | |,|unique}} | + | |,|unique}} |
− | {{#arraydiff:qualities to hide|qualities|qualities to show}} | + | {{#arraydiff:qualities to hide|qualities|qualities to show}} |
− | |||
{{#arraydefine:name| {{{name|{{PAGENAME}}}}} |<nowiki/>}} | {{#arraydefine:name| {{{name|{{PAGENAME}}}}} |<nowiki/>}} | ||
{{#arraydefine:image| {{{image|{{{name|{{PAGENAME}}}}}.png}}} |<nowiki/>}} | {{#arraydefine:image| {{{image|{{{name|{{PAGENAME}}}}}.png}}} |<nowiki/>}} | ||
− | |||
− | |||
{{#arraydefine:edibility| {{{edibility|-300}}} |<nowiki/>}} | {{#arraydefine:edibility| {{{edibility|-300}}} |<nowiki/>}} | ||
− | {{# | + | {{#if:{{{profession|}}} | {{#arraydefine:professions|{{{profession|}}}|,|unique|sort=asc}} |}} |
− | {{#arraydefine: | + | <div id="infoboxborder"> |
− | |||
− | |||
− | |||
{| id="infoboxtable" | {| id="infoboxtable" | ||
− | |colspan=2 id="infoboxheader"|{{{name|{{PAGENAME}}}}} | + | |colspan="2" id="infoboxheader"|{{{name|{{PAGENAME}}}}} |
|- | |- | ||
− | |colspan=2 style="padding-bottom:5px;"| | + | |colspan="2" style="padding-bottom:5px; text-align: center;"|{{#ifexist:File:{{{image|{{PAGENAME}}.png}}}|[[File:{{{image|{{PAGENAME}}.png}}}]]|}}{{#ifexist:File:{{{image2|}}}|[[File:{{{image2|}}}]]|}}{{#ifexist:File:{{{image3|}}}|[[File:{{{image3|}}}]]|}}{{#ifexist:File:{{{image4|}}}|[[File:{{{image4|}}}]]|}} |
|- | |- | ||
− | |colspan=2 | + | |colspan="2" style="text-align: center; font-style:italic;" id="infoboxdetail"|{{{description|}}} |
|- | |- | ||
− | |colspan=2 id="infoboxsection" style="text-align:center;"|Information{{#if:{{{source|}}}|<nowiki/> | + | |colspan="2" id="infoboxsection" style="text-align:center;"|Information{{#if:{{{source|}}}|<nowiki/> |
{{!}}- | {{!}}- | ||
{{!}}id="infoboxsection"{{!}}Source: | {{!}}id="infoboxsection"{{!}}Source: | ||
Line 56: | Line 50: | ||
{{!}}id="infoboxsection"{{!}}Season: | {{!}}id="infoboxsection"{{!}}Season: | ||
{{!}}id="infoboxdetail"{{!}}{{#switch:{{lc:{{{season|}}}}} | {{!}}id="infoboxdetail"{{!}}{{#switch:{{lc:{{{season|}}}}} | ||
− | | spring | summer | fall | winter = [[File:{{ucfirst:{{lc:{{{season}}}}}}}.png|24px]] [[{{ucfirst:{{lc:{{{season}}}}}}}]] | + | | spring | summer | fall | winter = [[File:{{ucfirst:{{lc:{{{season}}}}}}}.png|24px|link=]] [[{{ucfirst:{{lc:{{{season}}}}}}}]] |
| all | any = All | | all | any = All | ||
− | | [[spring]] = [[File:Spring.png|24px]] [[Spring]] | + | | [[spring]] = [[File:Spring.png|24px|link=]] [[Spring]] |
− | | [[summer]] = [[File:Summer.png|24px]] [[Summer]] | + | | [[summer]] = [[File:Summer.png|24px|link=]] [[Summer]] |
− | | [[winter]] = [[File:Winter.png|24px]] [[Winter]] | + | | [[winter]] = [[File:Winter.png|24px|link=]] [[Winter]] |
− | | [[fall]] = [[File:Fall.png|24px]] [[Fall]] | + | | [[fall]] = [[File:Fall.png|24px|link=]] [[Fall]] |
| #default = {{{season|}}} | | #default = {{{season|}}} | ||
}}}}{{#if:{{{edibility|}}}|<nowiki/> | }}}}{{#if:{{{edibility|}}}|<nowiki/> | ||
− | {{#ifeq:{{{quality|}}} | true | | + | {{#ifeq:{{{quality|}}} | true | <!--hack to show health/energy values in 2 columns = set quality to true in infobox--> |
{{!}}- | {{!}}- | ||
{{!}}id="infoboxsection" colspan="2" style="text-align: center;"{{!}}Healing Effect | {{!}}id="infoboxsection" colspan="2" style="text-align: center;"{{!}}Healing Effect | ||
Line 70: | Line 64: | ||
{{!}}id="infoboxdetail"{{!}}{{#iferror:{{Edibility|{{{edibility|0}}}|quality=silver}} |{{{edibility}}} |{{Edibility|{{{edibility|0}}}|quality=silver}}}} | {{!}}id="infoboxdetail"{{!}}{{#iferror:{{Edibility|{{{edibility|0}}}|quality=silver}} |{{{edibility}}} |{{Edibility|{{{edibility|0}}}|quality=silver}}}} | ||
{{!}}id="infoboxdetail"{{!}}{{#iferror:{{Edibility|{{{edibility|0}}}|quality=gold|iridium={{{iridium|}}}|hide=base }} |{{{edibility}}} |{{Edibility|{{{edibility|0}}}|quality=gold|iridium={{{iridium|}}}|hide=base }} }} | {{!}}id="infoboxdetail"{{!}}{{#iferror:{{Edibility|{{{edibility|0}}}|quality=gold|iridium={{{iridium|}}}|hide=base }} |{{{edibility}}} |{{Edibility|{{{edibility|0}}}|quality=gold|iridium={{{iridium|}}}|hide=base }} }} | ||
− | | | + | |<!-- if quality is not = true --> |
{{!}}- | {{!}}- | ||
{{!}}id="infoboxsection"{{!}}Healing Effect: | {{!}}id="infoboxsection"{{!}}Healing Effect: | ||
Line 168: | Line 162: | ||
| N/A | | N/A | ||
}}{{#if:{{{profession|}}} | }}{{#if:{{{profession|}}} | ||
− | | {{#arraydefine:professions|{{{profession|}}}|,|unique|sort=asc}} | + | | <!--{{#arraydefine:professions|{{{profession|}}}|,|unique|sort=asc}}--> |
{{#arrayprint:professions||@@@ | {{#arrayprint:professions||@@@ | ||
| {{#arraydefine:prof_mod|{{#switch:{{lc:@@@}} | | {{#arraydefine:prof_mod|{{#switch:{{lc:@@@}} |
Revision as of 19:12, 24 April 2017
Under Construction This article or section is under construction. It may be in the process of an expansion or major restructuring. Last edited by Margotbean on 2017-04-24 19:12:42. |
==Description==
This template displays a generic infobox for a wide variety of items. Do not use this on your user page. It is reserved for content pages.
Parameters
All parameters are optional. If omitted, nothing will display.
Parameter | Notes |
---|---|
eng | Name of the image to display, in English, without the ".png" extension. If the image has an extension other than ".png", then the "ext" parameter must be used. |
ext | Extension of image specified in "eng" parameter, without the period (e.g., "gif", "jpg", etc.) |
name | Name of item (Page name if omitted) For use on pages like Trash (item) where the name of the item is different from the page name. |
image2 image3 image4 image5 |
Name of additional images to display Must be of type ".png" Omit the extension (e.g., Tiger Slime Egg) |
image2spacing | Set to "true" to add extra space between the images specified in "eng" and "image2" |
color | Color of artisan goods produced (Jelly, Pickles, Wine, Dehydrator product, etc.) Color name must correspond to an image located in Category:Artisan good images If omitted, color will be the default color for the item (green juice, red jelly, purple wine, etc.) |
description | In-game item description (Populated by Template:Description if omitted). It is preferable to omit this parameter and update Template:Description instead. |
source | How to obtain the item (e.g., [[Crafting]], [[Artisan Goods]], [[Slime Egg-Press]]) |
location | Location(s) of item (e.g., [[Cindersap Forest]], [[The Beach]], Bushes throughout the valley, etc.) |
seed | Name of seed (e.g., {{Name|Corn Seeds}}) |
growth | Number of days the crop takes to grow to maturity (e.g., 4 days) |
buff | Name of buff(s) given by the item (e.g., {{Name|Farming|+4}}) |
buffduration | Length of time buff(s) are active |
season | Name of season when the item can be obtained or grown Can be plain text (e.g., Spring, Summer, All, etc.) or can use Template:Season (e.g., {{Season|Summer}} • {{Season|Winter}}) |
weather | Weather required to obtain the item Can use plain text (e.g., Rain) and this template will automatically apply Template:Weather inline formatting |
xp | Experience points gained for harvesting or otherwise obtaining the item |
edibility | Found in Data\ObjectInformation.xnb Note that inedible items have an edibility of -300, and poisonous items have a negative edibility greater than -300 |
sellprice | Found in Data\ObjectInformation.xnb If the item cannot be sold, then "N/A" and "Cannot be sold" are valid values |
quality | Set to "false" to suppress silver, gold, and iridium qualities |
recipe | How to obtain the recipe to craft the item (e.g., [[Farming]] Level 7) |
craftingstation | Equipment used to craft the item (e.g., {{Name|Preserves Jar}}) |
crafttime | How long does the item process in its equipment (e.g., 4 hours) |
ingredients | Ingredients needed to craft the item (e.g., {{Name|Copper Bar|2}}{{Name|Sap|10}}) |
tingredients | Ingredients with the Trapper profession Used on the Crab Pot page |
produces | Item produced via crafting, artisan goods, or harvesting (e.g., 5 Deluxe Fertilizer per craft) |