Difference between revisions of "Template:Infobox/doc"

From Stardew Valley Wiki
Jump to navigation Jump to search
m (Text replacement - "tt>" to "samp>")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox
+
==Description==
|name            = Example
+
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.'''
|image          = Blank_icon
 
|description    = ''Example description text''
 
|season          = spring, summer
 
|edibility      = 10
 
|quality        = Normal
 
}}
 
  
The [[Template:Infobox|Infobox]] template displays a generic infobox for a wide variety of items.  Note that several categories of item have customized variants of the generic infobox; see [[:Category:Infobox templates]] for a complete listing.
+
==Parameters==
 
+
All parameters are optional. If omitted, nothing will display.
==Notes==
+
{|class="wikitable sortable"
* Many of the input values expect to be plain text values, which are then automatically formatted, converted into links, etc.
+
|-
 
+
!Parameter!!Notes
* Currently the template includes hard-coded support for several specialized features, in particular, derived artisan products for many items. Most of these are no longer necessary, and would be better handled by modifying the individual item pages to provide the relevant information.  Once all item pages in all languages have been updated, this information should be removed from the template.
+
|-
 
+
|eng||Name of the image to display, in English, without the ".png" extension.<br />If the image has an extension other than ".png", then the "ext" parameter must be used.
==Usage==
+
|-
===Syntax===
+
|ext||Extension of image specified in "eng" parameter, without the period (''e.g.,'' "gif", "jpg", etc.)
  <nowiki>{{</nowiki>[[Template:Infobox|Infobox]]
+
|-
    |name            = Name of Item (Page name if omitted)
+
|name||Name of item (Page name if omitted)<br />For use on pages like [[Trash (item)]] where the name of the item is different from the page name.
    |image          = file_name.png (Page name.png if omitted)
+
|-
    |description    = In-game description of the item (optional -- populated by Template:Description if omitted)  
+
|image2<br />image3<br />image4<br />image5||Name of additional images to display<br />Must be of type ".png"<br />Omit the extension (''e.g.,'' Tiger Slime Egg)
    |location        = Location(s) where item is found
+
|-
    |source          = Farming / Quest / Shop
+
|image2spacing||Set to "true" to add extra space between the images specified in "eng" and "image2"
    |edibility      = 20
+
|-
    |sellprice      = 14
+
|description||In-game item description<br />(Populated by [[:Template:Description]] if omitted). It is preferable to omit this parameter and update Template:Description instead.
    |type            = fruit, vegetable
+
|-
    |quality        = true / false / list of qualities to show
+
|source||How to obtain the item (''e.g.,'' <nowiki>[[Crafting]], [[Artisan Goods]], [[Slime Egg-Press]]</nowiki>)
    |iridium        = true <- add iridium quality stars rating
+
|-
    |profession      = Rancher / Tiller / Artisan / Blacksmith / Forester / Tapper
+
|location||Location(s) of item (''e.g.,'' <nowiki>[[Cindersap Forest]], [[The Beach]], Bushes throughout the valley, etc.</nowiki>)
    |seed            = seed name
+
|-
    |season          = Spring, Summer, Fall, Winter, All
+
|seed||Name of seed (''e.g.,'' <nowiki>{{Name|Corn Seeds}}</nowiki>)
    |growth          = 4 days
+
|-
    |buff            = buff effects
+
|growth||Number of days the crop takes to grow to maturity (''e.g.,'' 4 days)
    |buffduration    = buff duration
+
|-
    |craftingstation = <nowiki>{{name|Preserves Jar}}</nowiki> <- use the name template, then list the station name
+
|buff||Name of buff(s) given by the item (''e.g.,'' <nowiki>{{Name|Farming|+4}}</nowiki>)
    |ingredients    = <nowiki>{{name|Fish|13}} {{name|item|#}}</nowiki> <- use the name template, then list the item and # of ingredient needed
+
|-
    |recipe          = Source of recipe
+
|buffduration||Length of time buff(s) are active
    |crafttime      = Crafting time
+
|-
    |image2          = Second image (deprecated - use multiple values in image instead)
+
|season||Name of season when the item can be obtained or grown<br />Can be plain text (''e.g.,'' Spring, Summer, All, etc.) or can use [[:Template:Season]] (''e.g.,'' <nowiki>{{Season|Summer}} • {{Season|Winter}}</nowiki>)
    |image3          = Third image (deprecated)
+
|-
    |image4          = Fourth image (deprecated)
+
|weather||Weather required to obtain the item<br />Can use plain text (''e.g.,'' Rain) and this template will automatically apply [[:Template:Weather inline]] formatting
    |image2spacing  = true to add space between multiple images
+
|-
    |is_artisan      = true only if necessary for artisan goods section of infobox
+
|xp||Experience points gained for harvesting or otherwise obtaining the item
    |eng            = English version name of item (only relevant on non-English wikis)
+
|-
    |xp              = Details of XP
+
|edibility||Found in <samp>Data\ObjectInformation.xnb</samp><br />Note that inedible items have an edibility of -300, and poisonous items have a negative edibility greater than -300
    |tingredients    = ingredients with the Trapper profession
+
|-
    |price_ncols    = to change whether non-artisan prices are displayed horizontally or vertically
+
|sellprice||Found in <samp>Data\ObjectInformation.xnb</samp><br />If the item cannot be sold, then "N/A" and "Cannot be sold" are valid values
    |artisan_item    = Name(s) of item(s) derived from primary item by processing
+
|-
    |artisan_prof    = Professions that affect prices of artisan_item
+
|quality||Set to "false" to suppress silver, gold, and iridium qualities
    |artisan_link    = Language-specific eqivalents for artisan_item
+
|-
    |artisan_price  = Base price of artisan_item
+
|recipe||How to obtain the recipe to craft the item (''e.g.,'' <nowiki>[[Farming]] Level 7</nowiki>)
    |artisan_qual    = Qualities of artisan_item
+
|-
    |artisan_ncols  = to change whether non-artisan prices are displayed horizontally or vertically
+
|craftingstation||Equipment used to craft the item (''e.g.,'' <nowiki>{{Name|Preserves Jar}}</nowiki>)
    |custom_price    = to override entire price section with customized output from [[Template:Infosection price|Infosection price]]
+
|-
  <nowiki>}}</nowiki>
+
|crafttime||How long does the item process in its equipment (''e.g.,'' 4 hours)
 
+
|-
===Parameters===
+
|ingredients||Ingredients needed to craft the item (''e.g.,'' <nowiki>{{Name|Copper Bar|2}}{{Name|Sap|10}}</nowiki>)
All parameters are named and optional.  Only parameters relevant to the current item should be provided (completely delete irrelevant ones to fully omit from the infobox). Default value for all arguments is empty, unless specified otherwise.
+
|-
 
+
|tingredients||Ingredients with the [[Skills#Fishing|Trapper profession]]<br />''Used on the [[Crab Pot]] page''
* '''name = ''item_name'''''
+
|-
** Name of item. Default is page name
+
|produces||Item produced via crafting, artisan goods, or harvesting (''e.g.,'' 5 Deluxe Fertilizer per craft)
 
+
|-
* '''image = ''image_name'''''
+
|}<includeonly>[[Category:Infobox templates]]{{Addlanglinks}}</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
** Name of image(s) to display in infobox. Default is <samp>page_name</samp>.png
 
*** On non-English wikis, default value is <samp>eng</samp>.png
 
** If more than one image should be displayed, multiple image names can be provided, separated by commas. For example, use <samp>image=Egg, Brown Egg</samp> to display [[File:Egg.png|32px]][[File:Brown_Egg.png|32px]].
 
** The image names should include the extension (.jpg, .gif, etc) if the images are not in .png format; otherwise the extension is optional and .png will automatically be appended
 
 
 
* '''description = ''description'''''
 
** In-game description of the item. Populated by [[Template:Description]] if omitted.
 
** Note that the description is expected to exactly match the in-game description -- if there are typos, errors, etc., they should be reproduced exactly.
 
 
 
* '''location = ''values'''''
 
** Locations where the item can be found, in particular via foraging
 
** If only a single location is provided, the value can be plain text and will be auto-converted into a link.
 
** If multiple locations are provided, each should be formatted as a link, and the values separated by a bullet (<nowiki>&bullet;</nowiki>)
 
 
 
* '''source = ''values'''''
 
** How to obtain the item (other than foraging)
 
** If only a single location is provided, the value can be plain text and will be auto-converted into a link.
 
** If multiple locations are provided, each should be formatted as a link, and the values separated by a bullet (<nowiki>&bullet;</nowiki>)
 
 
 
* '''edibility = ''base_edibility'''''
 
** Base edibility of the item, as extracted from [[Modding:Object data|ObjectInformation.xnb]]
 
** See [[Template:Edibility]] for details
 
** For inedible items, specify <samp>edibility=-300</samp> or <samp>edibility=inedible</samp>. Or if it is an item that nobody would ever expect to be able to eat, omit the line entirely (to remove the section from the infobox)
 
 
 
* '''sellprice = ''sellprice'''''
 
** Base price of the item, as extracted from [[Modding:Object data|ObjectInformation.xnb]]
 
** Use <samp>profession</samp> to list all relevant price bonuses
 
 
 
* '''type = fruit, vegetable'''
 
** Only recognized values are fruit and vegetable
 
** Causes information on derived Wine, Jelly, Juice, and Pickles to be automatically added to the infobox
 
 
 
* '''quality = ''values'''''
 
** A list of quality values (Normal, Silver, Gold, Iridium) that are valid for this item. Default value is <samp>Normal, Silver, Gold</samp>
 
 
 
* '''iridium = true'''
 
** Set iridium to true to add <samp>Iridium</samp> to the list of qualities.
 
** Easier to do by including Iridium as a value for <samp>quality</samp>; <samp>iridium</samp> parameter only provided for consistency with other templates.
 
 
 
* '''profession = ''values'''''
 
** A comma-separated list of all professions that adjust the price of this item.  See [[Template:Infosection price]] for a list of valid entries.
 
* '''seed = ''item_name'''''
 
** The name of the seed from which a crop item grows; only relevant for crops
 
** Should be a plain text name; will be automatically converted into a link
 
 
 
* '''season = ''season'''''
 
** The name of the season(s) when this item is available; if multiple seasons are possible, they should be comma-separated
 
** Possible values are: <samp>Spring, Summer, Fall, Winter, All Seasons</samp>
 
** Values should be plain text (no links, no icons); template will automatically apply formatting
 
** See [[Template:Season]] for details.
 
** For items which are obviously not dependent upon the season (furniture, minerals, etc.), this line should be omitted entirely (to remove the section from the infobox).
 
 
 
* '''growth = ''days'''''
 
** Only relevant for crops; number of days to grow (without any fertilizers, etc.)
 
** The text should not just be a number, but should also include "days", e.g., <samp>growth=4 days</samp>
 
 
 
* '''buff = ''buff'''''
 
** A list of all buffs that are obtained when eating this item, including magnitude of bonus
 
** Entries should be fully formatted (with links)
 
 
 
* '''buffduration = ''duration''
 
** The duration of any buffs obtained when eating this item. [[Template:Duration]] will automatically be called to add a duration icon; no other formatting is applied to the input value.
 
 
 
* '''craftingstation = ''name'''''
 
** The name of the equipment necessary to produce this item.
 
** Use the name template, e.g., <samp>craftingstation=<nowiki>{{name|Preserves Jar}}</nowiki></samp>
 
 
 
* '''ingredients = ''values'''''
 
** List of all ingredients / source items necessary to produce this item
 
** The [[Template:Name|Name]] template should be used to format each item name and specify the quantity necessary
 
 
 
* '''recipe = ''value''
 
** Where the player obtains/learns the recipe necessary to produce this item
 
 
 
* '''crafttime = ''value'''''
 
** Time necessary to produce this time
 
 
 
* '''image2 = ''value''''', '''image3=''value''''', '''image4=''value'''''
 
** Only provided for backwards compatibility; better to provide multiple image names to <samp>image</samp>
 
 
 
* '''image2spacing = true'''
 
** Set to true to add horizontal space between multiple images
 
 
 
* '''is_artisan=true'''
 
** Set to true if this item is an artisan good; set to 0 if item is not.
 
** Default value is automatically set to true if 'artisan goods' is listed in <samp>source</samp>
 
** Only relevance is wording used in a couple places on template
 
** Title of final section of infobox is "Artisan Goods" if true; "Crafting" if not
 
** Label used for <samp>crafttime</samp> parameter is "Processing Time" if true; "Time to Craft" if not
 
 
 
* '''eng = ''item_name'''''
 
** English equivalent of <samp>name</samp>.  Only relevant on non-English wikis
 
 
 
* '''xp = ''values'''''
 
** XP points (and type of XP) gained when item is harvested/caught etc.
 
 
 
* '''fishingxp = ''values'''''
 
** Deprecated.  Use <samp>xp</samp> instead.
 
 
 
* '''price_ncols = ''ncols'''''
 
** Set to 1 to force standard (non-artisan) prices to be displayed vertically, in all right-hand column; set to 2 or 3 to force prices to be displayed horizontally.
 
 
 
* '''artisan_item = ''values''''' and all other '''artisan_*****''' parameters
 
** If artisan_item is set, a second grid of prices will be displayed showing prices for items derived/created from the primary item.
 
** <samp>artisan_item</samp> should be a comma separated list of the names of derived/crafted/artisan items to be included in the price grid
 
** The variables are all passed to [[Template:Infosection price]], which generates the actual price grid, using <samp>artisan=true</samp>.  For complete documentaton of the parameter meanings see Infosection price. The parameters recognized by Infobox, and the equivalent parameters in Infosection price, are:
 
*** artisan_item -> item
 
*** artisan_link -> link
 
*** artisan_price -> price
 
*** artisan_prof -> prof
 
*** artisan_qual -> quality
 
*** artisan_ncols -> ncolumns
 
 
 
* '''custom_price = ''template'''''
 
** If custom_price is set, it provides the entire content of the price section of the infobox (both standard prices and artisan prices).
 
** Typically custom_price is assigned one or more template calls to [[Template:Infosection price]], which handles the word of generating the content.
 
** For an example, see [[Salmonberry]].
 
** This allows all the parameters/functionality of Infosection price to be used to create fully customized price sections, for items that have non-standard needs.
 
 
 
===Examples===
 
{{Infobox
 
|name            = Corn
 
|image          = Corn.png
 
|description    = {{Description|Corn}}
 
|source          = Farming
 
|season          = [[Spring]]
 
|craftingstation = {{name|Preserves Jar}}
 
|ingredients    = {{name|Fish|13}} {{name|Tomato Seeds|13}}
 
|edibility      = 10
 
|type            = vegetable
 
|sellprice      = 14
 
|iridium        = true
 
|profession      = Rancher,Blacksmith
 
}}
 
The code below generates the infobox shown to the right.
 
<pre>{{Infobox
 
|name            = Corn
 
|image          = Corn.png
 
|description    = {{Description|Corn}}
 
|source          = Farming
 
|season          = [[Spring]]
 
|craftingstation = {{name|Preserves Jar}}
 
|ingredients    = {{name|Fish|13}} {{name|Tomato Seeds|13}}
 
|edibility      = 10
 
|type            = vegetable
 
|sellprice      = 14
 
|iridium        = true
 
|profession      = Rancher,Blacksmith
 
}}
 
</pre>
 
 
 
{{clear}}
 
{{Infobox
 
|name            = Corn
 
|location        = [[Pelican Town]]
 
|image          =
 
|description    = {{Description|Green Bean}}
 
|seed            = [[Radish Seeds]]
 
|season          = Spring
 
|growth          = 6 days
 
|buff            = {{name|Foraging|+2}}{{name|Defense|+2}}
 
|buffduration    = 7m 41s
 
|craftingstation = {{name|Preserves Jar}}
 
|ingredients    = {{name|Fish|13}} {{name|Tomato Seeds|13}}
 
|edibility      = 10
 
|sellprice      = 14
 
|profession      = Tapper
 
|quality        = false
 
}}
 
The code below generates the infobox shown to the right.
 
<pre>
 
{{Infobox
 
|name            = Corn
 
|location        = [[Pelican Town]]
 
|image          =
 
|description    = {{Description|Green Bean}}
 
|seed            = [[Radish Seeds]]
 
|season          = Spring
 
|growth          = 6 days
 
|buff            = {{name|Foraging|+2}}{{name|Defense|+2}}
 
|buffduration    = 7m 41s
 
|craftingstation = {{name|Preserves Jar}}
 
|ingredients    = {{name|Fish|13}} {{name|Tomato Seeds|13}}
 
|edibility      = 10
 
|sellprice      = 14
 
|iridium        = true
 
|profession      = Tapper
 
|quality        = false
 
}}
 
</pre>
 
<includeonly>[[Category:Infobox templates]]{{Addlanglinks}}</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
 

Latest revision as of 18:30, 16 December 2022

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"
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)