Template:Edibility/doc

Description
This template calculates and displays an item's Health and/or Energy values, based on the item's base edibility, for all relevant item qualities (Normal, Silver, Gold, and/or Iridium). The Health and Energy values should match both those displayed in-game on the item's tooltip and the effect on the player in-game when consumed. The base edibility of an item can be extracted from the game's ObjectInformation.xnb file.

The default output is a single vertical column, with one value per line. Each value is diaplayed as a health/energy icon with superimposed quality star (see Template:Quality), the number, and "Health"/"Energy" links. Optionally, a specified item image can be added to each line. Or a grid-format output can be selected, with all data for a given quality displayed on a single line.

Additionally, the output contains a hidden sortkey to allow a table column containing multiple instances of this template to be sorted correctly.

Syntax
Basic usage:

Complete argument list:

Parameters
There is one unnamed, required parameter, edibility. All other parameters are named and optional. Default value for all arguments is empty, unless specified otherwise.

See Template:ParseInputQuality for more information on quality-related parameters.


 * edibility
 * First unnamed parameter, required
 * Numerical value providing base ediblity, as taken from the game data files. Values less than 0 imply poison.
 * Inedible items can be handled either by setting edibility to -300 or by setting it to Inedible
 * Other text values are possible, but will be simply displayed as is


 * quality=values
 * List of quality values to display. Default value is Normal, Silver, Gold. This is a change from previous versions of this function, where default value was 'normal' (and normal was always shown unless hide was used to force it to be hidden).
 * Set quality to true to get Normal, Silver, Gold, or
 * Set quality to false or Normal to get Normal, or
 * Set quality to one or more specific quality values
 * iridium is disabled by default. Enable by explicitly adding iridium to the listed quality values or by setting iridium=true
 * Note that the template may opt to ignore any quality values in cases where the display information is identical for all qualities (e.g. edibility=0, edibility=inedible, etc.). In these cases, only one entry will be displayed, using quality=Normal


 * statistics=values
 * List of statistics to display. Default value is Energy, Health
 * Use for example statistics=Energy to display a column of only energy values.
 * Note that the template may opt to ignore any statistics values in cases where health data is irrelevant, e.g. edibility=inedible, poisons.


 * iridium=true
 * Set iridium to true to display iridium values.
 * Also recognizes iridium=false</tt> as equivalent to hide=iridium</tt> (although it's easier to just omit the entire iridium parameter)


 * hide=values
 * List of quality values to hide, as a comma-separated list of individual values.
 * In case of conflict, hide overrides any other input.
 * For backwards compatibility hide=base</tt> is recognized as equivalent to hide=normal, but this is deprecated.


 * size=px
 * Size of icons in pixels. Default value is 24
 * Only the number should be provided (do not append "px").


 * grid=true
 * Set grid to true to request a compressed grid-style layout, i.e., health and energy side by side on the same line. The Energy and Health text/links are removed.


 * item=item_name
 * Name of item being displayed. There should be a corresponding image named File:item_name.png</tt>.
 * This parameter adds an item icon, overlaid with the quality star, to the start of each line. The health/energy icons no longer have a superimposed quality star and are made slightly smaller.
 * On non-english wikis this should normally be the english item_name, unless there's a language-specific image of the item, e.g., Large_Milk_FR</tt> should be used in French instead of Large_Milk</tt>. To provide the translated item name, see alt</tt>

Examples
Note This result is different than in earlier versions of the template (previously only normal was shown)

Only one set of values is displayed, in spite of quality=true, because values are the same for all qualities.

Note This result is different than in earlier versions of the template (previously hide=normal would have to be specified to get this result).

hide=iridium</tt> takes precedence, so iridium is not displayed.