Difference between revisions of "Template:Test"
Jump to navigation
Jump to search
(added two missing variables into the reset section) |
(reduce post-expand include size by reducing the Datastring size) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:FloatRight|{{#switch: {{ROOTPAGENAME}} | <!-- | ||
--- If we're NOT on a page from this list, define the variable that will float values to the right. --- | |||
--><includeonly>{{#vardefine:FloatRight|{{#switch: {{ROOTPAGENAME}} | |||
|Swords | |Swords | ||
|Axes | |Axes | ||
Line 23: | Line 25: | ||
|Tools & Traps = | |Tools & Traps = | ||
|#default = float:right; | |#default = float:right; | ||
}}}}{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!-- | }}}}<!-- | ||
--- Load complete datastring into a variable - only load from the Weapon data page once. --- | |||
-->{{#ifeq: {{:Weapon_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Weapon_data|{{{1}}}}}}}<!-- | |||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | -->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | ||
|Sword | |Sword | ||
Line 81: | Line 87: | ||
-->{{#vardefine:Healing Efficiency|{{#explode: {{#var:Datastring}}|;|60}}}}<!-- | -->{{#vardefine:Healing Efficiency|{{#explode: {{#var:Datastring}}|;|60}}}}<!-- | ||
-->{{#vardefine:Block Recovery|{{#explode: {{#var:Datastring}}|;|61}}}}<!-- | -->{{#vardefine:Block Recovery|{{#explode: {{#var:Datastring}}|;|61}}}}<!-- | ||
-->{{#vardefine:Fatigue Resistance|{{#explode: {{#var:Datastring}}|;|62}}}} | -->{{#vardefine:Fatigue Resistance|{{#explode: {{#var:Datastring}}|;|62}}}}<!-- | ||
}}}}{{# | -->{{#vardefine:Crit Avoidance|{{#explode: {{#var:Datastring}}|;|63}}}}<!-- | ||
-->{{#vardefine:Max Health|{{#explode: {{#var:Datastring}}|;|64}}}} | |||
}}}}<!-- | |||
--- Load complete datastring into a variable - only load from the Consumable data page once. --- | |||
-->{{#ifeq: {{:Consumable_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Consumable_data|{{{1}}}}}}}<!-- | |||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | |||
|Food | |Food | ||
|Beverages | |Beverages | ||
Line 120: | Line 133: | ||
-->{{#vardefine:Poison Resistance|{{:Consumable_data|{{{1}}}|Poison Resistance}}}}<!-- | -->{{#vardefine:Poison Resistance|{{:Consumable_data|{{{1}}}|Poison Resistance}}}}<!-- | ||
-->{{#vardefine:Max Health|{{:Consumable_data|{{{1}}}|Max Health}}}} | -->{{#vardefine:Max Health|{{:Consumable_data|{{{1}}}|Max Health}}}} | ||
}}<!-- | }}}}<!-- | ||
--- Load complete datastring into a variable - to only load from the Armor data page once. --- | --- Load complete datastring into a variable - to only load from the Armor data page once. --- | ||
-->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!-- | -->{{#ifeq: {{:Armor_data|{{{1}}}}}|Data does not exist.||{{#vardefine:Datastring|{{:Armor_data|{{{1}}}}}}}<!-- | ||
--- This template doesn't use Description, remove it for smaller size --- | |||
-->{{#vardefine:Datastring|{{#sub:{{#var:Datastring}}|0|{{#expr: {{#len:{{#var:Datastring}}}} - {{#len:{{#explode: {{#var:Datastring}}|;|-1}}}}}}}}}}<!-- | |||
-->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | -->{{#switch: {{#explode: {{#var:Datastring}}|;|2}} | ||
|Shield | |Shield |
Latest revision as of 22:48, 16 January 2025
This template has no documentation. If you know how to use this template, please add some.