Template:Offense/doc: Difference between revisions
From Archaelund Wiki
(Created page with "== Description == This template generates various output formats from raw offense property input. == Usage == <pre> {{Stats|<offense property input>|<format>}} </pre> Make su...") |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{ | {{Offense|<offense property input>|<format>}} | ||
</pre> | </pre> | ||
Make sure that <offense property input> is formatted correctly according to the rules given below, otherwise error messages may be generated. | Make sure that <offense property input> is formatted correctly according to the rules given below, otherwise error messages may be generated. | ||
| 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... | <tr><td>1...9</td><td>Extracts the value of the ith entry (i = 1...9) in the offense property input.</td><td>vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1")</td><td>{{Offense|3,8,0,1,4,1,50,10,1|1}}</td></tr> | ||
<tr><td>Damage</td><td>Displays consolidated damage information, including element icons.</td><td>vector of | <tr><td>d1...d9</td><td>Extracts the value of the ith entry (i = 1...9) in the offense property input and formats it as a bonus/malus using [[Template:Difference]].</td><td>vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1")</td><td>{{Offense|3,8,0,1,4,1,50,10,1|d1}}</td></tr> | ||
<tr><td>Damage</td><td>Displays consolidated damage information, including element icons.</td><td>vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1")</td><td>{{Offense|3,8,0,1,4,1,50,10,1|Damage}}</td></tr> | |||
</table> | </table> | ||
In the above-mentioned vector of | In the above-mentioned vector of 9 comma-separated numbers, each position/index corresponds to a specific offense property. See the subsequent list for details. | ||
== | == Offense property names == | ||
<table class="wikitable> | <table class="wikitable> | ||
<tr><th>Index</th><th>Name</th></tr> | <tr><th>Index</th><th>Name</th></tr> | ||
| Line 26: | Line 27: | ||
<tr><td>6</td><td>{{Offense/names|6}}</td></tr> | <tr><td>6</td><td>{{Offense/names|6}}</td></tr> | ||
<tr><td>7</td><td>{{Offense/names|7}}</td></tr> | <tr><td>7</td><td>{{Offense/names|7}}</td></tr> | ||
</table> | <tr><td>8</td><td>{{Offense/names|8}}</td></tr> | ||
<tr><td>9</td><td>{{Offense/names|9}}</td></tr></table> | |||
To extract the individual offense property names use the following syntax: | To extract the individual offense property names use the following syntax: | ||
<pre> | <pre> | ||
| Line 41: | Line 43: | ||
<tr><td>66</td><td>{{Offense/names|66}}</td></tr> | <tr><td>66</td><td>{{Offense/names|66}}</td></tr> | ||
<tr><td>77</td><td>{{Offense/names|77}}</td></tr> | <tr><td>77</td><td>{{Offense/names|77}}</td></tr> | ||
<tr><td>88</td><td>{{Offense/names|88}}</td></tr> | |||
<tr><td>99</td><td>{{Offense/names|99}}</td></tr> | |||
</table> | |||
== Damage types == | |||
Offense entries 3 ({{Offense/names|3}}) and 6 ({{Offense/names|6}}) take the following indices as values: | |||
<table class="wikitable> | |||
<tr><th>Index</th><th>Name</th><th>Icon</th></tr> | |||
<tr><td>0</td><td>Normal</td><td>−</td></tr> | |||
<tr><td>1</td><td>{{Elements/names|1}}</td><td>{{Elements/icons|1}}</td></tr> | |||
<tr><td>2</td><td>{{Elements/names|2}}</td><td>{{Elements/icons|2}}</td></tr> | |||
<tr><td>3</td><td>{{Elements/names|3}}</td><td>{{Elements/icons|3}}</td></tr> | |||
<tr><td>4</td><td>{{Elements/names|4}}</td><td>{{Elements/icons|4}}</td></tr> | |||
</table> | </table> | ||
Latest revision as of 06:53, 9 June 2025
Description
This template generates various output formats from raw offense property input.
Usage
{{Offense|<offense property input>|<format>}}
Make sure that <offense property input> is formatted correctly according to the rules given below, otherwise error messages may be generated.
Format options
| Format | Description | Input | Example output |
|---|---|---|---|
| 1...9 | Extracts the value of the ith entry (i = 1...9) in the offense property input. | vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1") | 3 |
| d1...d9 | Extracts the value of the ith entry (i = 1...9) in the offense property input and formats it as a bonus/malus using Template:Difference. | vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1") | +3 |
| Damage | Displays consolidated damage information, including element icons. | vector of 9 comma-separated numbers, representing offense values (e.g. "3,8,0,1,4,1,50,10,1") | 3−8 + |
In the above-mentioned vector of 9 comma-separated numbers, each position/index corresponds to a specific offense property. See the subsequent list for details.
Offense property names
| Index | Name |
|---|---|
| 1 | Min. Damage |
| 2 | Max. Damage |
| 3 | Damage Type |
| 4 | Min. Extra Damage |
| 5 | Max. Extra Damage |
| 6 | Extra Damage Type |
| 7 | Accuracy |
| 8 | Critical Chance |
| 9 | Armor Piercing |
To extract the individual offense property names use the following syntax:
{{Offense/names|<offense property index>}}
Abbreviated names can be produced for each offense property by using specific double indices:
| Index | Name |
|---|---|
| 11 | Damage |
| 22 | Damage |
| 33 | Damage |
| 44 | Damage |
| 55 | Damage |
| 66 | Damage |
| 77 | Acc. |
| 88 | Crit. |
| 99 | Arm. Pierc. |
Damage types
Offense entries 3 (Damage Type) and 6 (Extra Damage Type) take the following indices as values:
| Index | Name | Icon |
|---|---|---|
| 0 | Normal | − |
| 1 | Fire | |
| 2 | Cold | |
| 3 | Shock | |
| 4 | Toxic |