Tag
A tag is a first-class, renameable label entity. You attach tags to
nodes, scenes, items, locations, and codex entries through the tags
field in those entities’ inspectors, then filter on them in expressions
with HasTag, Count, and the play-history functions.
For conventions shared by all entity types, see Entities.
Played(tag_flashback); Description is a free-form note for your own reference.tag_<name> and creates the tag as a first-class entity if it does not already exist.Fields
ID
The renameable, expression-namespace identifier for the tag. You’ll
type this in expressions that reference the tag (e.g.
Played(tag_<id>), or HasTag(node_<id>, tag_<id>) for a per-node
check) and pick from it in the editor’s tag picker.
Renaming the ID updates expressions that mention the old name; it
doesn’t break the tag references on nodes, scenes, items, locations, or
codex entries.
Convention: tag ids are prefixed tag_. Existing tags aren’t renamed
when the prefix convention shifts; consistency is enforced at
create-time only.
Name
The human-readable label shown in the editor’s tag picker, on entity rows that carry the tag, and in any debugging UI. Free-form string, author-typed. No runtime effect; the runtime never reads Name. It’s purely metadata for the editor and host UI.
Description
A free-form note about what the tag is for, shown on the tag inspector. Author-only; the runtime never reads it. Useful when a tag’s purpose is not obvious from its name, or when a shared tag is used across several scenes and you want a single place to say what it means.
When to reach for tags
A tag pays off the second time the same loose category shows up. The first time the writer needs to know “did the player take the cautious path through this scene,” a cautious_choice tag on each cautious-leaning node lets Played(tag_cautious_choice) > 0 answer the question once and stay accurate as the scene grows.
Tags are not variables, and they do not need variables to drive counting. The expression layer treats a tag id as a first-class argument for the same functions that accept node ids: Played(tag_flashback) returns the count of flashback-tagged nodes played this scene visit, Count(tag_flashback) returns the static project-wide membership count, and HasTag(node_intro, tag_flashback) is the per-node membership check. Reach for a variable when you need to store and mutate state over time; reach for a tag when the same category needs to be queryable by more than one expression.
See also
- HasTag: tests whether a specific node, scene, item, location, or codex entry carries a given tag.
- Played and Count: query tag-shaped questions across the whole graph; both accept a
tag_<id>argument and return an integer. - Expressions: identifier conventions for tag ids.