Difference between revisions of "Template:Weapon test"

From Stoneshard wiki
Jump to navigation Jump to search
(test for tooltips)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--- 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:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!---->{{#vardefine:Rarity|{{:Weapon_data|{{#var:Page}}|Rarity}}}}<!--
-->{{#vardefine:Weapon Type|{{:Data|{{ROOTPAGENAME}}|WeaponType}}}}<!--
-->{{#vardefine:Weapon Type|{{:Weapon_data|{{#var:Page}}|WeaponType}}}}<!--
-->{{#vardefine:Slashing Damage|{{:Data|{{ROOTPAGENAME}}|Slashing Damage}}}}<!--
-->{{#vardefine:Slashing Damage|{{:Weapon_data|{{#var:Page}}|Slashing Damage}}}}<!--
-->{{#vardefine:Piercing Damage|{{:Data|{{ROOTPAGENAME}}|Piercing Damage}}}}<!--
-->{{#vardefine:Piercing Damage|{{:Weapon_data|{{#var:Page}}|Piercing Damage}}}}<!--
-->{{#vardefine:Crushing Damage|{{:Data|{{ROOTPAGENAME}}|Crushing Damage}}}}<!--
-->{{#vardefine:Crushing Damage|{{:Weapon_data|{{#var:Page}}|Crushing Damage}}}}<!--
-->{{#vardefine:Rending Damage|{{:Data|{{ROOTPAGENAME}}|Rending Damage}}}}<!--
-->{{#vardefine:Rending Damage|{{:Weapon_data|{{#var:Page}}|Rending Damage}}}}<!--
-->{{#vardefine:Fire Damage|{{:Data|{{ROOTPAGENAME}}|Fire Damage}}}}<!--
-->{{#vardefine:Fire Damage|{{:Weapon_data|{{#var:Page}}|Fire Damage}}}}<!--
-->{{#vardefine:Frost Damage|{{:Data|{{ROOTPAGENAME}}|Frost Damage}}}}<!--
-->{{#vardefine:Frost Damage|{{:Weapon_data|{{#var:Page}}|Frost Damage}}}}<!--
-->{{#vardefine:Shock Damage|{{:Data|{{ROOTPAGENAME}}|Shock Damage}}}}<!--
-->{{#vardefine:Shock Damage|{{:Weapon_data|{{#var:Page}}|Shock Damage}}}}<!--
-->{{#vardefine:Poison Damage|{{:Data|{{ROOTPAGENAME}}|Poison Damage}}}}<!--
-->{{#vardefine:Poison Damage|{{:Weapon_data|{{#var:Page}}|Poison Damage}}}}<!--
-->{{#vardefine:Caustic Damage|{{:Data|{{ROOTPAGENAME}}|Caustic Damage}}}}<!--
-->{{#vardefine:Caustic Damage|{{:Weapon_data|{{#var:Page}}|Caustic Damage}}}}<!--
-->{{#vardefine:Arcane Damage|{{:Data|{{ROOTPAGENAME}}|Arcane Damage}}}}<!--
-->{{#vardefine:Arcane Damage|{{:Weapon_data|{{#var:Page}}|Arcane Damage}}}}<!--
-->{{#vardefine:Sacred Damage|{{:Data|{{ROOTPAGENAME}}|Sacred Damage}}}}<!--
-->{{#vardefine:Sacred Damage|{{:Weapon_data|{{#var:Page}}|Sacred Damage}}}}<!--
-->{{#vardefine:Unholy Damage|{{:Data|{{ROOTPAGENAME}}|Unholy Damage}}}}<!--
-->{{#vardefine:Unholy Damage|{{:Weapon_data|{{#var:Page}}|Unholy Damage}}}}<!--
-->{{#vardefine:Psionic Damage|{{:Data|{{ROOTPAGENAME}}|Psionic Damage}}}}<!--
-->{{#vardefine:Psionic Damage|{{:Weapon_data|{{#var:Page}}|Psionic Damage}}}}<!--
-->{{#vardefine:Durability|{{:Data|{{ROOTPAGENAME}}|Durability}}}}<!--
-->{{#vardefine:Durability|{{:Weapon_data|{{#var:Page}}|Durability}}}}<!--
-->{{#vardefine:Description|{{:Data|{{ROOTPAGENAME}}|Description}}}}<!--
-->{{#vardefine:Description|{{:Weapon_data|{{#var:Page}}|Description}}}}<!--
--- Weapon Tooltip start. ---
--- Weapon Tooltip start. ---
-->{| width=300px;
-->{| width=300px;
|style="text-align:center;"|<!--
|style="text-align:center;"|<!--
--- Check if item is marked as unobtainable. ---
--- Check if item is marked as unobtainable. ---
-->{{#if:{{:Data|{{ROOTPAGENAME}}|Unobtainable}}|{{Unobtainable}}<br />}}<!--
-->{{#if:{{:Weapon_data|{{#var:Page}}|Unobtainable}}|{{Unobtainable}}<br />}}<!--
--- Check if item has Rarity, then format the text, color the item name with Rarity's color and display the weapon type. Default to Common Rarity if the item has no Rarity. ---
--- Check if item has Rarity, then format the text, color the item name with Rarity's color and display the weapon type. Default to Common Rarity if the item has no Rarity. ---
-->{{#if: {{#var:Rarity}} | <span style="font-size: 20px;">{{c|{{#var:Rarity}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|{{#var:Rarity}}|Properties}} | <span style="font-size: 20px;">{{Translate|{{ROOTPAGENAME}}|ItemNames}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|Common|Properties}} }} {{Translate|{{#var:Weapon Type}}|Properties}}</span>{{Tooltip rule}}
-->{{#if: {{#var:Rarity}} | <span style="font-size: 20px;">{{c|{{#var:Rarity}}|{{Translate|{{#var:Page}}|ItemNames}}}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|{{#var:Rarity}}|Properties}} | <span style="font-size: 20px;">{{Translate|{{#var:Page}}|ItemNames}}</span> <br /> <span style="color:#9d9a9a;">{{Translate|Common|Properties}} }} {{Translate|{{#var:Weapon Type}}|Properties}}</span>{{Tooltip rule}}
|-
|-
|style="text-align:center;"|<!--
|style="text-align:center;"|<!--
Line 46: Line 46:
|<!--
|<!--
--- 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%;color:#9d9a9a;">{{Test|{{#var:Page}}}}</div>
<div style="clear: both;color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{#var:Durability}}/{{#var:Durability}}</span></div>
<div style="color:#9d9a9a;">{{Translate|Durability|Properties}}: <span style="color:white;">{{#var:Durability}}/{{#var:Durability}}</span></div>
|-
|-
|style="color:#9d7969;text-align:justify"|<!--
|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. ---
-->{{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}}|{{#var:Page}}/Tooltip |{{#var:Description}}|{{Translate|{{#var:Page}}|ItemDescriptions}}}}|{{#var:Description}}}}<div style="float:right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{W|{{:Weapon_data|{{#var:Page}}|Price}}}}</div><br />
|-
|-
|style="text-align:center;"|[[File:{{#if:{{:Data|{{ROOTPAGENAME}}|Image}}|{{:Data|{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|ItemNames}}|{{Translate|{{ROOTPAGENAME}}|ItemNames}}]]
|style="text-align:center;"|[[File:{{#if:{{:Weapon_data|{{#var:Page}}|Image}}|{{:Weapon_data|{{#var:Page}}|Image}}|{{#var:Page}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{#var:Page}}|ItemNames}}|{{Translate|{{#var:Page}}|ItemNames}}]]
|}
|}
{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip |[[Category:{{#var:Weapon Type}} Tooltips]]|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 3}}|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}} Tooltips]]|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}}]]}}}}|[[Category:{{#var:Weapon Type}}]]}}</includeonly><noinclude>{{doc}}
{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{#var:Page}}/Tooltip |[[Category:{{#var:Weapon Type}} Tooltips]]|{{#if: {{#titleparts: {{PAGENAME}} | 1 | 3}}|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}} Tooltips]]|[[Category: {{uc:{{#titleparts: {{PAGENAME}} | 1 | 2}}}} {{#var:Weapon Type}}]]}}}}|[[Category:{{#var:Weapon Type}}]]}}</includeonly><noinclude>{{doc}}
[[Category:Tooltip templates]]</noinclude>
[[Category:Tooltip templates]]</noinclude>

Revision as of 23:58, 25 July 2022

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