Template:Elements: Difference between revisions

From Archaelund Wiki
(Created page with "<onlyinclude><includeonly>{{#if:{{{1|}}}|{{#switch:{{{2|}}} |Resistance = {{#ifexpr:{{#explode:{{{1}}}|,|0}} != 0| x16px|link= {{#explode:{{{1}}}|,|0}} ...")
 
No edit summary
Line 2: Line 2:


|Resistance =
|Resistance =
{{#ifexpr:{{#explode:{{{1}}}|,|0}} != 0| [[File:Fire.png|x16px|link=]] {{#explode:{{{1}}}|,|0}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} != 0| [[File:Cold.png|x16px|link=]] {{#explode:{{{1}}}|,|1}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} != 0| [[File:Shock.png|x16px|link=]] {{#explode:{{{1}}}|,|2}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} != 0| [[File:Death.png|x16px|link=]] {{#explode:{{{1}}}|,|3}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} != 0| [[File:Toxic.png|x16px|link=]] {{#explode:{{{1}}}|,|4}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} != 0| [[File:Spirit.png|x16px|link=]] {{#explode:{{{1}}}|,|5}}|}}
{{#ifexpr:{{#explode:{{{1}}}|,|0}} != 0| [[File:Fire.png|x16px|link=]] {{#explode:{{{1}}}|,|0}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} != 0| [[File:Cold.png|x16px|link=]] {{#explode:{{{1}}}|,|1}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} != 0| [[File:Shock.png|x16px|link=]] {{#explode:{{{1}}}|,|2}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} != 0| [[File:Poison.png|x16px|link=]] {{#explode:{{{1}}}|,|3}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} != 0| [[File:Death.png|x16px|link=]] {{#explode:{{{1}}}|,|4}}&#32;|}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} != 0| [[File:Spirit.png|x16px|link=]] {{#explode:{{{1}}}|,|5}}|}}


|Threat =
|Threat =
{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 1|[[File:Fire_double.png|x16px|link=]]&#32;|[[File:Fire.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 1|[[File:Cold_double.png|x16px|link=]]&#32;|[[File:Cold.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 1|[[File:Shock_double.png|x16px|link=]]&#32;|[[File:Shock.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 1|[[File:Death_double.png|x16px|link=]]&#32;|[[File:Death.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 1|[[File:Toxic_double.png|x16px|link=]]&#32;|[[File:Toxic.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 1|[[File:Spirit_double.png|x16px|link=]]&#32;|[[File:Spirit.png|x16px|link=]]&#32;|}}|}}
{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 1|[[File:Fire_double.png|x16px|link=]]&#32;|[[File:Fire.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 1|[[File:Cold_double.png|x16px|link=]]&#32;|[[File:Cold.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 1|[[File:Shock_double.png|x16px|link=]]&#32;|[[File:Shock.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 1|[[File:Poison_double.png|x16px|link=]]&#32;|[[File:Poison.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 1|[[File:Death_double.png|x16px|link=]]&#32;|[[File:Death.png|x16px|link=]]&#32;|}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 1|[[File:Spirit_double.png|x16px|link=]]&#32;|[[File:Spirit.png|x16px|link=]]&#32;|}}|}}


|#default =  
|#default =  

Revision as of 12:00, 12 September 2020

Description

This template generates various output formats from raw element input.

Usage

{{Elements|<element input>|<format>}}

Make sure that <element input> is formatted correctly according to the rules given below, otherwise error messages may be generated.

Format options

FormatDescriptionInputExample output
1...4Extracts the value of the ith entry (i = 1...4) in the element input.vector of 4 comma-separated numbers, representing element values (e.g. "10,0,50,-10")
d1...d4Extracts the value of the ith entry (i = 1...4) in the element input and formats it as a bonus/malus using Template:Difference.vector of 4 comma-separated numbers, representing element values (e.g. "10,0,50,-10")

In the above-mentioned vector of 4 comma-separated numbers, each position/index corresponds to a specific element. See the subsequent list for details.

Element names and icons

IndexNameIcon
1FireFire.png
2ColdCold.png
3ShockShock.png
4ToxicPoison.png

To extract the individual element names and corresponding icons use the following syntaxes:

{{Elements/names|<element index>}}
{{Elements/icons|<element index>}}

Abbreviated names and special double icons can be produced for each element by using specific double indices:

IndexNameIcon
11FireFire double.png
22ColdCold double.png
33ShockShock double.png
44ToxicPoison double.png

View/Edit documentation page