Template:ArmorAttributes: Difference between revisions
(Created page with "<onlyinclude><includeonly>{{#sub:<!-- -->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Quest|Text=quest item|Image=Star.png}}<!-- -->|0|-1}}</includeonly></onlyinclude> {{Documentation}}...") |
(Added craftable and crafting attributes) |
||
| Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#sub:<!-- | <onlyinclude><includeonly>{{#sub:<!-- | ||
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Quest|Text=quest item|Image=Star.png}}<!-- | -->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Quest|Text=quest item|Image=Star.png}}<!-- | ||
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Craftable|Text=can be crafted|Image=Crafting Tools.png}}<!-- | |||
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Crafting|Text=crafting material|Image=Log.png}}<!-- | |||
-->|0|-1}}</includeonly></onlyinclude> | -->|0|-1}}</includeonly></onlyinclude> | ||
{{Documentation}} | {{Documentation}} | ||
[[Category:Armor Templates]] | [[Category:Armor Templates]] | ||
Revision as of 23:48, 22 March 2025
Description
This template contains the predefined armor attributes to be used within Template:Armor and takes a list of the corresponding tags (Quest • Craftable • Crafting) as input. The output is a list of the description (either as text or image) to be displayed on the Wiki page.
Note that the order of the output list produced by this template is fixed, irrespective of the order of the input list. Unknown or duplicate tags are ignored.
Usage
{{ArmorAttributes|<format>|<semicolon-separated list of tags>}}
Format options
| Format | Description | Example output |
|---|---|---|
| Text | Outputs a semicolon-separated list of the attribute descriptions (plain text). | quest item;can be crafted;crafting material |
| Image | Outputs a semicolon-separated list of the attribute icons, with the respective attribute description shown as a tooltip. | |
| Tag | Outputs a semicolon-separated list of all available attribute tags. This is intended for documentation purposes only. | Quest;Craftable;Crafting |
The semicolon-separated output lists may further be processed by using Template:ListFormat.
How to add new armor attributes
In order to add a new attribute, you have to insert the following line in the template's code (only parts indicated by <...> may be edited):
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=<new tag>|Text=<output text>|Image=<output icon>}}<!--
Note that the order of the attribute lines directly determines the order of the output list, so choose the position of the inserted code accordingly.
View/Edit documentation page