Tags at runtime
Author tags are a freeform label layer that ships in
the bundle. Every delivered line / text / gameEvent step carries its accumulated tags: the
beat’s own plus every container’s above it (scene → block → group → snippet → beat), deduped and
outermost-first, under step.tags (absent when empty):
if (step.type === "line" && step.tags?.includes("barked")) playBark(step);When you need a level’s tags without walking to a beat, the engine exposes accessors:
engine.tagsForBeat(beatId); // a beat's accumulated tagsengine.tagsForScene("the-tavern"); // a scene's own tags (by id or Game ID)engine.tagsForBlock("the-tavern", "cellar"); // scene + block accumulatedThe native ports expose the same three (TagsForBeat / tags_for_beat, etc.).
A scene’s or block’s typed Game Data has matching accessors, gameDataForScene(scene) and
gameDataForBlock(scene, block). Unlike tags, Game Data does not build up down the structure: each
returns only that node’s own values. See
Scene and block Game Data.
Open source under the MIT licence, made by Ian Thomas.