Difference between revisions of "Template:WeaponTable/row"
Jump to navigation
Jump to search
old>Realpsojed (fix sort value for Range. Check if bow exists on page Data and load Range parameter. If not, check all properties on item page and return value of Property named "Range".) |
(fix mismatched elemental damage types) |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine: | <includeonly><!-- | ||
|{{:{{ | --- Load complete datastring into a variable - to only load from the Armor data page once. --- | ||
|{{:{{ | -->{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!-- | ||
|{{:{{ | --- Separate values from datastring into individual variables. --- | ||
|{{:{{ | -->{{#vardefine:Unobtainable|{{#explode: {{#var:Datastring}}|;|-2}}}}<!-- | ||
|{{:{{ | -->{{#vardefine:Rarity|{{#explode: {{#var:Datastring}}|;|2}}}}<!-- | ||
|{{:{{ | -->{{#vardefine:Total Damage|{{#explode: {{#var:Datastring}}|;|-3}}}}<!-- | ||
-->{{#vardefine:Range|{{#explode: {{#var:Datastring}}|;|8}}}}<!-- | |||
-->{{#vardefine:Slashing Damage|{{#explode: {{#var:Datastring}}|;|13}}}}<!-- | |||
-->{{#vardefine:Piercing Damage|{{#explode: {{#var:Datastring}}|;|14}}}}<!-- | |||
-->{{#vardefine:Crushing Damage|{{#explode: {{#var:Datastring}}|;|15}}}}<!-- | |||
-->{{#vardefine:Rending Damage|{{#explode: {{#var:Datastring}}|;|16}}}}<!-- | |||
-->{{#vardefine:Fire Damage|{{#explode: {{#var:Datastring}}|;|17}}}}<!-- | |||
-->{{#vardefine:Shock Damage|{{#explode: {{#var:Datastring}}|;|18}}}}<!-- | |||
-->{{#vardefine:Poison Damage|{{#explode: {{#var:Datastring}}|;|19}}}}<!-- | |||
}} | -->{{#vardefine:Caustic Damage|{{#explode: {{#var:Datastring}}|;|20}}}}<!-- | ||
-->{{#vardefine:Frost Damage|{{#explode: {{#var:Datastring}}|;|21}}}}<!-- | |||
-->{{#vardefine:Arcane Damage|{{#explode: {{#var:Datastring}}|;|22}}}}<!-- | |||
-->{{#vardefine:Unholy Damage|{{#explode: {{#var:Datastring}}|;|23}}}}<!-- | |||
-->{{#vardefine:Sacred Damage|{{#explode: {{#var:Datastring}}|;|24}}}}<!-- | |||
-->{{#vardefine:Psionic Damage|{{#explode: {{#var:Datastring}}|;|25}}}}<!-- | |||
-->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|;|4}}}}<!-- | |||
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|7}}}}<!-- | |||
--- Load translations that are used multiple times into variables. --- | |||
-->{{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}} | |||
|- | |- | ||
|{{#if:{{: | |{{#if:{{#var:Unobtainable}}|{{Unobtainable}}<br />}}<!-- | ||
--- Check if we are on a subpage. If subpagename = pagename, we are not on a subpage, therefore URL becomes "item name". If we are on a subpage, URL becomes "item name/subgpagename". Used for other languages. --- | |||
-->'''[[{{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|<!-- | |||
| {{:{{ | --- Check if item name has a translation. If yes, load translation of item name. If not, return empty string. Used for other languages. --- | ||
-->{{#if:{{#var:TranslateName}}|{{#var:TranslateName}}}}]]'''<!-- | |||
-->[[File:{{{1}}}.png|center|<!-- | |||
--- Check if there is a custom name. If yes, load custom name translation, otherwise load item name translation. --- | |||
-->alt={{#var:TranslateName}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}]] | |||
| {{#if:{{#var:Rarity}}||{{#vardefine:Rarity|Common}}}}{{c|{{#var:Rarity}}|{{Translate|{{#var:Rarity}}|Properties}}}} | |||
| data-sort-value="{{#var:Total Damage}}" |<!-- | |||
-->{{#if:{{#var:Slashing Damage}}|{{Translate|Slashing|Properties}}: {{#var:Slashing Damage}}<br>}}<!-- | |||
-->{{#if:{{#var:Piercing Damage}}|{{Translate|Piercing|Properties}}: {{#var:Piercing Damage}}<br>}}<!-- | |||
-->{{#if:{{#var:Crushing Damage}}|{{Translate|Crushing|Properties}}: {{#var:Crushing Damage}}<br>}}<!-- | |||
-->{{#if:{{#var:Rending Damage}}|{{Translate|Rending|Properties}}: {{#var:Rending Damage}}<br>}}<!-- | |||
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{Translate|Fire|Properties}}: {{#var:Fire Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{Translate|Frost|Properties}}: {{#var:Frost Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{Translate|Shock|Properties}}: {{#var:Shock Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{Translate|Poison|Properties}}: {{#var:Poison Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{Translate|Caustic|Properties}}: {{#var:Caustic Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{Translate|Arcane|Properties}}: {{#var:Arcane Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{Translate|Sacred|Properties}}: {{#var:Sacred Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{Translate|Unholy|Properties}}: {{#var:Unholy Damage}}}}<br>}}<!-- | |||
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{Translate|Psionic|Properties}}: {{#var:Psionic Damage}}}}<br>}} | |||
| {{#var:Durability}} | |||
{{#if:{{#var:weapon table ranged}}| | {{#if:{{#var:weapon table ranged}}| | ||
{{!}} {{#var: | {{!}} {{#var:Range}} | ||
}} | }} | ||
| {{: | | {{#var:Price}} | ||
| {{ | | {{Test|{{{1}}}}}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude> |
Latest revision as of 19:55, 31 May 2023
This template has no documentation. If you know how to use this template, please add some.