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...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...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...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>
<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 6 comma-separated numbers, each position/index corresponds to a specific stat. See the subsequent list for details.
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

FormatDescriptionInputExample output
1...8Extracts 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...d8Extracts 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

IndexName
1Health Points
2Willpower
3Action Points
4Movement Points
5Initiative
6Spell Power
7Enchantment
8Max. 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:

IndexName
11HP
22WP
33AP
44MP
55Init.
66SP
77Enchant.
88Max. Sp.