Template:WeaponAttributes: Difference between revisions

From Archaelund Wiki
(Created page with "<onlyinclude><includeonly>{{#sub:<!-- -->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Quest|Text=quest item|Image=Star.png}}<!-- -->|0|-1}}</includeonly></onlyinclude> {{Documentation}}...")
 
No edit summary
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=Craft|Text=can be crafted|Image=Tinker.png}}<!--
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Ingredient|Text=used for crafting|Image=Usable.png}}<!--
-->{{Attribute|{{{1|}}}|{{{2|}}}|Tag=Summon|Text=can be summoned|Image=Djinn.png}}<!--
-->|0|-1}}</includeonly></onlyinclude>
-->|0|-1}}</includeonly></onlyinclude>
{{Documentation}}
{{Documentation}}
[[Category:Weapon Templates]]
[[Category:Weapon Templates]]

Revision as of 20:10, 22 January 2025

Description

This template contains the predefined weapon attributes to be used within Template:Weapon and takes a list of the corresponding tags (Quest • Craft • Ingredient • Summon) 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

{{WeaponAttributes|<format>|<semicolon-separated list of tags>}}

Format options

FormatDescriptionExample output
TextOutputs a semicolon-separated list of the attribute descriptions (plain text).quest item;can be crafted;used for crafting;can be summoned
ImageOutputs a semicolon-separated list of the attribute icons, with the respective attribute description shown as a tooltip.quest item;can be crafted;used for crafting;can be summoned
TagOutputs a semicolon-separated list of all available attribute tags. This is intended for documentation purposes only.Quest;Craft;Ingredient;Summon

The semicolon-separated output lists may further be processed by using Template:ListFormat.

How to add new weapon 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