Template:Infosection price/doc

This template displays a full set of item prices -- including both quality and profession factors. It is designed specifically for use within Template:Infobox and other Infobox templates.

Syntax
Typical usage:

Other standard parameters: | artisan  = true | auto     = true | srcprice = source_base_price | ncolumns = ncolumns | addtable = true | iridium  = true | hide     = values | comboprof = value

Advanced parameters: | itemcell[#] = item_name | multcell[#] = prof_mult | qualcell[#] = values | qual[item] = values | price[item] = base_price | image[item] = image

Standard Parameters
All parameters are named and optional, although for mimimal usefulness at least item and price are needed. Default value for all arguments is empty, unless specified otherwise.


 * prof = values
 * A comma-separated list of all professions and/or price-adjustment factors for which prices should be calculated/displayed.
 * Default value is Base, meaning one data cell displaying prices without any profession-related adjustments
 * Should normally start with Base so that the base prices are displayed.
 * Each entry in prof is displayed in a separate data cell, and therefore prof effectively defines the size of the displayed section.
 * Duplicate entries are allowed in the list, especially when using parameters such as itemcell[#].
 * All recognized values are: Base, Rancher, Tiller, Artisan, Forester, Tapper, Blacksmith, Gemologist, Fisher, Angler, Spring Onion Mastery, Bear's Knowledge.
 * Non-standard values are allowed, in which case the name will be displayed without an icon. By default, the price multiplier of an unrecognized profession is 1, but multcell[#]</tt> can be used to define a multiplier.


 * item = item_name
 * Name of item being displayed. There should normally be a corresponding image named File:item_name.png</tt>.
 * But in cases where the image name differs from the item name, item</tt> should specifically be the item name, and image[item]</tt> can be used to specify the image name.
 * Generates the icons displayed in the table using Template:Qualityprice and Template:Quality
 * item_name</tt> can be a comma-separated list of multiple items. In this case, all listed items are displayed in all data cells.


 * price = base_price
 * The base price of item_name</tt>.
 * This price can be left missing if srcprice</tt> is specified (see details on srcprice</tt> below) -- if srcprice</tt>/auto</tt> are not used, Cannot be sold will be displayed for missing values.
 * In special-use cases, price</tt> may be a string value (e.g., for generic Wine). In this case, the string is printed as-is for the base price, and the template attempts to auto-generate an appropriate string for each profession
 * Even if multiple items are provided in item</tt>, price</tt> is expected to be a single value of price that is the default value used for all items. srcprice</tt> can be used to override the default price</tt> as necessary, or else price[item]</tt> can be used to provide per-item base prices.


 * quality = values
 * A list of all quality values to display, separated by commas.
 * Recognized values are <tt>Normal, Silver, Gold, Iridium</tt>
 * In standard usage, the values are the exact individual qualities to display. However, the template will also recognize all the parameters and special values used by other templates; see Template:ParseInputQuality for details.
 * <tt>quality</tt> is the default list of qualities used for all items listed in <tt>item</tt>. If multiple items are being displayed and different qualities are needed for each item, <tt>auto</tt> can be used to automatically set the quality for certain items (Wine, Pale Ale, Beer, Mead, Juice, Jelly, Pickles, Roe, Aged Roe, Caviar). Also, <tt>qual[item]</tt> cna be used to provide per-item qualities.


 * artisan = true
 * Set to true if the displayed item(s) are derived products being displayed as part of another item (the source item) infobox.
 * Take for example <tt>item=Cheese</tt>. Artisan should not be set for info displayed on Cheese.  Artisan should be set for info displayed on Milk (or Large Milk)
 * Causes the section header to always be shown, using "Artisan Sell Prices" instead of "Sell Prices"; forces display to always use Template:Qualityprice so the item icon is always shown.
 * Does not necessarily mean that the item(s) are truly artisan goods, and does not influence the displayed professions.


 * auto = true
 * Set to true if price/quality should be automatically set for recognized items.
 * This parameter is passed to Template:Qualityprice, which is responsible for all the automatic values.
 * Prices can only be automatically set if <tt>srcprice</tt> is also provided.


 * 'srcprice = source_base_price''
 * The base price of the item used to create <tt>item</tt>. Only used if <tt>auto</tt> is also set.
 * This should be the base price of the fruit used to create Wine or Jelly; the vegetable used to create Juice or Pickles; or, the fish that spawned the Roe or Aged Roe.
 * Allows the <tt>price</tt> of the Wine, Juice, Pickles, Jam, Roe, or Aged Roe to be automatically calculated


 * ncolumns = ncolumns
 * Set to 1, 2, or 3 to specify number of columns that contain data cells. Default value is set automatically based on input.
 * 1 column means all data is in a single column on the right side of the table; the headers for all data cells are shown on the left side of the table.
 * 2 and 3 columns mean that the data cells are displayed horizontally across the table; the header for each data cell is shown above it.
 * Default is to set <tt>ncolumns</tt> to the number of entries in <tt>prof</tt>. But code will automatically switch to <tt>ncolumns=1</tt> if only one entry is being displayed in every cell (one item/cell, and one quality/item).
 * Note that the template assumes all data is being embedded within a standard infobox table, i.e., a table that is two columns wide. Any value of <tt>ncolumns</tt>>2 means that a secondary table is created that is embedded within the main infobox table.


 * addtable = true
 * Set to true only if template is being called outside of an infobox, and therefore is not already contained within a table. In particular, necessary to create examples as shown in this documentation.


 * iridium = true
 * Set iridium to true to add <tt>Iridium</tt> to the list of qualities.
 * Easier to do by including Iridium as a value for <tt>quality</tt>; <tt>iridium</tt> parameter only provided for consistency with other templates.


 * hide = values
 * Comma-separated list of quality values to hide.
 * Easier to do by just not listing them in <tt>quality</tt>; <tt>hide</tt> parameter only provided for consistency with other templates.


 * comboprof = prof
 * Special-use parameter to specify an additional profession that is combined with every entry listed in <tt>prof</tt>.
 * See Blackberry for an example of its usage -- where <tt>comboprof=Tiller</tt> is used to add a section with Tiller prices and combined Tiller/Bear's Knowledge prices.

Advanced Parameters
If details of the output need to be customized beyond what is possible using the standard parameters, the template allows most details to be customized either per cell or per item.

Per-cell settings allow the information in a given data cell to be customized, in other words, the information associated with each entry in the <tt>prof</tt> parameter list. Note that values with <tt>prof</tt> can be repeated as many times as necessary. <tt>cell1</tt> parameters target the first listed profession, <tt>cell2</tt> target the second, etc. This is used, for example, to generate the Roe/Aged Roe section of fish page using these parameters: | prof     = Base, Base, Artisan | itemcell1 = Roe | itemcell2 = Aged Roe | itemcell3 = Aged Roe This means the first cell shows Roe prices using no profession; the second cell shows Aged Roe prices using no profession; the third cell shows Aged Roe prices using the Artisan profession.

Available per-cell settings (where [#] should be replaced by any valid cell number, e.g., 1, 2, or 3) are:
 * itemcell[#] = item_name
 * A comma-separated list of one or more items to display in the cell, details same as <tt>item</tt>, but cell-specific
 * multcell[#] = prof_mult
 * A multiplier to apply to all prices displayed in the cell. Overrides any multiplier associated with the cell's profession (or can be used to assign a multiplier to a non-standard profession).
 * qualcell[#] = values
 * A comma-separated list of qualities to be displayed for all items in this cell. Details same as <tt>quality</tt>.
 * Hide/iridium parameters are not supported at the per-cell level -- all desired qualities must be listed in <tt>qualcell[#]</tt>; any qualities not listed will be excluded.

Per-item settings allow the information used for a given item to be customized everywhere that item is shown in the section. In the Roe/Aged Roe case this is used to provide a custom image for Roe, via: | imageRoe = Yellow Roe Note that the item name must exactly match how it appears in <tt>item</tt> or <tt>itemcell[#]</tt> -- capitalization must match, and any spaces must be left as is. For example, on Slime Egg, different prices are assigned to each color of Slime Egg using: |item = Green Slime Egg, Blue Slime Egg, Red Slime Egg, Purple Slime Egg |priceGreen Slime Egg  = 1000 |priceBlue Slime Egg   = 1750 |priceRed Slime Egg    = 2500 |pricePurple Slime Egg = 5000

Available per-item settings (where [item] should be replaced by any valid item name) are:
 * qual[item] = values
 * A comma-separated list of qualities to use for this item. Details same as <tt>quality</tt>.
 * Hide/iridium parameters are not supported at the per-item level -- all desired qualities must be listed in <tt>qual[item]</tt>; any qualities not listed will be excluded.
 * price[item] = base_price
 * The base price of this item. Details same as <tt>price</tt>.
 * image[item] = image
 * The image to display for this item. Should be the base name of the image, without the .png extension.

Examples
Price section for the Large Milk page. Result:

Proposed new price section for Blackberry, adding Tiller bonuses. Result. Note use of <tt>comboprof</tt> for second half of data.

Artisan goods section for Blackberry page. Result:

Artisan goods section on Pufferfish page. Uses multiple special features
 * <tt>itemcell[#]</tt> to display a different item in each data cell.
 * <tt>image[item]</tt> to use a custom image for Roe.
 * <tt>ncolumns=3</tt> overrides default (which would be <tt>ncolumns=1</tt>) -- want to use three side-by-side columns because standard fish price information is already in three-column format.