Template:Stats/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...8</td><td>Extracts the value of the ith entry (i = 1...8) in the stats input.</td><td>vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5")</td><td>{{Stats|30,20,8,2,-1,3,0,5|1}}</td></tr> | ||
<tr><td>d1... | <tr><td>d1...d8</td><td>Extracts the value of the ith entry (i = 1...8) in the stats input and formats it as a bonus/malus using [[Template:Difference]].</td><td>vector of 8 comma-separated numbers, representing stat values (e.g. "30,20,8,2,-1,3,0,5")</td><td>{{Stats|30,20,8,2,-1,3,0,5|d4}}</td></tr> | ||
</table> | </table> | ||
In the above-mentioned vector of | 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 == | == Stat names == | ||
| Line 25: | Line 25: | ||
<tr><td>5</td><td>{{Stats/names|5}}</td></tr> | <tr><td>5</td><td>{{Stats/names|5}}</td></tr> | ||
<tr><td>6</td><td>{{Stats/names|6}}</td></tr> | <tr><td>6</td><td>{{Stats/names|6}}</td></tr> | ||
<tr><td>7</td><td>{{Stats/names|7}}</td></tr> | |||
<tr><td>8</td><td>{{Stats/names|8}}</td></tr> | |||
</table> | </table> | ||
To extract the individual stat names use the following syntax: | To extract the individual stat names use the following syntax: | ||
| Line 39: | Line 41: | ||
<tr><td>55</td><td>{{Stats/names|55}}</td></tr> | <tr><td>55</td><td>{{Stats/names|55}}</td></tr> | ||
<tr><td>66</td><td>{{Stats/names|66}}</td></tr> | <tr><td>66</td><td>{{Stats/names|66}}</td></tr> | ||
<tr><td>77</td><td>{{Stats/names|77}}</td></tr> | |||
<tr><td>88</td><td>{{Stats/names|88}}</td></tr> | |||
</table> | </table> | ||
Latest revision as of 21:01, 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. |