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:Character Templates]]
[[Category:General Templates]]
[[Category:Creature 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

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.

View/Edit documentation page