Events
Story beats that fire on their own — after N messages, after a flag, after another event.
An event is a scripted story beat that fires on its own, without the AI choosing it. "Five messages in, a phone rings." "Two minutes after the alarm flag was set, the lights come back."
Events live in the scenario's Interactions tab, alongside buttons, actions and tools, and contexts.
Timing
When the event is evaluated:
| Timing | Evaluated |
|---|---|
AfterUserMessage | After the user sends a message. |
BeforeAssistantMessage | Right before the AI replies — use it to inject context that should shape this turn. |
AfterAssistantMessage | After the AI's reply. |
AfterAnyMessage | After either. |
Manual | Never on its own. Fired by /trigger name or by another effect. |
Triggers
An event carries a list of triggers. The event fires when any one of them matches — they are OR'd. Each trigger is a window measured from an anchor:
| Anchor | Measured from |
|---|---|
| Chat start | The beginning of the chat. |
| Flag | The last time the named flag was set. Never matches while the flag is unset. |
| Event | The last time the named event fired. Sequencing without flags. |
Within that anchor, a trigger can require:
| Field | Meaning |
|---|---|
| Min / max messages | Number of messages since the anchor. |
| Min / max chat time | Seconds since the anchor. Chat time, not wall clock. |
| Probability | Chance of firing once the window is open. Combined with the window it ramps: 50% over messages 5–10 means 10% at message 5 rising to 50% at message 10. |
| Max fires | How many times this trigger may fire. Leave empty for unlimited — that is what makes a trigger cyclic. |
The event itself also has a Max fires cap across all of its triggers.
A trigger with no window fires at the first evaluation after its anchor exists. Anchor it to an event and give the previous event no delay to chain two beats back to back.
Conditions
On top of triggers, an event is filtered by the conditions it shares with actions — flags, match, role, once, chat styles. See Actions → Conditions.
Effects
What the event does when it fires. Same set as actions: set flags, inject a note / secret / instructions / event / story, trigger another event by name, or run a script.
Evaluate next event lets the following event also fire in the same pass, instead of stopping at the first match. A script can do the same with e.evaluateNextEvent().
Patterns
Repeat every N messages
One trigger, anchored to the event itself, min messages 5, no max fires. It re-arms every time it fires.
A chain of beats
Anchor each event to the previous one, with the gap you want between them. No flags needed.
Branch on a flag
Give the event two triggers — one anchored to went_left, one to went_right — and the same effect. Or give each branch its own event.
One-shot after a delay
Anchor to chat start, min chat time 120, max fires 1.