Template:Resistances/doc: Difference between revisions
From Archaelund Wiki
No edit summary |
No edit summary |
||
| Line 11: | Line 11: | ||
<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>1... | <tr><td>1...7</td><td>Extracts the resistance value of the ith entry (i = 1...7) in the resistance input.</td><td>vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,0")</td><td>{{Resistances|10,0,50,-10,0,0,0|1}}</td></tr> | ||
<tr><td>d1... | <tr><td>d1...d7</td><td>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]].</td><td>vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,0")</td><td>{{Resistances|10,0,50,-10,0,0,0|d1}}</td></tr> | ||
<tr><td>Resistance</td><td>Displays resistance symbols and the corresponding resistance values.</td><td>vector of | <tr><td>Resistance</td><td>Displays resistance symbols and the corresponding resistance values.</td><td>vector of 7 comma-separated numbers, representing resistance values (e.g. "10,0,50,-10,0,0,2")</td><td>{{Resistances|10,0,50,-10,0,0,2|Resistance}}</td></tr> | ||
<tr><td>Threat</td><td>Displays resistance symbols according to threat level.</td><td>vector of | <tr><td>Threat</td><td>Displays resistance symbols according to threat level.</td><td>vector of 7 comma-separated numbers, representing threat level 0...2 (e.g. "0,2,0,0,1,1,2")</td><td>{{Resistances|0,2,0,0,1,1,2|Threat}}</td></tr> | ||
</table> | </table> | ||
In the above-mentioned vector of | 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 == | == Resistance names and icons == | ||
| Line 27: | Line 27: | ||
<tr><td>5</td><td>{{Resistances/names|5}}</td><td>{{Resistances/icons|5}}</td></tr> | <tr><td>5</td><td>{{Resistances/names|5}}</td><td>{{Resistances/icons|5}}</td></tr> | ||
<tr><td>6</td><td>{{Resistances/names|6}}</td><td>{{Resistances/icons|6}}</td></tr> | <tr><td>6</td><td>{{Resistances/names|6}}</td><td>{{Resistances/icons|6}}</td></tr> | ||
<tr><td>7</td><td>{{Resistances/names|7}}</td><td>{{Resistances/icons|7}}</td></tr> | |||
</table> | </table> | ||
To extract the individual resistance names and corresponding icons use the following syntaxes: | To extract the individual resistance names and corresponding icons use the following syntaxes: | ||
| Line 42: | Line 43: | ||
<tr><td>55</td><td>{{Resistances/names|55}}</td><td>{{Resistances/icons|55}}</td></tr> | <tr><td>55</td><td>{{Resistances/names|55}}</td><td>{{Resistances/icons|55}}</td></tr> | ||
<tr><td>66</td><td>{{Resistances/names|66}}</td><td>{{Resistances/icons|66}}</td></tr> | <tr><td>66</td><td>{{Resistances/names|66}}</td><td>{{Resistances/icons|66}}</td></tr> | ||
<tr><td>77</td><td>{{Resistances/names|77}}</td><td>{{Resistances/icons|77}}</td></tr> | |||
</table> | </table> | ||
Latest revision as of 20:21, 14 January 2025
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. |