Template:Resistances
From Archaelund Wiki
Description
This template generates various output formats from raw resistance input.
Usage
{{Resistances|<resistance input>|<format>}}
Make sure that <resistance input> is formatted correctly according to the rules given below, otherwise error messages may be generated.
Format options
| Format | Description | Input | Example output |
|---|---|---|---|
| 1...7 | Extracts the resistance value of the ith entry (i = 1...7) in the resistance input. | vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,0") | 10 |
| d1...d7 | Extracts the resistance value of the ith entry (i = 1...7) in the resistance input and formats it as a bonus/malus using Template:Difference. | vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,0") | +10 |
| Resistance | Displays resistance symbols and the corresponding resistance values. | vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,2") | |
| Threat | Displays resistance symbols according to threat level. | vector of 7 comma-separated numbers, representing threat level 0...2 (e.g. "0,2,0,0,1,1,2") |
In the above-mentioned vector of 7 comma-separated numbers, each position/index corresponds to a specific resistance. See the subsequent list for details.
Resistance names and icons
| Index | Name | Icon |
|---|---|---|
| 1 | Fire Protection | |
| 2 | Cold Protection | |
| 3 | Shock Protection | |
| 4 | Vitality Resistance | |
| 5 | Spirit Resistance | |
| 6 | Mind Resistance | |
| 7 | Toxic Protection |
To extract the individual resistance names and corresponding icons use the following syntaxes:
{{Resistances/names|<resistance index>}}
{{Resistances/icons|<resistance index>}}
Abbreviated names and special double icons can be produced for each resistance by using specific double indices:
| Index | Name | Icon |
|---|---|---|
| 11 | Fire Prot. | |
| 22 | Cold Prot. | |
| 33 | Shock Prot. | |
| 44 | Vitality Res. | |
| 55 | Spirit Res. | |
| 66 | Mind Res. | |
| 77 | Toxic Prot. |
View/Edit documentation page