Template:Infotable Bonuses: Difference between revisions

From Illerai
Jump to navigation Jump to search
illerai>The scribe
Initial deployment
 
m 1 revision imported
 
(No difference)

Latest revision as of 21:06, 2 November 2024

Template documentation
This documentation is transcluded from Template:Infotable Bonuses/doc. [edit] [history] [purge]
Template:Infotable Bonuses invokes function main in Module:Infotable Bonuses using Lua.
{{#replace:Template:Infotable Bonuses|/doc}} invokes Module:Infotable Bonuses using Lua.

Template for inserting a table of item bonuses on a page. This lists a number of equippable game items, that has some kind of relation to each other, along with their associated stats in a table layout for an easy overview. This could be items that are part of an armour set or items that fall into the same category.

Pages this template is suitable for is disambiguation pages for item categories, and also for pages dedicated to an armour set. It can also be useful for item pages where its desireable to compare an item against other similar items, although the latter should probably be reserved for top-tier items. This template is not suitable for comparing weapons though, but it can nevertheless be used on disambiguation pages for weapons to provide an overview.

Usage

{{Infotable Bonuses|item1|item3 ...|item2}}

Items listed needs to match the name of a wiki page that uses Template:Infobox Bonuses. In case an item has multiple variants, one of the subvariants has to be specified by appending a '#' sign and the sub-variant's name.

If you are unsure as to which variant to list, you can use the base name of the item and turn off sorting temporary, this should present you with a list of variants to chose from. The one you want is ususally the undamaged item or otherwise the item with the highest stats. For items that can be charged, you can pick the uncharged version if the stats are the same, otherwise chose the charged one.

Pages which erroneously lists multi-variant items will be added to Category:Infotable Bonuses with multi-variant items allowing maintainers to find and fix lists with errors in them.

Examples

{{Infotable Bonuses|Verac's brassard#Undamaged|Verac's flail#Undamaged|Verac's helm#Undamaged|Verac's plateskirt#Undamaged}}

Lua error in Module:Infotable_Bonuses at line 224: Of the 4 pages requested, there is 4 missing.(Verac's flail#Undamaged Verac's brassard#Undamaged Verac's helm#Undamaged Verac's plateskirt#Undamaged ).

{{Infotable Bonuses|Adamant axe|Bronze axe|Steel axe|Rune axe|Dragon axe|Black axe|Crystal axe#Active|order=asc|Iron axe|Mithril axe|sort=str|nototals=yes}}

Lua error in Module:Infotable_Bonuses at line 224: Of the 9 pages requested, there is 9 missing.(Iron axe Black axe Dragon axe Adamant axe Steel axe Rune axe Bronze axe Crystal axe#Active Mithril axe ) Try temporarily disabling sorting to see which items might have multiple variants..

Split totals

{{Infotable Bonuses|Lunar cape|Lunar helm|Lunar legs|Lunar gloves|Lunar torso|Lunar boots|colwidth=30px|itemwidth=110px}}

{{Infotable Bonuses|Lunar amulet|itemwidth=110px|Lunar ring|Lunar staff|colwidth=30px|noheader=yes}}

Lua error in Module:Infotable_Bonuses at line 224: Of the 6 pages requested, there is 6 missing.(Lunar gloves Lunar legs Lunar cape Lunar boots Lunar torso Lunar helm ).

Lua error in Module:Infotable_Bonuses at line 224: Of the 3 pages requested, there is 3 missing.(Lunar ring Lunar staff Lunar amulet ).

Row comments

Useful when using the infotable for a tier comparison of a single equipment slot, and commentary per item is helpful.

{{Infotable Bonuses|sort=dslash
|Leather gloves |comment1 = Although their crush defence bonus is better than that of [[leather vambraces]], the difference is minimal - and slash attack type is significantly more common due to scimitars and 2-handed swords.
|Leather vambraces |comment2 = Considered the best free-to-play gloves without any level requirements. Since they have no attack penalties, mages can safely use these gloves and are encouraged to do so.
|Green d'hide vambraces |comment3 = The best gloves available for both ranged and melee combat.
}}

Lua error in Module:Infotable_Bonuses at line 224: Of the 3 pages requested, there is 3 missing.(Leather vambraces Leather gloves Green d'hide vambraces ) Try temporarily disabling sorting to see which items might have multiple variants..

Parameters

Numbered parameters

Parameter Description Default Required
item1, item2, item3 ... Items to list. Items listed needs to match the name of a wiki page that uses Template:Infobox Bonuses. In case an item has multiple variants, one of the subvariants has to be specified by appending a '#' sign and the sub-variant's name. N/A required

Note: Due to the way SMW is configured on this site, there is currently a limit of 16 items per list. It is unlikely that you will ever hit this restriction, but if you do, a simple fix is just to split the table.

Pages which erroneously lists multi-variant items will be added to Category:Infotable Bonuses with multi-variant items allowing maintainers to find and fix lists with errors in them.

Named parameters

Parameter Description Default Required
comment1
commentN
Comment for the respective item at index 1 through N. If no comments are specified, the comments column is not shown. N/A optional
noheader Set to 'yes' to omit table header. 'no' optional
nototals Set to 'yes' to omit totals. 'no' optional
sort Sorting key. Set to one or more of: 'astab', 'aslash', 'acrush', 'amagic', 'arange', 'dstab', 'dslash', 'dcrush', 'dmagic', 'drange', 'str', 'mdmg', 'rstr' and 'prayer'. Use comma as a separator between the sorting keys. (alphabetical) optional
order Sorting order. Set to one or more of: 'ascending', 'asc', 'descending', 'desc', 'reverse', 'random' and 'rand'. Use comma as a separator between the sorting orders. 'ascending' optional
colwidth Default column width intended for the split-totals mode. N/A optional
itemwidth Default item column width intended for the split-totals mode. N/A optional
expensive Exists only to help maintainers locate errors on wiki pages, and can be enabled site-wide by changing a default in the Lua module. Should be disabled unless doing maintenance. false optional, debug

See also