Tags
In the Alacrity system, a tag is a key-value pair that can be attached to entities. The purpose of a tag is to define a numeric or string value that can be used to filter entities in queries or group them.
A tag consists of a name and a value. The name is a string that identifies
the tag, while the value can be one of the following data types: i64,
or string. The int version of the value is used on bitwise operations,
so it can represent just 64 different kind of values.
Tags can be attached to entities, and once attached, they can be used to filter or group entities. For example, entities can be grouped by their tag values, or they can be filtered based on their tag values. Tags can also be used in the definition of propagation maps, allowing buffs to propagate only to entities with certain tag values.
In Alacrity, the Tag type represents a tag, and it includes the name and value of the tag. Tags can be created and manipulated in both Rust and Lua APIs, and can be passed from Rust to Lua and from Lua to Rust. Refer to the Tags section to know more about how to use the tagging system.