Template:Equipment bonuses infotable

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Template documentation
This documentation is transcluded from Template:Equipment bonuses infotable/doc. [edit] [history] [purge]
Template:Equipment bonuses infotable invokes function main in Module:Equipment bonuses infotable using Lua.

This template is a combination of {{Infotable Bonuses header}}, {{Infotable Bonuses row}} and {{Infotable Bonuses totals}} rewritten in Lua plus some additional features.

Usage

Parameters separated by a " / " are parameters with the same effect.
Parameter explanation is in the form |name (Accepted inputs) = Note

Header parameters

{{Equipment bonuses infotable
|type/class (Melee/Magic/Ranged/All/Hybrid/Mixed/None) = Equipment set type. Case insensitive. If mixed, adds an extra type cell.
|noinv      (yes/no) = If Yes, the Item type/class cell in the header will have 1 column span rather than 2.
|skill      (All accepted values of "Module:Skill clickpic") = Adds a column for levels.
|skill2     (All accepted values of "Module:Skill clickpic") = Adds a second column for levels.
|price      (yes/no) = If Yes, adds a column at the end for the item prices.
|price2     (yes/no) = If Yes, adds a second column at the end for the Off-hand item prices.
|noweapon   (yes/no) = If Yes, suppresses the weapon style/damage/accuracy columns
|nostyle    (yes/no) = If Yes, suppresses the style bonus columns
|noattr     (yes/no) = If Yes, suppresses the attribute columns
|nosumstats (yes/no) = If Yes, do not automatically sum non-price values to display in totals row
|sortable   (yes/no) = makes the table sortable
|nosmw      (yes/no) = Turn off smw stat lookup for all of the equipment rows

  // The following only matter if you're using an image on the side.
|rows       (integer) = Number of items in the table.
|tot        (integer) = The number of times the totals template is used; defaults to zero.
|image      (string) = An image's filename, with no "File:" (ex: name.png)
|image2     (string) = A second image's filename, with no "File:"
}}

Type/Class is mandatory, all others are optional.

Row parameters

Uses {{Equipment bonuses inforow}} as a helper template to pass the row parameters.
Example: {{Equipment bonuses infotable|Header parameters|{{Equipment bonuses inforow|Row parameters}}}}

{{Equipment bonuses inforow
|ge         (string) = Name of the GE object. Automatically sets the GEIcon, as well as a link to the item's page. This cannot be used with name/image.
---OR---
|name       (string) = Name of the item. Doesn't automatically create a link.
|image      (string) = An image, with no "File:" (usually an inventory image).

|smwname    (string) = Name of the smw object or subobject to search for. Use this if it seems to pull stats from the wrong item (eg a dungeoneering item with the same name).

|ref        (string) = Adds a ref next to the item name, this also works if the ge parameter is used. You need to incluse <ref> 
|type       (Melee/Melee icon/Ranged/Ranged icon/Magic/Magic icon/All/All icon/None/[custom]) = Will specify an item's type, default is "-".
|level/skill    (integer/string) = Level of "skill" identified on info header, default is "-".
|level2/skill2  (integer/string) = Level of "skill2" identified on info header, default is "-".
|mstyle     (Stab/Crush/Slash/Arrows/Bolt/Thrown/Spell/Spell-casting/none) = The style of the mainhand weapon, default is "-".
|mdmg       (integer) = The damage caused by a mainhand weapon, default is "-".
|macc       (integer) = The accuracy of a mainhand weapon, default is "-".
|ostyle     (Stab/Crush/Slash/Arrows/Bolt/Thrown/Spell/Spell-casting/none) = The style of the offhand weapon, e.g. Slashing for dagger, default is "-".
|odmg       (integer) = The damage caused by an offhand weapon, default is "-".
|oacc       (integer) = The accuracy of an offhand weapon, default is "-".
|armour     (integer) = The amount of armour of a piece of armour has, default is "-".
|life       (integer) = The amount of life points boosted by the equipment, default is "-".
|prayer     (integer) = The prayer bonus given by the equipment, default is "-".
|strength   (integer) = The damage bonus given to a melee weapon and armour, default is "-".
|ranged     (integer) = The damage bonus given to a ranged weapon and armour, default is "-".
|magic      (integer) = The damage bonus given to a magic weapon and armour, default is "-".
|price      (ge/integer/total/string) = Price of the item. If "ge" was used earlier, price=ge will fetch the price for you. Total returns the sum of all above prices. ge and integer are prefferd over string as those two add to the total price.
|price2     (ge/integer/string) = Price of the item. If "ge" was used earlier, price2=ge will fetch the price of the off-hand for you.
|priceimage (string) = Sets an image in front of the price if price, price2 or totals uses an integer for a price. with no "File:"
|dontaddtototal (yes/no) = Prevents the row from adding to the total sums (both stats and price).
|totals     (yes/no) = Adds a total cell in front of the row and adds special css to the row.
|label      (string) = Adds a label above the totals row. Only works if the totals parameter is used.
|nosmw      (yes/no) = Turn off smw stat lookup for this row.
}}

Defaulting

If certain columns exist in the header of the template but there is no value given for it in the row then it will default to a standard value. The following table shows which columns default to which value:

Header columns Extra row parameter Default value
type, skill, skill2, mstyle, mdmg, macc, ostyle, odmg, oacc, strength, ranged, magic, armour, life, prayer N/A "-"
price N/A The GE price
totals The sum of the prices above in coins
totals + priceimage The sum of the prices above with the priceimage in front of it
price2 N/A The GE price of the off-hand
totals "-"

Short version

{{Eq infotable}} redirects to {{Equipment bonuses infotable}}
{{Eqinforow}} redirects to {{Equipment bonuses inforow}}

Examples

Weapons

{{Eq infotable|class=melee|price=yes|skill=melee|nostyle=yes|noattr=yes|nosumstats=yes
|{{Eqinforow|ge=Bronze sword|mstyle=stab|mdmg=61|macc=150|level=1}}
|{{Eqinforow|ge=Iron sword|mstyle=stab|mdmg=122|macc=202|level=10}}
|{{Eqinforow|ge=Steel sword|mstyle=stab|mdmg=245|macc=316|level=20}}
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850|level=50}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132|level=60}}
|{{Eqinforow|totals=yes}}
}}
Attack.png
Item
Melee
Level
Main-handOff-handPrice
StyleDmgAccStyleDmgAcc
Bronze sword.pngBronze sword1Stab61150---1,961
Iron sword.pngIron sword10Stab122202---3,726
Steel sword.pngSteel sword20Stab245316---6,585
Rune sword.pngRune sword50Stab612850---19,859
Dragon longsword.pngDragon longsword60Stab7351132---58,017
Totals-------90,148

Armour

{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Adamant full helm|armour=125}}
|{{Eqinforow|ge=Adamant platebody|armour=144}}
|{{Eqinforow|ge=Adamant kiteshield|armour=125}}
|{{Eqinforow|ge=Adamant platelegs|armour=138}}
|{{Eqinforow|ge=Adamant gauntlets|armour=31}}
|{{Eqinforow|ge=Adamant armoured boots|armour=31}}
|{{Eqinforow|totals=yes|label=Total armour}}
}}
Attack.png
Item
AttributeStyle bonusPrice
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Adamant full helm.pngAdamant full helm125-----5,400
Adamant platebody.pngAdamant platebody144-----22,779
Adamant kiteshield.pngAdamant kiteshield125-----21,946
Adamant platelegs.pngAdamant platelegs138-----16,502
Adamant gauntlets.pngAdamant gauntlets31-----1,803
Adamant armoured boots.pngAdamant armoured boots31-----5,637
TotalsTotal armour
594-----74,067

The behavour of price and price2

"price=yes" in the header

{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132}}
}}
OR
{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850|price=ge}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132|price=ge}}
}}
Attack.png
Item
AttributeStyle bonusPrice
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Rune sword.pngRune sword------19,859
Dragon longsword.pngDragon longsword------58,017

Both "price=yes" and "price2=yes" in the header

{{Eq infotable|class=Melee|noweapon=yes|price=yes|price2=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132}}
}}
OR
{{Eq infotable|class=Melee|noweapon=yes|price=yes|price2=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850|price=ge|price2=ge}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132|price=ge|price2=ge}}
}}
Attack.png
Item
AttributeStyle bonusPrice
Main-hand
Price
Off-hand
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Rune sword.pngRune sword------19,859-
Dragon longsword.pngDragon longsword------58,01757,874
{{Eq infotable|class=Melee|noweapon=yes|price=yes|price2=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850|price=ge}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132|price2=ge}}
|{{Eqinforow|ge=Off-hand dragon longsword|mstyle=stab|mdmg=735|macc=1132|price=ge}}
|{{Eqinforow|ge=Off-hand dragon longsword|mstyle=stab|mdmg=735|macc=1132|price2=ge}}
}}
Attack.png
Item
AttributeStyle bonusPrice
Main-hand
Price
Off-hand
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Rune sword.pngRune sword------19,859-
Dragon longsword.pngDragon longsword-------58,017
Off-hand dragon longsword.pngOff-hand dragon longsword------57,874-
Off-hand dragon longsword.pngOff-hand dragon longsword-------57,874

Using "priceimage"

{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Rune sword|mstyle=stab|mdmg=612|macc=850|priceimage=Tokkul 25.png|price=1500}}
|{{Eqinforow|ge=Dragon longsword|mstyle=stab|mdmg=735|macc=1132|priceimage=Tokkul 5.png|price=10}}
}}
Attack.png
Item
AttributeStyle bonusPrice
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Rune sword.pngRune sword------Tokkul 25.png 1,500
Dragon longsword.pngDragon longsword------Tokkul 5.png 10

Using "totals" and "label"

{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Adamant platebody|armour=144}}
|{{Eqinforow|ge=Adamant kiteshield|armour=125}}
|{{Eqinforow|ge=Adamant platelegs|armour=138}}
|{{Eqinforow|totals=yes}}
}}
Attack.png
Item
AttributeStyle bonusPrice
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Adamant platebody.pngAdamant platebody144-----22,779
Adamant kiteshield.pngAdamant kiteshield125-----21,946
Adamant platelegs.pngAdamant platelegs138-----16,502
Totals407-----61,227
{{Eq infotable|class=Melee|noweapon=yes|price=yes
|{{Eqinforow|ge=Adamant platebody|armour=144|priceimage=Tokkul 25.png|price=1500}}
|{{Eqinforow|ge=Adamant kiteshield|armour=125|priceimage=Tokkul 5.png|price=10}}
|{{Eqinforow|ge=Adamant platelegs|armour=138|priceimage=Tokkul 25.png|price=50|dontaddtototal=yes}}
|{{Eqinforow|totals=yes|label=Price and armour without the platelegs}}
}}
Attack.png
Item
AttributeStyle bonusPrice
DefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Adamant platebody.pngAdamant platebody144-----Tokkul 25.png 1,500
Adamant kiteshield.pngAdamant kiteshield125-----Tokkul 5.png 10
Adamant platelegs.pngAdamant platelegs138-----Tokkul 25.png 50
TotalsPrice and armour without the platelegs
269-----Tokkul 25.png 1,510

Using "smwname"

In this example the top row is pulling the data from Hexhunter bow (Dungeoneering) because it is the first smw object with the Item name Hexhunter bow.

{{Eq infotable|class=ranged|price=yes|skill=ranged|nosumstats=yes
|{{Eqinforow|ge=Hexhunter bow|level=80|mstyle=Arrow|price=ge}}
|{{Eqinforow|ge=Hexhunter bow|level=80|price=ge|smwname=Hexhunter bow#new}}
}}
Ranged.png
Item
Ranged
Level
Main-handOff-handAttributeStyle bonusPrice
StyleDmgAccStyleDmgAccDefenceConstitutionPrayerAttack-icon.pngRanged-icon.pngMagic-icon.png
Hexhunter bow.pngHexhunter bow80Arrow8603031---592.41015----476,308,660
Hexhunter bow.pngHexhunter bow80Arrow3841924---------476,308,660