Template:Traits/doc: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
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...7</td><td>Extracts the trait value of the ith entry (i = 1...7) in the trait input.</td><td>vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")</td><td>{{Traits|4,8,8,5,6,3,6|1}}</td></tr>
<tr><td>d1...d7</td><td>Extracts the trait value of the ith entry (i = 1...7) in the trait input and formats it as a bonus/malus using [[Template:Difference]].</td><td>vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")</td><td>{{Traits|4,8,8,5,6,3,6|d1}}</td></tr>
<tr><td>Bonus</td><td>Displays trait symbols and the corresponding bonus values.</td><td>vector of 7 comma-separated numbers, representing trait bonus values (e.g. "2,0,1,0,0,-1,0")</td><td>{{Traits|2,0,1,0,0,-1,0|Bonus}}</td></tr>
<tr><td>Bonus</td><td>Displays trait symbols and the corresponding bonus values.</td><td>vector of 7 comma-separated numbers, representing trait bonus values (e.g. "2,0,1,0,0,-1,0")</td><td>{{Traits|2,0,1,0,0,-1,0|Bonus}}</td></tr>
</table>
</table>
In the above-mentioned vector of 7 comma-separated numbers, each position/index corresponds to a specific trait. See the subsequent list for details.
In the above-mentioned vector of 7 comma-separated numbers, each position/index corresponds to a specific trait. See the subsequent list for details.


== Trait names and icons ==
== Trait names ==
<table class="wikitable>
<table class="wikitable>
<tr><th>Index</th><th>Name</th><th>Icon</th></tr>
<tr><th>Index</th><th>Name</th></tr>
<tr><td>1</td><td>{{Traits/names|1}}</td><td>{{Traits/icons|1}}</td></tr>
<tr><td>1</td><td>{{Traits/names|1}}</td></tr>
<tr><td>2</td><td>{{Traits/names|2}}</td><td>{{Traits/icons|2}}</td></tr>
<tr><td>2</td><td>{{Traits/names|2}}</td></tr>
<tr><td>3</td><td>{{Traits/names|3}}</td><td>{{Traits/icons|3}}</td></tr>
<tr><td>3</td><td>{{Traits/names|3}}</td></tr>
<tr><td>4</td><td>{{Traits/names|4}}</td><td>{{Traits/icons|4}}</td></tr>
<tr><td>4</td><td>{{Traits/names|4}}</td></tr>
<tr><td>5</td><td>{{Traits/names|5}}</td><td>{{Traits/icons|5}}</td></tr>
<tr><td>5</td><td>{{Traits/names|5}}</td></tr>
<tr><td>6</td><td>{{Traits/names|6}}</td><td>{{Traits/icons|6}}</td></tr>
<tr><td>6</td><td>{{Traits/names|6}}</td></tr>
<tr><td>7</td><td>{{Traits/names|7}}</td><td>{{Traits/icons|7}}</td></tr>
<tr><td>7</td><td>{{Traits/names|7}}</td></tr>
</table>
</table>
To extract the individual trait names and corresponding icons use the following syntaxes:
To extract the individual trait names use the following syntax:
<pre>
<pre>
{{Traits/names|<trait index>}}
{{Traits/names|<trait index>}}
{{Traits/icons|<trait index>}}
</pre>
</pre>
Abbreviated names can be produced for each trait by using specific double indices:
Abbreviated names can be produced for each trait by using specific double indices:

Latest revision as of 13:52, 25 November 2023

Description

This template generates various output formats from raw trait input.

Usage

{{Traits|<trait input>|<format>}}

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

Format options

FormatDescriptionInputExample output
1...7Extracts the trait value of the ith entry (i = 1...7) in the trait input.vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")4
d1...d7Extracts the trait value of the ith entry (i = 1...7) in the trait input and formats it as a bonus/malus using Template:Difference.vector of 7 comma-separated numbers, representing trait values (e.g. "4,8,8,5,6,3,6")+4
BonusDisplays trait symbols and the corresponding bonus values.vector of 7 comma-separated numbers, representing trait bonus values (e.g. "2,0,1,0,0,-1,0")STR 2 END 1 INT -1

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

Trait names

IndexName
1Strength
2Dexterity
3Endurance
4Awareness
5Personality
6Intellect
7Self-Control

To extract the individual trait names use the following syntax:

{{Traits/names|<trait index>}}

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

IndexName
11STR
22DEX
33END
44AWA
55PER
66INT
77SLF