Template:Defense: Difference between revisions
From Archaelund Wiki
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
|1 = {{#explode:{{{1}}}|,|0}} | |1 = {{#explode:{{{1}}}|,|0}} | ||
|2 = {{#explode:{{{1}}}|,|1}} | |2 = {{#explode:{{{1}}}|,|1}} | ||
|3 = {{#explode:{{{1}}}|,|2}} | |||
|4 = {{#explode:{{{1}}}|,|3}} | |||
|5 = {{#explode:{{{1}}}|,|4}} | |||
|d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}} | |d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}} | ||
|d2 = {{Difference|{{#explode:{{{1}}}|,|1}}}} | |d2 = {{Difference|{{#explode:{{{1}}}|,|1}}}} | ||
|d3 = {{Difference|{{#explode:{{{1}}}|,|2}}}} | |||
|d4 = {{Difference|{{#explode:{{{1}}}|,|3}}}} | |||
|d5 = {{Difference|{{#explode:{{{1}}}|,|4}}}} | |||
|#default = | |#default = | ||
Revision as of 20:00, 20 November 2023
Description
This template generates various output formats from raw defense property input.
Usage
{{Defense|<defense property input>|<format>}}
Make sure that <defense property 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 defense property input. | vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2") | 2 |
| d1...d4 | Extracts the value of the ith entry (i = 1...4) in the defense property input and formats it as a bonus/malus using Template:Difference. | vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2") | +2 |
In the above-mentioned vector of 4 comma-separated numbers, each position/index corresponds to a specific defense property. See the subsequent list for details.
Defense property names
| Index | Name |
|---|---|
| 1 | Armor |
| 2 | Avoidance |
| 3 | Critical Defense |
| 4 | Armor Training |
To extract the individual defense property names use the following syntax:
{{Defense/names|<defense property index>}}
Abbreviated names can be produced for each defense property by using specific double indices:
| Index | Name |
|---|---|
| 11 | Arm. |
| 22 | Avoid. |
| 33 | Crit. Def. |
| 44 | Arm. Train. |
View/Edit documentation page