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

From Stoneshard wiki
Jump to navigation Jump to search
(updated translation page detection, links and link texts for armor table)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly><!--
--- Load complete datastring into a variable - to only load from the Armor data page once. ---
-->{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!--
--- Separate values from datastring into individual variables. ---
-->{{#vardefine:Unobtainable|{{#explode: {{#var:Datastring}}|;|-3}}}}<!--
-->{{#vardefine:Rarity|{{#explode: {{#var:Datastring}}|;|4}}}}<!--
-->{{#vardefine:ArmorClass|{{#explode: {{#var:Datastring}}|;|3}}}}<!--
-->{{#vardefine:Protection|{{#explode: {{#var:Datastring}}|;|8}}}}<!--
-->{{#vardefine:Durability|{{#explode: {{#var:Datastring}}|;|7}}}}<!--
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|;|6}}}}<!--
-->{{#vardefine:Image|{{#explode: {{#var:Datastring}}|;|-6}}}}<!--
-->{{#vardefine:Image2|{{#explode: {{#var:Datastring}}|;|-5}}}}<!--
-->{{#vardefine:Image3|{{#explode: {{#var:Datastring}}|;|-4}}}}<!--
--- Load translations that are used multiple times into variables. ---
-->{{#vardefine:TranslateName|{{Translate|{{{1}}}|ItemNames}}}}
|-
|-
|{{#if:{{:Data|{{{1}}}|Unobtainable}}|{{Unobtainable}}<br />}}'''[[{{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#if:{{:{{{1}}}|Name}}|{{#if:{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}}}|{{#if:{{Translate|{{{1}}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}]]'''<!--
|{{#if:{{#var:Unobtainable}}|{{Unobtainable}}<br />}}'''[[{{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#var:TranslateName}}]]'''<!--
-->{{#if:{{#var:Image2}}|<!--
--><div style="margin:0 auto 0 auto">[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|alt={{#var:TranslateName}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#var:TranslateName}}]]<!--
-->[[File:{{#var:Image2}}|alt={{#var:TranslateName}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#var:TranslateName}}]]</div><!--
-->{{#if:{{#var:Image3}}<!--
-->||[[File:{{#var:Image3}}|center|alt={{#var:TranslateName}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#var:TranslateName}}]]<!--
-->}}<!--
-->|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|center|alt={{#var:TranslateName}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}]]}}


-->{{#if:{{:{{{1}}}|Image2}}|<!--
|{{#if:{{#var:Rarity}}||{{#vardefine:Rarity|Common}}}}{{c|{{#var:Rarity}}|{{Translate|{{#var:Rarity}}|Properties}}}}
 
--><div style="margin:0 auto 0 auto">[[File:{{#if:{{:{{{1}}}|Image}}|{{:{{{1}}}|Image}}|{{{1}}}.png}}|alt={{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}]]<!--
-->[[File:{{:{{{1}}}|Image2}}|alt={{#if:{{:{{{1}}}|Name2}}|{{Translate|{{:{{{1}}}|Name2}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#if:{{:{{{1}}}|Name2}}|{{Translate|{{:{{{1}}}|Name2}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{:{{{1}}}|Name}}|{{Translate|{{{1}}}|ItemNames}}}}}}]]</div><!--
 
-->{{#if:{{:{{{1}}}|Image3}}<!--
 
-->|{{#if:{{:{{{1}}}|Image4}}<!--
 
-->|<div style="margin:0 auto 0 auto">[[File:{{:{{{1}}}|Image3}}|alt={{#if:{{:{{{1}}}|Name3}}|{{Translate|{{:{{{1}}}|Name3}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#if:{{:{{{1}}}|Name3}}|{{Translate|{{:{{{1}}}|Name3}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}]]<!--
-->[[File:{{:{{{1}}}|Image4}}|alt={{#if:{{:{{{1}}}|Name4}}|{{Translate|{{:{{{1}}}|Name4}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}|{{#if:{{:{{{1}}}|Name4}}|{{Translate|{{:{{{1}}}|Name4}}|ItemNames}}|{{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}}}]]</div><!--
 
-->|[[File:{{:{{{1}}}|Image3}}|center|alt={{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}]]<!--
 
-->}}}}<!--
 
-->|[[File:{{#if:{{:{{{1}}}|Image}}|{{:{{{1}}}|Image}}|{{{1}}}.png}}|center|alt={{#if:{{:{{{1}}}|Name}}|{{Translate|{{:{{{1}}}|Name}}|ItemNames}}|{{Translate|{{{1}}}|ItemNames}}}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|{{PAGENAME}}|{{{1}}}|{{{1}}}/{{SUBPAGENAME}}}}]]}}
 
| {{#vardefine:item rarity|{{:Data|{{{1}}}|Rarity}}}}{{#if:{{#var:item rarity}}||{{#vardefine:item rarity|Common}}}}{{c|{{#var:item rarity}}|{{Translate|{{#var:item rarity}}|Properties}}}}
{{#ifeq:{{lc:{{#var:armor table type}}}}|jewelry||
{{#ifeq:{{lc:{{#var:armor table type}}}}|jewelry||
{{!}} {{#vardefine:item protection|{{:Data|{{{1}}}|Protection}}}}{{#if:{{#var:item protection}}|{{#var:item protection}}|0}}
{{#ifeq:{{lc:{{#var:armor table type}}}}|shield||
{{!}} {{Translate|{{:Data|{{{1}}}|ArmorClass}}|Properties}}
{{!}} {{#if:{{#var:Protection}}|{{#var:Protection}}|0}}
}}
{{!}} {{Translate|{{#var:ArmorClass}}|Properties}}
}}
}}
| {{:Data|{{{1}}}|Durability}}
| {{#var:Durability}}
| {{:Data|{{{1}}}|Price}}
| {{#var:Price}}
| {{#if: {{:{{{1}}}|NewProp}}|{{Test|{{{1}}}}}|{{Properties|{{{1}}}}}}}</includeonly><noinclude>{{doc|Template:ArmorTable}}[[Category:Templates]]</noinclude>
| {{Test_test|{{{1}}}}}</includeonly><noinclude>{{doc|Template:ArmorTable}}[[Category:Templates]]</noinclude>

Latest revision as of 16:24, 26 May 2023

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