Template:Elements/doc: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
Line 33: Line 33:
{{Elements/icons|<element index>}}
{{Elements/icons|<element index>}}
</pre>
</pre>
Special double icons can be produced for each element by using specific double indices:
Abbreviated names and special double icons can be produced for each element by using specific double indices:
<table class="wikitable>
<table class="wikitable>
<tr><th>Index</th><th>Icon</th></tr>
<tr><th>Index</th><th>Name</th><th>Icon</th></tr>
<tr><td>11</td><td>{{Elements/icons|11}}</td></tr>
<tr><td>11</td><td>{{Elements/names|11}}</td><td>{{Elements/icons|11}}</td></tr>
<tr><td>22</td><td>{{Elements/icons|22}}</td></tr>
<tr><td>22</td><td>{{Elements/names|22}}</td><td>{{Elements/icons|22}}</td></tr>
<tr><td>33</td><td>{{Elements/icons|33}}</td></tr>
<tr><td>33</td><td>{{Elements/names|33}}</td><td>{{Elements/icons|33}}</td></tr>
<tr><td>44</td><td>{{Elements/icons|44}}</td></tr>
<tr><td>44</td><td>{{Elements/names|44}}</td><td>{{Elements/icons|44}}</td></tr>
<tr><td>55</td><td>{{Elements/icons|55}}</td></tr>
<tr><td>55</td><td>{{Elements/names|55}}</td><td>{{Elements/icons|55}}</td></tr>
<tr><td>66</td><td>{{Elements/icons|66}}</td></tr>
<tr><td>66</td><td>{{Elements/names|66}}</td><td>{{Elements/icons|66}}</td></tr>
</table>
</table>

Revision as of 13:46, 17 February 2024

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...6Extracts the resistance value of the ith entry (i = 1...6) in the element input.vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")10
d1...d6Extracts the resistance value of the ith entry (i = 1...6) in the element input and formats it as a bonus/malus using Template:Difference.vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0")+10
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 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
5
6

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
55
66