Template:Infobox Bonuses

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Template documentation
This documentation is transcluded from Template:Infobox Bonuses/doc. [edit] [purge]
Template:Infobox Bonuses invokes Module:Infobox Bonuses new using Lua.

Standard infobox for equippable items.

Standard parameters

This templates 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.

appliesto

This sets the 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 an appliesto 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.

appliesto 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

Note: All parameter values are case insensitive

requirements

The skill level requirements of the equipment; should use {{Skillclickpic}}, with multiple skills being separated by a comma. "None" should be used if no skill requirements exist.

class

The item's class, this can be easily found by looking at it in game. The possible values are:

  • Melee
  • Ranged
  • Magic
  • Hybrid
  • All
  • None

slot

The equipment slot in which the item is equipped. The possible values are:

  • Head
  • Neck
  • Cape
  • Body
  • Legs
  • Hands
  • Feet
  • Ammo
  • Ring
  • Aura
  • Pocket
  • Main or Main-hand or Mainhand or Weapon
  • 2H
  • Off-hand or shield
  • Off-hand weapon or OHW

Important: The last two sets of values are not interchangeable. Shields and off-hand weapons must have their parameter values defined separately for categorization purposes.

tier

The tier of the item. This is the value used in the formula here to give the item's stats. By default, rely on the armour value of armour and the accuracy of weapons. However, try to make sure the damage lines up too - remember, if the armour has tier :

  • Tank armour: armour bonus for tier , life points for tier (if , or for shields )
  • Power armour: armour bonus for tier , damage bonus for tier
  • PvP armour: armour bonus for tier , damage bonus for tier
  • Hybrid/all armour: armour bonus for tier

type

The type of item this is. This accepts a few specific values to define what the item is (all of the following accepted, aliases in the same bullet, comma separated):

  • Power armour, power
  • Tank armour, tank
  • PvP armour, pvp
  • Shieldbow
  • Defender
  • Repriser
  • Rebounder
  • Halberd
  • Shield
  • Cosmetic
  • Prevents attack

In addition to being displayed, this adds a category, and for armour ones, allows damage reduction calculation.

degrades

If this item degrades. If it does, enter the number of charges it has - see equipment degradation for more info on this. If charges are unknown, "Yes" can be used to show it does degrade. If it doesn't degrade, nothing should be entered (will hide it by default).

damage

The damage of the weapon. This applies to all handednesses of weapons - use the same parameter for main-hand, off-hand, and two-handed weapons. Leave blank if this is not applicable.

accuracy

The accuracy of the weapon. This applies to all handednesses of weapons. Leave blank if this is not applicable.

style

The combat style used by a weapon. Fill with the appropriate value or leave it blank / delete the parameter if this is not applicable. This parameter applies to both mainhand and off-hand items. Possible values are:

  • Crushing or Crush
  • Slashing or Slash
  • Stabbing or Stab
  • Throwing or Thrown
  • None

armour

The armour rating of a piece of equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

life

The life points boost given by a piece of a equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

prayer

The prayer bonus given by a piece of a equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

strength

The Strength bonus given by the piece of equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

ranged

The Ranged bonus given by the piece of equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

magic

The Magic bonus given by the piece of equipment. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

pvmReduction

The template will attempt to automatically calculate the damage reduction from the tier, type, and class. Use this parameter if the calculated PvM damage reduction is not correct. If it is correct, delete the parameter.

pvpReduction

The template will attempt to automatically calculate the damage reduction from the tier, type, and class. Use this parameter if the calculated PvP damage reduction is not correct. If it is correct, delete the parameter.

attack_range

Also accepts attack range (space instead of underscore)

The attack range of the weapon, where melee weapons are range 1, halberds 2, etc. Leave blank/delete if not applicable.

speed

Also accepts aspeed

The attack speed of the weapon. Fill with the appropriate value or leave it blank / delete the parameter if this is not applicable. Possible values are:

  • Slowest
  • Slow
  • Average
  • Fast
  • Fastest

image

An image of a player with the equipment on. Do not include the "File:" prefix and do not resize it. This size is determined through CSS.

| image = Abyssal whip equipped.png

If this parameter is missing, a category is added, except for pocket, ring, and ammo slot items. For other slots, setting it to no will prevent the category being added.

altimage

Same usage as image allowing for a second image.

isrecolour

Is the item a cosmetic recolour of another item (e.g. Category:Cosmetic change equipment). Primarily for filtering in the Armoury.

Deprecated parameters

These parameters are still supported by the template, but should ideally be replaced.

mainDamage

Replaced by damage

The damage output of a main-hand or two-handed weapon. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

mainAccuracy

Replaced by accuracy

The accuracy of a main-hand or two-handed weapon. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

offDamage

Replaced by damage

The damage output of an off-hand weapon. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

offAccuracy

Replaced by accuracy

The accuracy of an off-hand weapon. Fill with the appropriate number or leave it blank / delete the parameter if this is not applicable.

mainType and offType

Replaced by style

The damage type inflicted by that weapon of that hand. Currently does nothing.

image2

Replaced by altimage

Same usage as image allowing for a second image. This can cause issue with switch infoboxes and should be replaced as soon as possible.

Empty template

{{Infobox Bonuses
|class = 
|slot = 
|mainDamage = 
|mainAccuracy = 
|offDamage = 
|offAccuracy = 
|style = 
|armour = 
|life = 
|prayer = 
|strength = 
|ranged = 
|magic = 
|aspeed = 
|image = 
|tier = 
|requirements = 
}}

Displaying multiple infoboxes

Multiple infoboxes can be displayed by identifying version# parameters inside the template.

The parameters that apply to every version box are the same as those on the basic bonuses infobox; however, for every parameter there are an additional 20 named paramname#. The unnumbered parameters are the defaults, and will only be used for a version of the corresponding numbered param is not defined. For example, there is name, name1, name2, all the way to name20.

Parameters are only looked for up to the highest "version" defined. The "version" parameters only come as numbered parameters and they are used to define the text in the switch infobox buttons.

Parameters can be referenced and reused by using a dollar sign ($) followed by the index. For example: |image4=$1 will use whatever image is being used for image1.

Example
{{Infobox Bonuses multi
|version1=Level 10|version2=Level 40
|requirements1=10 {{Skill clickpic|Attack}}|requirements2=40 {{Skill clickpic|Attack}}
|class=Melee
|slot=Weapon
|mainDamage1=134|mainDamage2=536
|mainAccuracy1=191|mainAccuracy2=553
|offDamage=0
|offAccuracy=0
|style=Slash
|armour=0
|life=0
|prayer=0
|strength=0
|ranged=0
|magic=0
|aspeed=Average
|image=Exquisite whip equipped.png
}}