Template:Resistances/doc: Difference between revisions
From Archaelund Wiki
(Created page with "== Description == This template generates various output formats from raw resistance input. == Usage == <pre> {{Resistances|<resistance input>|<format>}} </pre> Make sure that <resistance input> is formatted correctly according to the rules given below, otherwise error messages may be generated. == Format options == <table class="wikitable> <tr><th>Format</th><th>Description</th><th>Input</th><th>Example output</th></tr> <tr><td>1...6</td><td>Extracts the resistance va...") |
No edit summary |
||
| Line 18: | Line 18: | ||
In the above-mentioned vector of 6 comma-separated numbers, each position/index corresponds to a specific resistance. See the subsequent list for details. | In the above-mentioned vector of 6 comma-separated numbers, each position/index corresponds to a specific resistance. See the subsequent list for details. | ||
== | == Resistance names and icons == | ||
<table class="wikitable> | <table class="wikitable> | ||
<tr><th>Index</th><th>Name</th><th>Icon</th></tr> | <tr><th>Index</th><th>Name</th><th>Icon</th></tr> | ||
Revision as of 12:33, 11 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...6 | Extracts the resistance value of the ith entry (i = 1...6) in the resistance 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 resistance 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 resistance 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 resistance 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 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 |
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. |