Difference between revisions of "Template:WeaponTable/row test"
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}}|;| | -->{{#vardefine:Total Damage|{{#explode: {{#var:Datastring}}|;|-3}}}}<!-- | ||
-->{{#vardefine:Range|{{#explode: {{#var:Datastring}}|;| | -->{{#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}}|;| | -->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|;|4}}}}<!-- | ||
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;| | -->{{#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}}| | -->{{#if:{{#var:Slashing Damage}}|{{Translate|Slashing|Properties}}: {{#var:Slashing Damage}}<br>}}<!-- | ||
-->{{#if:{{#var:Piercing Damage}}| | -->{{#if:{{#var:Piercing Damage}}|{{Translate|Piercing|Properties}}: {{#var:Piercing Damage}}<br>}}<!-- | ||
-->{{#if:{{#var:Crushing Damage}}| | -->{{#if:{{#var:Crushing Damage}}|{{Translate|Crushing|Properties}}: {{#var:Crushing Damage}}<br>}}<!-- | ||
-->{{#if:{{#var:Rending Damage}}| | -->{{#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:Fire Damage}}|{{c|Fire | -->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{Translate|Frost|Properties}}: {{#var:Frost Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Frost Damage}}|{{c|Frost | -->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{Translate|Shock|Properties}}: {{#var:Shock Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Shock Damage}}|{{c|Shock | -->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{Translate|Poison|Properties}}: {{#var:Poison Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Poison Damage}}|{{c|Poison | -->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{Translate|Caustic|Properties}}: {{#var:Caustic Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic | -->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{Translate|Arcane|Properties}}: {{#var:Arcane Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane| | -->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{Translate|Sacred|Properties}}: {{#var:Sacred Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred| | -->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{Translate|Unholy|Properties}}: {{#var:Unholy Damage}}}}<br>}}<!-- | ||
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy| | -->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{Translate|Psionic|Properties}}: {{#var:Psionic Damage}}}}<br>}} | ||
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic| | |||
| {{#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.