Template:Infobox Item/doc
The standard infobox for an item.
Standard parameters
This template uses Module:Infobox, and as such the following standard parameters apply.
Versioning
This template supports versioning. To make a versioned infobox, simply add version#
parameters, starting at 1 and increasing until all required versioned are covered. The value of the version parameter is the name given to the version, which applies to the button/option to select the version, as well as to any SMW subobjects used.
For example, |version1=used|version2=broken
.
Other parameters can (and at least some should) be versioned, and can be done by appending corresponding integers to the parameter name (e.g. |name1=Superior tetsu body|name2=Superior tetsu body (broken)
).
If a version name is set to a value that results in an invalid name for a subobject, the subobject name will be modified and Category:Pages with an invalid subobject name will be added to the page.
By default, multi-version infoboxes use 1-based indexes as the switch IDs. If multiple multi-version infoboxes or Template:Switch infoboxes exist on the same page, this can cause conflicts. If needed, you can manually specify switch IDs using the switch_id#
parameter (e.g. |switch_id1=alt1|switch_id2=alt2
). For more info, see Template:Switch infobox § Specifying switch IDs.
smwname
This sets the Semantic MediaWiki subobject(s) that the infobox (or current infobox version) should set the parameters into. This is only required when the infobox version name is not the intended destination of semantic properties, or if an unversioned infobox needs to set properties into a specific subobject (e.g. when versioned and unversioned infoboxes (of different types, like Item and Bonuses) are used on the same page).
By default if the page has versions, properties are set into named subobjects, where the names are the version names; if the page does not have versions, the properties are set on to the page itself. Setting smwname overrides the default behaviour - the properties will be set to the specified subobjects and only the specified subobjects.
Multiple subobjects can be specified by separating the subobject names with the broken bar ¦
- the properties will be set in all of the subobjects specified.
smwname can be versioned to change where specific infobox versions set the properties.
__dump__
If __dump__
is present with any value, rather than displaying the infobox as normal, a string version of the infobox object is dumped to the page. This is for debugging the infobox and should only be used by previewing the page; it should never be saved in a mainspace page. Setting this adds Category:Dumping infoboxes to the page.
Specifically, this applies when the infobox is converted to a string, which will always occur when the module finally returns, but may occur earlier in the code. The object is dumped using mw.dumpObject(box)
. Dumping will not prevent a script error occuring.
Parameters
name
The name of the item as it appears in game, exactly.
aka
Alternative name of the item. Avoid duplicate and derivative alternates.
image
The inventory icon of the item.
release
Release date of the item as when it became technically available; e.g. the release date of Treasure Hunter items are the date the promo begins, even though they entered the game config earlier.
Format:
|release = [[D MMMM]] [[YYYY]]
update
Name of the update post associated with the item's release. Do not include Update:
prefix or square brackets.
Format:
|update = PAGENAME
removal
Date when the item was removed from the game. Only applicable for deleted content; i.e. items that are discontinued but still exist should not use this parameter.
Format:
|removal = [[D MMMM]] [[YYYY]]
removalupdate
Name of the update post associated with the item's removal. Do not include Update:
prefix or square brackets.
Format:
|removalupdate = PAGENAME
members
Whether or not this item is members only.
quest
If the item is strictly a quest item, link the quest it is from.
tradeable
Whether or not the item can be traded with other players.
Accepted values (case insensitive):
yes
no
restricted
(see: Restricted trade items; aka 1:1)
bankable
Whether or not this item may be banked. This parameter will be hidden unless it is set to no
, and should be omitted if unused.
stacksinbank
Whether or not this item will stack with itself when inside the bank. This parameter will be hidden unless it is set to no
, and should be omitted if unused.
lendable
Whether or not this item can be lent to other players via the Item Lending system. This parameter will be hidden unless it is set to yes
, and should be omitted if unused.
equipable
Whether or not this item can be equipped.
stackable
Whether or not this item will stack in the inventory.
disassembly
Whether or not this item may be disassembled.
Accepted values (case insensitive):
yes
(will create a link to the{{Disassemble}}
template at#DisassemblyT
)no
restricted
(item can only be obtained in a disassembly-free area)n/a
(item no longer exists or is otherwise impossible to obtain)
noteable
Whether or not the item may be turned into a bank note. This parameter will be hidden unless it is set to yes
, and should be omitted if unused.
edible
Whether or not the item may be ingested, either as an edible item or a potable beverage. This parameter will be hidden unless it is set to yes
, and should be omitted if unused.
value
The internal value of the item. This parameter only accepts numbers.
convert
The amount of coins received for converting the item when won on Treasure Hunter or the discontinued Squeal of Fortune.
alchable
Whether or not the item may be alched (Low Level Alchemy / High Level Alchemy). This parameter will serve no function unless it is set to no
, and should be omitted if unused. The default behaviour of items is alchability is true.
Accepted values (case insensitive):
no
alchmultiplier
An override for the alchemy multiplier that defines the relationship between value and high alchemy, such that for multiplier:
Low alchemy is always assumed to be two-thirds of the high alchemy value.
The alchmultiplier
parameter only accepts numbers and will default to 0.6
. It should generally be unused and omitted.
destroy
The destruction behaviour of the item or its corresponding message. Items that are dropped should pass the value Drop
. Items that are destroyed should pass the text of the confirmation dialogue that is prompted when the "destroy" option is chosen.
actions
A comma-separated list of actions available for the item when it is right-clicked (or long-pressed on mobile) in the inventory. If no such actions exist, the string no
should be used.
actions_ground
A comma-separated list of actions available for the item when it is right-clicked (or long-pressed on mobile) on the ground. If the actions are the default ones, "Take, Examine", the parameter should be omitted. Note that the "Walk here" action is usually an action on the game square, not on the item.
actions_equipped
A comma-separated list of actions available for the item when it is right-clicked (or long-pressed on mobile) while equipped/worn. If no such actions exist, the parameter should be omitted.
actions_bank
A comma-separated list of actions available for the item when it is right-clicked (or long-pressed on mobile) in the backpack section of the bank interface, excluding all variants of the "deposit" action and the "examine" action. If no actions that aren't excluded exist, the parameter should be omitted.
actions_currency_pouch
A comma-separated list of actions available for the item when it is right-clicked (or long-pressed on mobile) while in currency pouch. If no such actions exist, the parameter should be omitted.
kept
Whether or not the item is kept on death.
Accepted values (case insensitive):
reclaimable
(items that are reclaimable from Death's office)never
(items always lost on death)always
(items always kept on death, unless inside the wilderness)alwaysinclwild
(items always kept on death, including when inside the wilderness)dropped
(items that are dropped to the floor on death; generally minigame or boss fight items)safe
(items that can only exist inside safe death areas, and are thus always kept)
ikod
Override for the item's value with Death. This is the first number listed in the item tooltip in the items kept on death interface.
Module priority in choosing value:
ikod
gemw
(Grand Exchange value)value
reclaim
Override for the item's reclaim value with Death. This parameter only accepts number values, and should be omitted if unused. The default behaviour is that which is described in the comments of the keptondeatharg
function (search "Death formula").
exchange
Whether or not this item is tradeable on the Grand Exchange. This parameter may be omitted; however, its existence in the code may help lead other editors.
Accepted values (case insensitive):
gemw
(note that "yes" will not serve the same function)no
(do not add to untradeable items; only applies for tradeable items not in the Grand Exchange. See: Category:Non-GE items for more.)
gemwname
Use this parameter if the item's name
value is different from the location of its Exchange page on the wiki.
weight
The weight of the item in kilograms (kg) using decimal point if applicable (e.g. 0.476
). This parameter only accepts numbers; the "kg" should be omitted when written in the source code.
Note that weights in RuneScape have a precision of up to 3 places, or 1 gram (1 g).
examine
The examine text of the item as it appears in game exactly.
restriction
Defines the location restriction applied to an item, to ensure correct filtering in the armoury. An item (or more accurately, a specific version of item) is considered restricted if the only way to obtain/retain it is within the bounds of the definition and not before/after/elsewhere. For example, Flax cap-ice-i-tor can only be obtained and is removed before the end of the Back to the Freezer quest (making it quest restricted); Ancient mace (Dominion Tower) is only available during Dominion Tower (making it minigame restricted).
Can be one of the following possible values:
surface
- default - parameter can be removed for this value - can be used to override the quest parameterquest
- items that only appear in quests; automatically set by the quest parameterminigame
- items that only appear within minigames, not elsewheredungeoneering
- items that only appear within Daemonheimremoved
- items that have been removed from the gamelimited
- items that are only available by participating in Treasure Hunter or Squeal of Fortune
calcvalue
Defines a value for items that are not tradeable on the GE. Eventually to replace the same param in {{Disassembly}}
. Can either be a fixed number or use template/parser functions. Note that all {{
should be replaced with {
, }}
should be replaced with }
. In the event that }}
is still present add a space between the brackets: } }
. Finally replace all |
with ¦
. The resulting wikitext version as well as the fully parsed value number are visible in advanced data. Will also be used on recipe templates.
Encode wikitext string to calcvalue
string:
name=str|type=string|value=|range=|entersublist=calc|size=80 |
name=buttoncalc|type=button|value=Submit|sublist=calc |
parse(calcout, "{"+"{#Invoke:Calcvalue encode|main|string = <nowiki"+">" + str + "<"+"/nowiki>}}")
id
The item's internal ID in the game config. Every item has a single ID, though multiple versions of an item may be listed in a single infobox.
rscid
The item's internal ID in the game config for RuneScape Classic. This parameter should only exist on the few items that were exclusive to RuneScape Classic; it should not appear on any newly created articles.
Deprecated parameters
high
Defines the high alchemy value of an item, overriding all other calculations. This parameter should be omitted in favour of either the general formula, or the alchmultiplier
parameter unless absolutely necessary.
low
Same as above.
store
The price at which an item is sold by stores. This parameter should be deleted in favour of a dynamic listing with {{Store locations list}}
. This parameter will no longer display any value.
seller
Deleted along with the store
parameter. This parameter will not display, nor will it add any tracking categories.
currency
Deleted along with the store
parameter. This parameter will not display, nor will it add any tracking categories.
tooltip
Custom tooltips that the item has. This parameter will not display, nor will it add any tracking categories.
Defining multiple items at once
Infobox Item supports the ability to display multiple items with a single template. Additional items will be stored quietly and displayed when prompted by user input. Proper display of the switchfobox version requires the reader to have JavaScript enabled.
Additional items are defined with the respective version#
parameter. The value passed to this parameter will also define its label to the reader. The module will look for the highest version in an unbroken sequence; i.e. the module begins its search at version1
and will count up until version#
does not exist.
When a version is defined, other parameters may be defined for it by using param#
, where #
is the number of the version. If undefined, param#
will default to the value of the unqualified param
.
Blank infobox
{{Infobox Item |name = |image = |release = |update = |members = |quest = |tradeable = |equipable = |stackable = |disassembly = |noteable = |value = |destroy = |actions = |kept = |exchange = |examine = |weight = |id = }}
Complete infobox with comments
{{Infobox Item |name = <!-- The ingame name of the item --> |image = <!-- [[File:ItemName.png]] --> |release = <!-- [[D MMMM]] [[YYYY]], e.g. [[1 January]] [[2016]] --> |update = <!--PAGENAME, of the update without the Update: prefix --> |members = <!-- yes/no --> |quest = <!-- [[Quest name]] --> |tradeable = <!-- yes/no/restricted --> |equipable = <!-- yes/no --> |stackable = <!-- yes/no --> |disassembly = <!-- yes/no/restricted or N/A --> |value = <!-- value of the item --> |destroy = <!-- Either no, or the destroy message of the item --> |actions = <!-- Either no, or a list of actions for the item in inventory --> |kept = <!-- reclaimable/never/always/alwaysinclwild/dropped/safe --> |examine = <!-- examine text --> |weight = <!-- weight of the item in kg --> |id = <!-- the internal game id of the item. --> <!-- Properties that can be omitted if not applicable --> |removal = <!-- [[D MMMM]] [[YYYY]], e.g. [[1 January]] [[2016]] --> |removalupdate = <!--PAGENAME, of the update without the Update: prefix --> |noteable = <!-- yes if noteable --> |actions_ground = <!-- list of actions for the item on ground --> |actions_equipped = <!-- list of actions for the item when equipped --> |actions_bank = <!-- list of actions for the item when in the backpack section of the bank interface, excluding all variants of the "deposit" action and the "examine" action --> |actions_currency_pouch = <!-- list of actions for the item when currency pouch --> |exchange = <!-- gemw if on the grand exchange, otherwise omitted --> |lendable = <!-- yes if lendable --> |edible = <!-- yes if edible --> |alchable = <!-- no if not alchable, yes by default --> |ikod = <!-- amount of gp, only if needed --> |reclaim = <!-- amount of gp, only if needed --> |rscid = <!-- id of the item in runescape classic --> |stacksinbank = <!-- Does the item stack in the bank? Yes by default. --> |bankable = <!-- can the item be banked? Yes by default --> |convert = <!-- value obtaine when converting. (Treasure Hunter/Squeel of fortune) --> |alchmultiplier = <!-- High alch multiplier. Always 0.6 except for some rare exceptions --> |aka = <!-- Commonly recognised alternative names --> |calcvalue = <!-- A value for items not traded on the GE, may be the value of items to make it etc. A number or encoded wikitext string (see above). --> }}
Template data
Show/hide template's data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date. An infobox for items.
|