Template:AutoWeaponStats: Difference between revisions

From Melvor Idle
(Created page with "Automatic version of Template:WeaponStats that pulls data via Lua. {{T|{{PAGENAME}}|Sunset Rapier}} becomes {{{{PAGENAME}}|Sunset Rapier}} <includeonly><onlyinclude>{{#var...")
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Automatic version of [[Template:WeaponStats]] that pulls data via Lua.
<includeonly><onlyinclude>{{#invoke:Items|getWeaponStatsBox|{{{1|{{PAGENAME}}}}}}}</onlyinclude></includeonly><noinclude>{{/doc}}</noinclude>
{{T|{{PAGENAME}}|Sunset Rapier}} becomes {{{{PAGENAME}}|Sunset Rapier}}
<includeonly><onlyinclude>{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}{| class="wikitable"
|-
! colspan="4" style = "border-bottom: solid medium black;"| Weapon Stats
|-
! colspan="2" style = "border-bottom: solid thin black;"| Offensive Stats
! colspan="2" style = "border-bottom: solid thin black;"| Defensive Stats
|-
! style ="text-align: right;"| [[File:Combat.svg|25px|middle|link=Combat]] Attack Speed
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|attackSpeed}}
! style ="text-align: right;"| [[File:Defence (skill).svg|25px|middle|link=Defence]] Defence Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|defenceBonus}}
|-
! style ="text-align: right;"| Attack Type
| style ="text-align: right;"| {{#invoke:Items|getWeaponAttackType|{{#var:item}}}}
! style ="text-align: right;"| [[File:Defence (skill).svg|25px|middle|link=Defence]] Damage Reduction
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|damageReduction}}%
|-
! style ="text-align: right;"| [[File:Strength (skill).svg|25px|middle|link=Strength]] Strength Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|strengthBonus}}
! style ="text-align: right;"| [[File:Ranged (skill).svg|25px|middle|link=Ranged]] Defence Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|rangedDefenceBonus}}
|-
! style ="text-align: right;"| [[File:Combat.svg|25px|middle|link=Attack]] Stab Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|stabAttackBonus}}
! style ="text-align: right;border-bottom: solid thin black;"| [[File:Magic (skill).svg|25px|middle|link=Magic]] Defence Bonus
| style ="text-align: right;border-bottom: solid thin black;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|magicDefenceBonus}}
|-
! style ="text-align: right;"| [[File:Combat.svg|25px|middle|link=Strength]] Slash Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|slashAttackBonus}}
! colspan="2" style = "border-bottom: solid thin black;"| Other
|-
! style ="text-align: right;"| [[File:Combat.svg|25px|middle|link=Defence]] Block Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|blockAttackBonus}}
! style ="text-align: right;"| [[File:Slayer (skill).svg|25px|middle|link=Slayer]] Bonus Slayer XP
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|slayerBonusXP}}%
|-
! style ="text-align: right;"| [[File:Ranged (skill).svg|25px|middle|link=Ranged]] Attack Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|rangedAttackBonus}}
! style ="text-align: right;"| [[File:Attack (skill).svg|25px|middle|link=Attack]] Level Required
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|attackLevelRequired}}
|-
! style ="text-align: right;"| [[File:Ranged (skill).svg|25px|middle|link=Ranged]] Strength Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|rangedStrengthBonus}}
! style ="text-align: right;"| [[File:Ranged (skill).svg|25px|middle|link=Ranged]] Level Required
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|rangedLevelRequired}}
|-
! style ="text-align: right;"| [[File:Magic (skill).svg|25px|middle|link=Magic]] Attack Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|magicAttackBonus}}
! style ="text-align: right;"| [[File:Magic (skill).svg|25px|middle|link=Magic]] Level Required
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|magicLevelRequired}}
|-
! style ="text-align: right;"| [[File:Magic (skill).svg|25px|middle|link=Magic]] % Damage Bonus
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|ForceZero=true|magicDamageBonus}}%
! style ="text-align: right;"| Two Handed?
| style ="text-align: right;"| {{#invoke:Items|getItemStat|{{#var:item}}|isTwoHanded}}
|}</onlyinclude></includeonly>

Latest revision as of 22:11, 9 April 2024

Template that automatically formats the statistics of a weapon. {{AutoWeaponStats|Sunset Rapier}} becomes

Weapon Stats
Offensive Stats Defensive Stats
Attack Speed 2.2s
Error creating thumbnail: File missing
Defence Bonus
0
Damage Type
Error creating thumbnail: File missing
Normal
Error creating thumbnail: File missing
Damage Reduction
0%
Attack Type
Error creating thumbnail: File missing
Melee
Error creating thumbnail: File missing
Defence Bonus
0
Error creating thumbnail: File missing
Strength Bonus
63
Error creating thumbnail: File missing
Defence Bonus
0
Error creating thumbnail: File missing
Stab Bonus
72 Equip Requirements
Error creating thumbnail: File missing
Slash Bonus
55
Error creating thumbnail: File missing
Level Required
70
Error creating thumbnail: File missing
Block Bonus
65
Error creating thumbnail: File missing
Attack Bonus
0
Error creating thumbnail: File missing
Strength Bonus
0
Error creating thumbnail: File missing
Attack Bonus
0
Error creating thumbnail: File missing
 % Damage Bonus
0%
Two Handed? No