Template:Infobox ModStats/doc

Revision as of 16:34, 18 August 2020 by Banri (talk | contribs) (Created page with "{{Documentation}} Standard infobox for equippable mods. ==Empty template== <pre> {{Infobox Bonuses |class = |slot = |mainDamage = |mainAccuracy = |offDamage = |offAccura...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a documentation subpage for Template:Infobox ModStats.
It contains usage information, categories, and other content that is not part of the original template page.
Template:Infobox ModStats invokes function main in Module:Infobox ModStats new using Lua.

Standard infobox for equippable mods.

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
}}

Lua error in Module:Infobox_ModStats_new at line 261: attempt to call field 'new' (a nil value).