Difference between revisions of "Template:Weapon test"

From Stoneshard wiki
Jump to navigation Jump to search
m
(add color for damage, fix WeaponType property name, fix comments breaking properties)
Line 2: Line 2:
--- Define variables for properties used more than once in the template - goal is to only load each property from the Data page once. ---
--- Define variables for properties used more than once in the template - goal is to only load each property from the Data page once. ---
-->{{#vardefine:Rarity|{{:Data|{{ROOTPAGENAME}}|Rarity}}}}<!--
-->{{#vardefine:Rarity|{{:Data|{{ROOTPAGENAME}}|Rarity}}}}<!--
-->{{#vardefine:Weapon Type|{{:Data|{{ROOTPAGENAME}}|Weapon Type}}}}<!--
-->{{#vardefine:Weapon Type|{{:Data|{{ROOTPAGENAME}}|WeaponType}}}}<!--
-->{{#vardefine:Slashing Damage|{{:Data|{{ROOTPAGENAME}}|Slashing Damage}}}}<!--
-->{{#vardefine:Slashing Damage|{{:Data|{{ROOTPAGENAME}}|Slashing Damage}}}}<!--
-->{{#vardefine:Piercing Damage|{{:Data|{{ROOTPAGENAME}}|Piercing Damage}}}}<!--
-->{{#vardefine:Piercing Damage|{{:Data|{{ROOTPAGENAME}}|Piercing Damage}}}}<!--
Line 33: Line 33:
-->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}} {{Translate|Damage|Properties}}}}<!--
-->{{#if:{{#var:Rending Damage}}|{{#var:Rending Damage}} {{Translate|Rending|Properties}} {{Translate|Damage|Properties}}}}<!--
--- Swap the order of words for Russian wiki version on Fire, Frost, Shock, Poison and Caustic damage types, its a grammar/pronounciation thing apparently. ---
--- 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}}|{{#var:Fire Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Fire|Properties}}|{{Translate|Fire|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Fire Damage}}|{{c|Fire|{{#var:Fire Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Fire|Properties}}|{{Translate|Fire|Properties}} {{Translate|Damage|Properties}}}}}}}}<!--
-->{{#if:{{#var:Frost Damage}}|{{#var:Frost Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Frost|Properties}}|{{Translate|Frost|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Frost Damage}}|{{c|Frost|{{#var:Frost Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Frost|Properties}}|{{Translate|Frost|Properties}} {{Translate|Damage|Properties}}}}}}}}<!--
-->{{#if:{{#var:Shock Damage}}|{{#var:Shock Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Shock|Properties}}|{{Translate|Shock|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Shock Damage}}|{{c|Shock|{{#var:Shock Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Shock|Properties}}|{{Translate|Shock|Properties}} {{Translate|Damage|Properties}}}}}}}}<!--
-->{{#if:{{#var:Poison Damage}}|{{#var:Poison Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Poison|Properties}}|{{Translate|Poison|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Poison Damage}}|{{c|Poison|{{#var:Poison Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Poison|Properties}}|{{Translate|Poison|Properties}} {{Translate|Damage|Properties}}}}}}}}<!--
-->{{#if:{{#var:Caustic Damage}}|{{#var:Caustic Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Caustic|Properties}}|{{Translate|Caustic|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Caustic Damage}}|{{c|Caustic|{{#var:Caustic Damage}} {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2}} | ru |{{Translate|Damage|Properties}} {{Translate|Caustic|Properties}}|{{Translate|Caustic|Properties}} {{Translate|Damage|Properties}}}}}}}}<!--
-->{{#if:{{#var:Arcane Damage}}|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}} {{Translate|Damage|Properties}}}}<!--
-->{{#if:{{#var:Arcane Damage}}|{{c|Arcane|{{#var:Arcane Damage}} {{Translate|Arcane|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Sacred Damage}}|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}} {{Translate|Damage|Properties}}}}<!--
-->{{#if:{{#var:Sacred Damage}}|{{c|Sacred|{{#var:Sacred Damage}} {{Translate|Sacred|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Unholy Damage}}|{{#var:Unholy Damage}} {{Translate|Unholy|Properties}} {{Translate|Damage|Properties}}}}<!--
-->{{#if:{{#var:Unholy Damage}}|{{c|Unholy|{{#var:Unholy Damage}} {{Translate|Unholy|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{#if:{{#var:Psionic Damage}}|{{#var:Psionic Damage}} {{Translate|Psionic|Properties}} {{Translate|Damage|Properties}}}}<!--
-->{{#if:{{#var:Psionic Damage}}|{{c|Psionic|{{#var:Psionic Damage}} {{Translate|Psionic|Properties}} {{Translate|Damage|Properties}}}}}}<!--
-->{{Tooltip rule}}
-->{{Tooltip rule}}<!--
|-<!--
--- Load and sort this weapon's properties, we use another template. ---
--- Load and sort this weapon's properties, we use another template. ---
-->|<div style="width:100%;float: left;color:#9d9a9a;">{{Test|{{ROOTPAGENAME}}}}</div>
-->|-
|<div style="width:100%;float: left;color:#9d9a9a;">{{Test|{{ROOTPAGENAME}}}}</div>
<div style="clear: both;color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{#var:Durability}}/{{#var:Durability}}</span></div>
<div style="clear: both;color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{#var:Durability}}/{{#var:Durability}}</span></div>
|-<!--
|-
|style="color:#9d7969;text-align:justify"|<!--
--- Depending on which page we are currently on, description is loaded either from Data page, or from description translation template. ---
--- Depending on which page we are currently on, description is loaded either from Data page, or from description translation template. ---
-->|style="color:#9d7969;text-align:justify"|{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}}|{{#ifeq: {{PAGENAME}}|{{ROOTPAGENAME}}/Tooltip |{{#var:Description}}|{{Translate|{{ROOTPAGENAME}}|ItemDescriptions}}}}|{{#var:Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:Data|{{ROOTPAGENAME}}|Price}}}}</div><br />
-->{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}}|{{#ifeq: {{PAGENAME}}|{{ROOTPAGENAME}}/Tooltip |{{#var:Description}}|{{Translate|{{ROOTPAGENAME}}|ItemDescriptions}}}}|{{#var:Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:Data|{{ROOTPAGENAME}}|Price}}}}</div><br />
|-
|-
|style="text-align:center;"|[[File:{{ROOTPAGENAME}}.png|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}]]
|style="text-align:center;"|[[File:{{ROOTPAGENAME}}.png|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}]]

Revision as of 18:22, 28 May 2022

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