For operators, && joining, and any()/all() syntax, see Placeholders and Conditions.
| Function | Arguments | Returns / true when |
|---|
visible(token) | A token. | True when it’s visible to the primary GM’s client, where every trigger runs. |
hasActor(document) | A document. | True when it resolves to an actor, directly or through a token. |
hasCondition(actor, statusId) | An actor or token, a status id. | True when the actor has that status effect. |
attribute(document, path) | An actor, token, or item, a dotted path. | The value at that path, or at system.<path> if the plain path doesn’t exist. |
| Function | Arguments | Returns / true when |
|---|
distance(a, b, mode) | Two tokens, documents, or points; optional "edge". | The distance between them in scene distance units. "edge" measures between their nearest bounds edges instead of their centers. |
sceneDistance(value, unit) | A number, "sq" or "px". | That many grid squares or pixels, converted to scene distance units. |
insideRegion(point, region) | A token, document, or point; a Region. | True when the point lies inside the Region’s shape. |
movementEnded() | None. | True when the current movement ended inside this trigger’s Region rather than passing through it. |
elevationChanged() | None. | True when the current movement changed the token’s elevation. |
canSee(a, b) | Two tokens, documents, or points. | True when no sight-blocking wall stands between them. |
moveDirection(axis) | Optional "x" or "y". | The direction of travel: up/down for "y", left/right for "x", or a compound like up-left when omitted. |
| Function | Arguments | Returns / true when |
|---|
hasItem(actor, name) | An actor or token, an item name. | True when the actor owns an item with that exact name. |
itemCount(actor, name) | An actor or token, an item name or */? pattern. | How many owned items match. |
itemQuantity(actor, name) | An actor or token, an item name or */? pattern. | The summed quantity of matching items. |
| Function | Arguments | Returns / true when |
|---|
triggerCount() | None. | How many times this trigger has fired, counting this run. Same value as {{triggerCount}}. |
uniqueTriggerCount() | None. | How many distinct tokens appear in this trigger’s History. |
tokenCount(token) | A token. | How many History entries belong to that token. |
eventIs(name, ...) | One or more event names. | True when the run’s event matches one of them. |
variable(trigger, name) | A trigger reference (blank for this trigger), a variable name. | That trigger’s variable value. |
tileData(path) | A dotted path. | The value at that path on this trigger’s Linked Tile. |
| Function | Arguments | Returns / true when |
|---|
darkness() | None. | This scene’s current darkness level. |
timeOfDay() | None. | Minutes since midnight. |
| Function | Arguments | Returns / true when |
|---|
chance(percent) | A number. | True at random, that percent of the time. |
roll(formula) | A Roll formula. | The formula’s total. Doesn’t post a chat card. |
| Function | Arguments | Returns / true when |
|---|
any(collection, condition) | A collection id, a condition. | True when at least one item matches. |
all(collection, condition) | A collection id, a condition. | True when every item matches. |
count(collection) | A collection id. | How many items are in that collection. |
Each function below works only while its module is active; otherwise it returns a default empty value.
| Function | Arguments | Returns / true when | Requires |
|---|
hasTag(document, tag) | A document, a tag. | True when the document carries that tag. | Tagger |
byTag(tag) | A tag. | The first placeable’s document carrying that tag. | Tagger |
season() | None. | The current season’s name. | Calendaria |
isRestDay() | None. | True on a rest day. | Calendaria |
isFestivalDay() | None. | True on a festival day. | Calendaria |
isNighttime() | None. | True during night hours. | Calendaria |
weather(zone) | Optional climate zone. | The current weather in that zone. | Calendaria |
getMoonPhase(moonIndex) | Optional moon index. | That moon’s current phase. | Calendaria |
isEclipse() | None. | True during an eclipse. | Calendaria |
sunrise(zone) | Optional climate zone. | That zone’s sunrise time. | Calendaria |
sunset(zone) | Optional climate zone. | That zone’s sunset time. | Calendaria |
bondsmithRep(id, type) | An actor’s or faction’s id, a reputation type. | That reputation’s current value. | Bondsmith |
tenacityCount(actor) | An actor or token. | That actor’s Mote of Tenacity count. | Tenacity |
lightLevel(token) | A token. | The token’s current light level. | Token Light Condition |
effectiveLightLevel(token) | A token. | The token’s current effective light level. | Token Light Condition |
activeMood() | None. | The name of the Minstrel mood currently playing. | Minstrel |
peddlerTrust(actor) | An actor or token. | That actor’s current Peddler trust value. | Peddler |
pendingApprovals() | None. | How many Hero Mancer character submissions are waiting on approval. | Hero Mancer |
For Each’s Collection field, Set Current Collection’s Source field, and any collection-taking function above accept these ids.
| Id | Contains |
|---|
within | Tokens currently inside this Region. |
players | Player-owned tokens on this scene. |
players:active | Tokens owned by a currently active player. |
controlled | Tokens currently controlled on canvas. |
users | Every user. |
users:active | Currently active users. |
region, scene, activeScene | This Region, this scene, or the currently active scene, each as a single-item list. |
regions, notes, tiles, walls, sounds, drawings | Every Region, Note, Tile, Wall, ambient sound, or drawing on this scene. |
actors, items, journal, macros | Every Actor, Item, journal entry, or macro in the world. |
playing | Every currently playing playlist sound. |
previous | The result of the previous node, as a list. |
tag:<tag> | Every placeable carrying that Tagger tag. |
var:<name> | The list a Set Current Collection node built up during this run. |