Tags - massif-press/lancer-data GitHub Wiki
Overview
Tag data defines possible equipment Tags. Tags are loaded first and referenced by other data types (eg. equipment, weapons, etc) via their ID. Equipment referencing missing tags will throw errors, so ensure that the correct dependencies are included. See LCP Dependencies for more information.
Definition
tags.json
ITagData: {
"id": string,
"name": string,
"description": string, // v-html, see note below
"hidden"?: boolean
"filter_ignore"?: boolean
}
Required Fields
id
Internal identifier. This must be globally unique. See Item ID Guidelines for more information.
name
The display name of the tag. This may include the special {VAL} token, see below.
description
Detail and rule text for the tag. HTML syntax is allowed. This may include the special {VAL} token, see below.
Optional Fields
hidden
hidden is used to render app UI features and cannot be added to - however - these hidden tags can be given to custom content:
| Tag ID | Behavior |
|---|---|
tg_set_max_uses |
Set item maximum uses |
tg_set_damage_type |
Set item damage type |
tg_set_damage_value |
Set item damage value |
filter_ignore
filter_ignore will prevent this tag from appearing in equipment filters. Mostly this is used to avoid redundancies in the filter menu (eg, tagged range types), but may be useful in other circumstances.
{VAL}
Tag names and descriptions may include the string "{VAL}", a token that will be replaced with any val parameter passed to the ITagData object of tagged equipment. For example, the following tag:
{
"id": "tg_my_tag",
"name": "My Tag",
"description": "The value is: {VAL}"
}
provided with the following ITagData:
{
"id": "tg_my_tag",
"val" "Hello World!"
}
will render in COMP/CON as:
The value is: Hello World!
It's important to keep in mind that all val passed to the description will be rendered as a string, so eg. 2 + 2 will render as "2 + 2" and not "4"
If the {VAL} token is not present in the name or description, any val passed to the tag will be ignored.
If the {VAL} token is present in the name or description, but no val is passed to the tag, the token will be replaced with an integer value of 1.
Example
from lancer-data/lib/tags.json
{
"id": "tg_thrown",
"name": "Thrown {VAL}",
"description": "This melee weapon can be thrown at targets within {VAL} spaces. Thrown attacks follow the rules for melee attacks but are affected by cover; additionally, a thrown weapon comes to rest in an adjacent space to its target and must be retrieved as a free action while adjacent to that weapon before it can be used again."
},