Template:Infobox Item

From RuneRealm Wiki
Jump to navigation Jump to search
Template:Infobox Item
? (edit)
Examine? (edit)
Properties
Tradeable? (edit)
Equipable? (edit)
Stackable? (edit)
Options? (edit)
Values
Value? (edit)
High alch? (edit)
Low alch? (edit)
Weight? (edit)
Advanced data
Item ID? (edit)
Template documentation
This documentation is transcluded from Template:Infobox Item/doc. [edit] [history] [purge]
Template:Infobox Item invokes function main in Module:Infobox Item using Lua.
Template:Infobox Item invokes Module:Infobox Item using Lua.


Standard infobox parameters

This infobox uses Module:Infobox, which provides a number of standard parameters.

Versioning

This infobox supports switching between multiple versions. Each version needs to have a name defined in a parameter called version#, numbered sequentially starting from 1. For all parameters that have different values, a number can be appended to the end of each parameter name to define the value for each version. Parameters without a version number will be shared between all versions.

For example, if the name of version 2 is called "Bob", you should define |name2 = Bob.

Linking

You can link to a page and have an alternative infobox appear by using a hash value, as if you were linking to a section. The hash value is the version name, as defined by the relevant version# parameter. For example, to link to the variant of a switch infobox with |version3 = Quest, you can use [[Example#Quest]].

Alternative versions are not visible or accessible when Javascript is disabled.

defver

If defver is defined, the infobox will switch to the specified version when the page is loaded. For example, |defver = 4 will automatically select the 4th infobox version.

smwname

This overrides the name of the Semantic MediaWiki subobject that the infobox will set the parameters into. By default, an infobox with multiple versions will save properties into subobjects with the same name as the version name. This parameter only needs to be set if the version name is different from the desired subobject name, or if an unversioned infobox needs to set properties of a specific subobject (for example, when versioned and unversioned infoboxes of different types, like Item and Bonuses, are used on the same page).

This is necessary when a version name would otherwise be an invalid SMW subobject name. The value of smwname is also not permitted to be an invalid subobject name. A subobject name must not violate the following rules:

  • The first 5 characters of the name must not contain a period (.).
  • The name must not be the number zero (0).
  • The name must not be the empty string.


If the infobox does not have multiple versions, SMW properties would normally be set on the page itself. Setting smwname overrides this default behaviour and the properties will be only be set to the specified subobjects and not the page itself.

Multiple subobjects can be specified by separating the subobject names with the broken bar character (¦). The properties will be set in all of the subobjects specified.

For example, if the infobox has |version2 = H.A.M. member, this would cause an invalid subobject name due to having a period within the first 5 characters. The infobox should therefore override the smwname using |smwname2 = HAM member or something similar.

Suppressing SMW

Setting |smw = No will suppress all SMW output for the infobox.

Setting |smwX = No will suppress all SMW output for version number X.

__dump__

This parameter is used only for debugging an infobox. If __dump__ is present with any value then a string version of the infobox object is dumped to the page, rather than displaying the infobox as normal. This should only be used when previewing the page and must never be saved in a mainspace page. Setting this adds Category:Dumping infoboxes to the page.

Specifically, this shows the result at the time the infobox is converted to a string. This will always occur when the module finally returns, but may instead occur earlier in the code. The object is dumped using mw.dumpObject(box). Dumping will not prevent a script error occurring.


Parameters

name

The name of the item exactly as it appears in game (identical case and spacing).

image

The inventory image of the item, formatted as [[File:Image.png]]. Ideally in PNG format (or GIF format if the image is animated). For stackable items with multiple images, all images should be included in increasing order.

release

Release date of the item. Should follow the format [[DD Month]] [[YYYY]].

update

Update page that the item was released with. Do not include brackets ([[ & ]]) or the Update: prefix.

removal

(Optional) Removal date of the item. Should follow the format [[DD Month]] [[YYYY]].

removalupdate

(Optional) Update page that the item was removed with. Do not include brackets ([[ & ]]) or the Update: prefix.

aka

(Optional) Other names commonly associated with the item.

members

Whether or not the item is a members only item. Must be the string "Yes" or "No".

quest

See Category:Quest items for guidelines. Also applicable for miniquests.

The possible values for this field are:

  • [[''Quest name'']]
  • No

tradeable

Whether the item is tradeable between players. For example, Barrows gloves are bought from a "shop" (Culinaromancer's Chest), but these gloves cannot be sold to other players as the Barrows gloves are not tradeable.

Examples:

  • Yes
  • No

bankable

(Optional) Whether the item can be put in the bank. Can omit if "Yes", otherwise must be the string "Yes" or "No".

stacksinbank

(Optional) Whether the item will stack in one bank space. Can omit if "Yes", otherwise must be the string "Yes" or "No".

placeholder

(Optional) Whether this item can be removed with a placeholder in the bank. (Not currently used)

equipable

Whether the item is equipable. For instance, a rune sword may be wielded (Yes), while a tinderbox may not be equipped (No). Must be the string "Yes" or "No".

stackable

Whether the item stacks in the player's inventory, in its unnoted form. For example, runes and arrows are stackable, while pickaxes are not. Must be the string "Yes" or "No".

noteable

(Optional) Whether the item can be withdrawn from the bank as a note. Can omit if "Yes", otherwise must be the string "Yes" or "No".

edible

(Optional) Whether the item is edible. This should not be added on every page, only pages describing items which are actually edible or easily mistaken as edible; i.e. shark (edible) or cooking apple (easily mistaken as edible). If omitted, the field will be hidden.

options

The right-click options for an item while held in the Inventory. The options "Use" and "Examine" should not be listed here.

wornoptions

(Optional) The right-click options for an item while it is equipped by the player, as visible in the Worn Equipment tab. The options "Remove" and "Examine" are the default, so simply put "No" if there are no options besides these.

destroy

(Optional) Text displayed as a final warning when a player tries to destroy the item. Destroy is an option for some items from quests or discontinued items and holiday drops. Certain items may behave differently when it is dropped, and this behaviour should be included in the field with - as a separator. For example, an explosive potion explodes when dropped.

Examples:

  • The Oneiromancer might be able to help you get another. - Lunar staff
  • Drop - Explodes

examine

The examine text exactly as it appears in game (identical case, spaces, typo, etc). The text is obtained through the contextual menu "Examine" option.

value

The value of the item as set by Jagex. Commas are not necessary as they are included automatically. The high and low alch values are computed from this value. Must be a number.

alchable

(Optional) Whether or not the item can be alchemised. Can be omitted to default to "Yes". Must be the string "Yes" or "No".

weight

The item's weight. The weight appears in the Equipment Stats submenu from Worn Equipment interface. The weight unit ("kilogram", "kg") need NOT be added to this field, as it is added automatically. For special weight-reducing items which has "negative" weight, the negative "-" should be included in the field.

Examples:

  • 2
  • -4.5

respawn

(Optional) The item's respawn time in ticks.

exchange

(Optional) Should be set to "Yes" if the item can be traded on the Grand Exchange. May be omitted to default to "No". For items that only appear in seasonal Deadman Mode worlds, use the value "DMM".

gemwname

(Optional) Should be included if the wiki exchange article for the item has a different name than the exact in-game name set in the name parameter. This occurs when there are multiple items with the same name on the grand exchange. Should be set to the name of the wiki exchange article for the item, or omitted if this is identical to the in game name.

id

The item's internal game ID. Must be a comma separated list of IDs. Beta IDs should be prefixed by "beta". Items that have been removed from the cache should have IDs prefixed by "hist".

Example values for this field:

  • 1234
  • 123,124,125
  • beta22326
  • hist9662,hist9663

Quick copy

{{Infobox Item
|name = 
|image = 
|release = 
|update = 
|removal = (Optional)
|removalupdate = (Optional)
|aka = (Optional)
|members = 
|quest = 
|tradeable = 
|bankable = (Optional)
|stacksinbank = (Optional)
|placeholder = (Optional)
|equipable = 
|stackable = 
|noteable = (Optional)
|edible = (Optional)
|options = 
|wornoptions = (Optional)
|destroy = 
|examine = 
|value = 
|alchable = (Optional)
|weight = 
|respawn = (Optional)
|exchange = (Optional)
|gemwname = (Optional)
|id = 
}}