Difference between revisions of "Template:WeaponTable/row test"

From Stoneshard wiki
Jump to navigation Jump to search
(Created page with "<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}}|;|1}}}}<!-- -->{{#vardefine:Range|{...")
 
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
-->{{#vardefine:Unobtainable|{{#explode: {{#var:Datastring}}|;|-2}}}}<!--
-->{{#vardefine:Unobtainable|{{#explode: {{#var:Datastring}}|;|-2}}}}<!--
-->{{#vardefine:Rarity|{{#explode: {{#var:Datastring}}|;|2}}}}<!--
-->{{#vardefine:Rarity|{{#explode: {{#var:Datastring}}|;|2}}}}<!--
-->{{#vardefine:Total Damage|{{#explode: {{#var:Datastring}}|;|1}}}}<!--
-->{{#vardefine:Total Damage|{{#explode: {{#var:Datastring}}|;|-3}}}}<!--
-->{{#vardefine:Range|{{#explode: {{#var:Datastring}}|;|1}}}}<!--
-->{{#vardefine:Range|{{#explode: {{#var:Datastring}}|;|8}}}}<!--
-->{{#vardefine:Slashing Damage|{{#explode: {{#var:Datastring}}|;|13}}}}<!--
-->{{#vardefine:Slashing Damage|{{#explode: {{#var:Datastring}}|;|13}}}}<!--
-->{{#vardefine:Piercing Damage|{{#explode: {{#var:Datastring}}|;|14}}}}<!--
-->{{#vardefine:Piercing Damage|{{#explode: {{#var:Datastring}}|;|14}}}}<!--
Line 20: Line 20:
-->{{#vardefine:Unholy Damage|{{#explode: {{#var:Datastring}}|;|24}}}}<!--
-->{{#vardefine:Unholy Damage|{{#explode: {{#var:Datastring}}|;|24}}}}<!--
-->{{#vardefine:Psionic Damage|{{#explode: {{#var:Datastring}}|;|25}}}}<!--
-->{{#vardefine:Psionic Damage|{{#explode: {{#var:Datastring}}|;|25}}}}<!--
-->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|;|7}}}}<!--
-->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|;|4}}}}<!--
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|6}}}}<!--
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|7}}}}<!--
--- Load translations that are used multiple times into variables. ---
--- Load translations that are used multiple times into variables. ---
-->{{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}}
-->{{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}}
|-
|-
|{{#if:{{#var:Unobtainable}|{{Unobtainable}}<br />}}<!--
|{{#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. ---
--- 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}}}}|<!--
-->'''[[{{#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. ---
--- 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}}}}}}]]'''<!--
-->{{#if:{{#var:TranslateName}}|{{#var:TranslateName}}}}]]'''<!--
-->[[File:{{{1}}}.png|center|<!--
-->[[File:{{{1}}}.png|center|<!--
--- Check if there is a custom name. If yes, load custom name translation, otherwise load item name translation. ---
--- Check if there is a custom name. If yes, load custom name translation, otherwise load item name translation. ---
Line 35: Line 35:
| {{#if:{{#var:Rarity}}||{{#vardefine:Rarity|Common}}}}{{c|{{#var:Rarity}}|{{Translate|{{#var:Rarity}}|Properties}}}}
| {{#if:{{#var:Rarity}}||{{#vardefine:Rarity|Common}}}}{{c|{{#var:Rarity}}|{{Translate|{{#var:Rarity}}|Properties}}}}
| data-sort-value="{{#var:Total Damage}}" |<!--
| data-sort-value="{{#var:Total Damage}}" |<!--
-->{{#if:{{#var:Slashing Damage}}|{{#var:Slashing Damage}} {{Translate|Slashing|Properties}} {{#var:TranslateDamage}}<br>}}<!--
-->{{#if:{{#var:Slashing Damage}}|{{Translate|Slashing|Properties}}: {{#var:Slashing Damage}}<br>}}<!--
-->{{#if:{{#var:Piercing Damage}}|{{#var:Piercing Damage}} {{Translate|Piercing|Properties}} {{#var:TranslateDamage}}<br>}}<!--
-->{{#if:{{#var:Piercing Damage}}|{{Translate|Piercing|Properties}}: {{#var:Piercing Damage}}<br>}}<!--
-->{{#if:{{#var:Crushing Damage}}|{{#var:Crushing Damage}} {{Translate|Crushing|Properties}} {{#var:TranslateDamage}}<br>}}<!--
-->{{#if:{{#var:Crushing Damage}}|{{Translate|Crushing|Properties}}: {{#var:Crushing Damage}}<br>}}<!--
-->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}} {{#var:TranslateDamage}}<br>}}<!--
-->{{#if:{{#var:Rending Damage}}|{{Translate|Rending|Properties}}: {{#var:Rending Damage}}<br>}}<!--
--- Swap the order of words for Russian wiki version on Fire, Frost, Shock, Poison and Caustic damage types, its a grammar/pronounciation thing apparently. ---
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{Translate|Fire|Properties}}: {{#var:Fire Damage}}}}<br>}}<!--
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{#var:Fire Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{#var:TranslateDamage}} {{Translate|Fire|Properties}}|{{Translate|Fire|Properties}} {{#var:TranslateDamage}}}}}}<br>}}<!--
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{Translate|Frost|Properties}}: {{#var:Frost Damage}}}}<br>}}<!--
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{#var:Frost Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{#var:TranslateDamage}} {{Translate|Frost|Properties}}|{{Translate|Frost|Properties}} {{#var:TranslateDamage}}}}}}<br>}}<!--
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{Translate|Shock|Properties}}: {{#var:Shock Damage}}}}<br>}}<!--
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{#var:Shock Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{#var:TranslateDamage}} {{Translate|Shock|Properties}}|{{Translate|Shock|Properties}} {{#var:TranslateDamage}}}}}}<br>}}<!--
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{Translate|Poison|Properties}}: {{#var:Poison Damage}}}}<br>}}<!--
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{#var:Poison Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{#var:TranslateDamage}} {{Translate|Poison|Properties}}|{{Translate|Poison|Properties}} {{#var:TranslateDamage}}}}}}<br>}}<!--
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{Translate|Caustic|Properties}}: {{#var:Caustic Damage}}}}<br>}}<!--
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{#var:Caustic Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{#var:TranslateDamage}} {{Translate|Caustic|Properties}}|{{Translate|Caustic|Properties}} {{#var:TranslateDamage}}}}}}<br>}}<!--
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{Translate|Arcane|Properties}}: {{#var:Arcane Damage}}}}<br>}}<!--
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}} {{#var:TranslateDamage}}}}<br>}}<!--
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{Translate|Sacred|Properties}}: {{#var:Sacred Damage}}}}<br>}}<!--
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}} {{#var:TranslateDamage}}}}<br>}}<!--
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{Translate|Unholy|Properties}}: {{#var:Unholy Damage}}}}<br>}}<!--
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{#var:Unholy Damage}} {{Translate|Unholy|Properties}} {{#var:TranslateDamage}}}}<br>}}<!--
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{Translate|Psionic|Properties}}: {{#var:Psionic Damage}}}}<br>}}
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{#var:Psionic Damage}} {{Translate|Psionic|Properties}} {{#var:TranslateDamage}}}}<br>}}
| {{#var:Durability}}
| {{#var:Durability}}
{{#if:{{#var:weapon table ranged}}|
{{#if:{{#var:weapon table ranged}}|

Latest revision as of 18:23, 31 May 2023

This template has no documentation. If you know how to use this template, please add some.