Conditions
The gate shared by items, abilities, hooks, world events and quests.
A condition decides whether a rule may fire. Items, abilities, hooks, world events and quests all use the same one, so you only learn it once.
It's a list of entries plus a mode: all (every entry must hold) or any (one is enough).
Entry types
- world flag
- has item
- character alive / at a location
- the party is at a location: a journey, an arrival, a return home
- item lying at a location (on the ground or fixed in place, not carried)
- creatures killed (quest steps only), optionally only those killed at one place
- stat comparison
- field comparison
- time of day
- time since the game began
- ability
- expression: write the gate yourself
- narrative (quests only): plain English, judged by the model
Use the structured entries when they fit; they read better in the editor. Use expression for arithmetic or anything the entries can't say:
$.field('fever') > $.stat('resolve') * 2
Narrative is quests only
A narrative entry ("the player spoke to the mayor about the tides") is judged by the model. Everything except quests has to decide instantly, so narrative entries are rejected anywhere else. A hook can't stall a turn waiting on a model call.
Example
A door that opens only at night, only with the key, and only after the harbor has closed:
- mode: all
- time of day:
20:00to04:00 - has item: Lighthouse Key
- world flag:
harborisclosed
The first two as one expression entry, with the world flag check left structured:
$.timeBetween(1200, 240) && $.hasItem('Lighthouse Key')
$.timeBetween takes minutes into the day, so 20:00 is 1200.
Time since the game began
The world clock opens on day one at the game's start hour, not at zero, so comparing
$.timeMinutes against a small number is true from the first turn. The time since the game
began entry counts from the first turn instead, and $.minutesPassed is the same number in
an expression:
$.minutesPassed >= 360 // six hours in
For "six hours after the alarm was raised", start a timer from the step that raises it
($.startTimer, see Steps) and give the event the timer trigger.
Watch for null
A field comparison against a field the subject doesn't have fails. If "doesn't have it yet" should pass, say so:
!$.hasField('infection') || $.field('infection') < 5
See Missing values.