Template:Defense: Difference between revisions

From Archaelund Wiki
(Created page with "<onlyinclude><includeonly>{{#if:{{{1|}}}|{{#switch:{{{2|}}} |1 = {{#explode:{{{1}}}|,|0}} |2 = {{#explode:{{{1}}}|,|1}} |#default = }}}}</includeonly></onlyinclude> {{Docum...")
 
No edit summary
Line 8: Line 8:
}}}}</includeonly></onlyinclude>
}}}}</includeonly></onlyinclude>
{{Documentation}}
{{Documentation}}
[[Category:General Templates]]
[[Category:Character Templates]]

Revision as of 12:17, 4 October 2020

Description

This template generates various output formats from raw defense property input.

Usage

{{Defense|<defense property input>|<format>}}

Make sure that <defense property input> is formatted correctly according to the rules given below, otherwise error messages may be generated.

Format options

FormatDescriptionInputExample output
1...4Extracts the value of the ith entry (i = 1...4) in the defense property input.vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2")2
d1...d4Extracts the value of the ith entry (i = 1...4) in the defense property input and formats it as a bonus/malus using Template:Difference.vector of 4 comma-separated numbers, representing defense values (e.g. "2,15,5,2")

In the above-mentioned vector of 4 comma-separated numbers, each position/index corresponds to a specific defense property. See the subsequent list for details.

Defense property names

IndexName
1Armor
2Avoidance
3Critical Defense
4Armor Training

To extract the individual defense property names use the following syntax:

{{Defense/names|<defense property index>}}

Abbreviated names can be produced for each defense property by using specific double indices:

IndexName
11Arm.
22Avoid.
33Crit. Def.
44Arm. Train.

View/Edit documentation page