Template:Traits/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...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>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> | ||
Revision as of 11:13, 19 September 2020
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
| Format | Description | Input | Example output |
|---|---|---|---|
| 1...7 | Extracts 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 |
| Bonus | Displays 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 and icons
To extract the individual trait names and corresponding icons use the following syntaxes:
{{Traits/names|<trait index>}}
{{Traits/icons|<trait index>}}
Abbreviated names can be produced for each trait by using specific double indices:
| Index | Name |
|---|---|
| 11 | STR |
| 22 | DEX |
| 33 | END |
| 44 | AWA |
| 55 | PER |
| 66 | INT |
| 77 | SLF |