Template:Elements/doc: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
Line 6: Line 6:
{{Elements|<element input>|<format>}}
{{Elements|<element input>|<format>}}
</pre>
</pre>
Make sure that the element input is formatted correctly, otherwise error messages may be generated.
Make sure that <element input> is formatted correctly according to the rules given below, otherwise error messages may be generated.


== Format options ==
== Format options ==
<table class="wikitable>
<table class="wikitable>
<tr><th>Format</th><th>Description</th><th>Input</th><th>Example output</th></tr>
<tr><th>Format</th><th>Description</th><th>Input</th><th>Example output</th></tr>
<tr><td>Resistance</td><td>Displays elemental symbols and the corresponding resistance values.</td><td>vector of 6 comma-separated numbers, representing resistance values (e.g. 10,0,50,-10,0,0)</td><td>{{Elements|10,0,50,-10,0,0|Resistance}}</td></tr>
<tr><td>Resistance</td><td>Displays elemental symbols and the corresponding resistance values.</td><td>vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")</td><td>{{Elements|10,0,50,-10,0,0|Resistance}}</td></tr>
<tr><td>Threat</td><td>Displays elemental symbols according to threat level.</td><td>vector of 6 comma-separated numbers, representing threat level 0...2 (e.g. 0,2,0,0,1,1)</td><td>{{Elements|0,2,0,0,1,1|Threat}}</td></tr>
<tr><td>Threat</td><td>Displays elemental symbols according to threat level.</td><td>vector of 6 comma-separated numbers, representing threat level 0...2 (e.g. "0,2,0,0,1,1")</td><td>{{Elements|0,2,0,0,1,1|Threat}}</td></tr>
</table>
</table>
In the above-mentioned vector of 6 comma-separated number, every position corresponds to a specific element. See the subsequent list for details.


== Element names and icons ==
== Element names and icons ==
<table class="wikitable>
<tr><th>Index</th><th>Name</th><th>Icon</th></tr>
<tr><td>1</td><td>{{Elements/names|1}}</td><td>{{Elements/icons|1}}</td></tr>
<tr><td>2</td><td>{{Elements/names|2}}</td><td>{{Elements/icons|2}}</td></tr>
<tr><td>3</td><td>{{Elements/names|3}}</td><td>{{Elements/icons|3}}</td></tr>
<tr><td>4</td><td>{{Elements/names|4}}</td><td>{{Elements/icons|4}}</td></tr>
<tr><td>5</td><td>{{Elements/names|5}}</td><td>{{Elements/icons|5}}</td></tr>
<tr><td>6</td><td>{{Elements/names|6}}</td><td>{{Elements/icons|6}}</td></tr>
</table>
To extract the individual element names and corresponding icons use the following syntaxes:
To extract the individual element names and corresponding icons use the following syntaxes:
<pre>
<pre>
Line 21: Line 31:
{{Elements/icons|<element index>}}
{{Elements/icons|<element index>}}
</pre>
</pre>
Here, the element index 1...6 corresponds to the element's position in the above-mentioned element vector.

Revision as of 11:34, 13 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
ResistanceDisplays elemental symbols and the corresponding resistance values.vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")
ThreatDisplays elemental symbols according to threat level.vector of 6 comma-separated numbers, representing threat level 0...2 (e.g. "0,2,0,0,1,1")

In the above-mentioned vector of 6 comma-separated number, every position corresponds to a specific element. See the subsequent list for details.

Element names and icons

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

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

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