Template:Elements
From Archaelund Wiki
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...4 | Extracts 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...d4 | Extracts 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
| Index | Name | Icon |
|---|---|---|
| 1 | Fire | |
| 2 | Cold | |
| 3 | Shock | |
| 4 | Toxic |
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:
| Index | Name | Icon |
|---|---|---|
| 11 | Fire | |
| 22 | Cold | |
| 33 | Shock | |
| 44 | Toxic |
View/Edit documentation page