Template:Elements/doc: Difference between revisions
From Archaelund Wiki
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
<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>1...6</td><td>Extracts the resistance value of the ith entry (i = 1...6) in the element input.</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|1}}</td></tr> | <tr><td>1...6</td><td>Extracts the resistance value of the ith entry (i = 1...6) in the element input.</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|1}}</td></tr> | ||
<tr><td>d1...d6</td><td>Extracts the resistance value of the ith entry (i = 1...6) in the element input and formats it as a bonus/malus using [[Template:Difference]].</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|d1}}</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>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> | ||
Revision as of 09:02, 20 March 2022
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
| Format | Description | Input | Example output |
|---|---|---|---|
| 1...6 | Extracts 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...d6 | Extracts 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 |
| Resistance | Displays elemental symbols and the corresponding resistance values. | vector of 6 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0") | |
| Threat | Displays 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
| Index | Name | Icon |
|---|---|---|
| 1 | Fire | |
| 2 | Cold | |
| 3 | Shock | |
| 4 | Toxic | |
| 5 | ||
| 6 |
To extract the individual element names and corresponding icons use the following syntaxes:
{{Elements/names|<element index>}}
{{Elements/icons|<element index>}}
Special double icons can be produced for each element by using specific double indices:
| Index | Icon |
|---|---|
| 11 | |
| 22 | |
| 33 | |
| 44 | |
| 55 | |
| 66 |