Template:Elements: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
 
Line 5: Line 5:
|3 = {{#explode:{{{1}}}|,|2}}
|3 = {{#explode:{{{1}}}|,|2}}
|4 = {{#explode:{{{1}}}|,|3}}
|4 = {{#explode:{{{1}}}|,|3}}
|5 = {{#explode:{{{1}}}|,|4}}
|6 = {{#explode:{{{1}}}|,|5}}


|d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}}
|d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}}
Line 12: Line 10:
|d3 = {{Difference|{{#explode:{{{1}}}|,|2}}}}
|d3 = {{Difference|{{#explode:{{{1}}}|,|2}}}}
|d4 = {{Difference|{{#explode:{{{1}}}|,|3}}}}
|d4 = {{Difference|{{#explode:{{{1}}}|,|3}}}}
|d5 = {{Difference|{{#explode:{{{1}}}|,|4}}}}
|d6 = {{Difference|{{#explode:{{{1}}}|,|5}}}}
|Resistance =
{{#ifexpr:{{#explode:{{{1}}}|,|0}} != 0| {{Elements/icons|1}} {{#explode:{{{1}}}|,|0}} |}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} != 0| {{Elements/icons|2}} {{#explode:{{{1}}}|,|1}} |}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} != 0| {{Elements/icons|3}} {{#explode:{{{1}}}|,|2}} |}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} != 0| {{Elements/icons|4}} {{#explode:{{{1}}}|,|3}} |}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} != 0| {{Elements/icons|5}} {{#explode:{{{1}}}|,|4}} |}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} != 0| {{Elements/icons|6}} {{#explode:{{{1}}}|,|5}}|}}
|Threat =
{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|0}} > 1|{{Elements/icons|11}} |{{Elements/icons|1}} |}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|1}} > 1|{{Elements/icons|22}} |{{Elements/icons|2}} |}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|2}} > 1|{{Elements/icons|33}} |{{Elements/icons|3}} |}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|3}} > 1|{{Elements/icons|44}} |{{Elements/icons|4}} |}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|4}} > 1|{{Elements/icons|55}} |{{Elements/icons|5}} |}}|}}{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 0|{{#ifexpr:{{#explode:{{{1}}}|,|5}} > 1|{{Elements/icons|66}} |{{Elements/icons|6}} |}}|}}


|#default =
|#default =

Latest revision as of 13:40, 11 January 2025

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")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")+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