Template:Stats/doc: Difference between revisions
From Archaelund Wiki
(Created page with "== Description == This template generates various output formats from raw stats input. == Usage == <pre> {{Stats|<stats input>|<format>}} </pre> Make sure that <stats input>...") |
No edit summary |
||
| Line 12: | Line 12: | ||
<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...6</td><td>Extracts the value of the ith entry (i = 1...6) in the stats input.</td><td>vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0")</td><td>{{Stats|52,11,10,18,3,0|1}}</td></tr> | <tr><td>1...6</td><td>Extracts the value of the ith entry (i = 1...6) in the stats input.</td><td>vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0")</td><td>{{Stats|52,11,10,18,3,0|1}}</td></tr> | ||
<tr><td>d1...d6</td><td>Extracts the value of the ith entry (i = 1...6) in the stats input and formats it as a bonus/malus using [[Template:Difference]].</td><td>vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0")</td><td>{{Stats|52,11,10,18,3,0|d1}}</td></tr> | |||
</table> | </table> | ||
In the above-mentioned vector of 6 comma-separated numbers, each position/index corresponds to a specific stat. See the subsequent list for details. | In the above-mentioned vector of 6 comma-separated numbers, each position/index corresponds to a specific stat. See the subsequent list for details. | ||
Revision as of 09:09, 20 March 2022
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...6 | Extracts the value of the ith entry (i = 1...6) in the stats input. | vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0") | 52 |
| d1...d6 | Extracts the value of the ith entry (i = 1...6) in the stats input and formats it as a bonus/malus using Template:Difference. | vector of 6 comma-separated numbers, representing stat values (e.g. "52,11,10,18,3,0") | +52 |
In the above-mentioned vector of 6 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 |
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 |