Template:Stats: Difference between revisions
From Archaelund Wiki
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
|5 = {{#explode:{{{1}}}|,|4}} | |5 = {{#explode:{{{1}}}|,|4}} | ||
|6 = {{#explode:{{{1}}}|,|5}} | |6 = {{#explode:{{{1}}}|,|5}} | ||
|7 = {{#explode:{{{1}}}|,|6}} | |||
|8 = {{#explode:{{{1}}}|,|7}} | |||
|d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}} | |d1 = {{Difference|{{#explode:{{{1}}}|,|0}}}} | ||
| Line 14: | Line 16: | ||
|d5 = {{Difference|{{#explode:{{{1}}}|,|4}}}} | |d5 = {{Difference|{{#explode:{{{1}}}|,|4}}}} | ||
|d6 = {{Difference|{{#explode:{{{1}}}|,|5}}}} | |d6 = {{Difference|{{#explode:{{{1}}}|,|5}}}} | ||
|d7 = {{Difference|{{#explode:{{{1}}}|,|6}}}} | |||
|d8 = {{Difference|{{#explode:{{{1}}}|,|7}}}} | |||
|#default = | |#default = | ||
| Line 19: | Line 23: | ||
}}}}</includeonly></onlyinclude> | }}}}</includeonly></onlyinclude> | ||
{{Documentation}} | {{Documentation}} | ||
[[Category: | [[Category:General Templates]] | ||
Latest revision as of 20:51, 4 February 2024
Description
This template generates various output formats from raw stats input.
Usage
{{Stats|<stats input>|<format>}}
Make sure that <stats input> is formatted correctly according to the rules given below, otherwise error messages may be generated.
Format options
| Format | Description | Input | Example output |
|---|---|---|---|
| 1...8 | Extracts the value of the ith entry (i = 1...8) in the stats input. | vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5") | 30 |
| d1...d8 | Extracts the value of the ith entry (i = 1...8) in the stats input and formats it as a bonus/malus using Template:Difference. | vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5") | +2 |
In the above-mentioned vector of 8 comma-separated numbers, each position/index corresponds to a specific stat. See the subsequent list for details.
Stat names
| Index | Name |
|---|---|
| 1 | Health Points |
| 2 | Willpower |
| 3 | Action Points |
| 4 | Movement Points |
| 5 | Initiative |
| 6 | Spell Power |
| 7 | Enchantment |
| 8 | Max. Spells |
To extract the individual stat names use the following syntax:
{{Stats/names|<stat index>}}
Abbreviated names can be produced for each stat by using specific double indices:
| Index | Name |
|---|---|
| 11 | HP |
| 22 | WP |
| 33 | AP |
| 44 | MP |
| 55 | Init. |
| 66 | SP |
| 77 | Enchant. |
| 88 | Max. Sp. |
View/Edit documentation page