Difference between revisions of "Template:Properties"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(Removed propertygrp11, removed properties14 and 15, there are only up to 13 properties total on any given item)
old>Realpsojed
(Description moved to Doc)
Line 1: Line 1:
<!--
{{Spacer|{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties1}}}} | Propertygrp1 | {{:{{{1}}}|Properties1}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values1}}</div> | <span style="color:white;">{{:{{{1}}}|Values1}}</span> }}<br> | }}<!--
Attempts to consolidate Properties into a list separated by line breaks based on Properties' grouping observed ingame.
Output should be Propertygrp1<br><br>Propertygrp2<br><br>etc.
PropertygrpX should be all properties that group together (ie. Physical Resistance, Nature Resistance, Magic Resistance group together with each other, but any other properties don't group with them)
Only one parameter used - item page name - to load all properties from the item's page (ie. Wooden Sword).
We call Template:Properties_sort to evaluate all Properties from item's page and return their respective PropertygrpX. Then we sort all Properties by their Propertygrps.
We return all properties' names sorted by their Propertygrps. Empty Propertygrps are empty strings and don't affect the result.
-->{{Spacer|{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties1}}}} | Propertygrp1 | {{:{{{1}}}|Properties1}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values1}}</div> | <span style="color:white;">{{:{{{1}}}|Values1}}</span> }}<br> | }}<!--
-->{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties2}}}} | Propertygrp1 | {{:{{{1}}}|Properties2}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values2}}</div> | <span style="color:white;">{{:{{{1}}}|Values2}}</span> }}<br> | }}<!--
-->{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties2}}}} | Propertygrp1 | {{:{{{1}}}|Properties2}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values2}}</div> | <span style="color:white;">{{:{{{1}}}|Values2}}</span> }}<br> | }}<!--
-->{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties3}}}} | Propertygrp1 | {{:{{{1}}}|Properties3}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values3}}</div> | <span style="color:white;">{{:{{{1}}}|Values3}}</span> }}<br> | }}<!--
-->{{#ifeq: {{Properties_sort|{{:{{{1}}}|Properties3}}}} | Propertygrp1 | {{:{{{1}}}|Properties3}}: {{#ifeq: {{ROOTPAGENAME}} | {{{1}}} | <div style="float: right;color:white;">{{:{{{1}}}|Values3}}</div> | <span style="color:white;">{{:{{{1}}}|Values3}}</span> }}<br> | }}<!--

Revision as of 19:49, 11 May 2020