Triggers
Mana Game Engine

Triggers

Simple “when this happens, if this is true, do that” rules that make your story react to what players do.

Updated

A trigger is a simple rule for your story: when something happens (an event), if certain things are true (conditions), do these things (actions). With triggers you can add game rules on top of AI narration, like a /bribe command that only works when the player has enough gold, a storm that grows every few turns, or a confession scene once affection is high enough.

How A Trigger Works

Every trigger reads like a sentence in three parts.

Events
When it fires: a player command, every few turns, a menu choice, a variable reaching a value, or the start of a new game. Add several and any one of them is enough.
Conditions
What must be true, such as “gold is at least 50”. Every condition has to pass, or none of the actions run. Leave it empty to always run.
Actions
What happens: steer the narrator, show text or a menu, change a variable, show your art and more. They run one by one, top to bottom.
Trigger
Bribe the Guard
Events· 1
Player InputPlayer inputs custom command /bribe; allow additional player input.
Conditions· 1
Variable CheckVariable gold is greater than or equal to 50
Actions· 2
Action 1
Set Variableset gold to {{gold}}-50
Action 2
LLM InjectInject The guard pockets the coins, glances around, and quietly opens the gate for the player. to narration LLM.
Read it top to bottom like a sentence. When the player uses /bribe (the event), if they have at least 50 gold (the condition), take 50 gold and tell the narrator the guard lets them through (the actions). With less gold, none of the actions run and the turn plays out as usual.

When Triggers Are Checked

  • When the player sends a message or a /command: triggers with a Player inputs custom command, Turn Count or Variable status event, all before the narrator writes that turn.
  • When the player picks an option in one of your selection menus: triggers with a User makes menu selection or Variable status event.
  • Once at the start of a new play-through: triggers with a Game Initialization event.
  • The moment a Set Variable action changes a value: triggers whose Variable status event watches that variable.
  • After the narration: triggers that hold a Check Story Context action.
  • Whenever something runs a trigger by name: a Run/Modify Trigger action, a Story Progression node, an In-Game Images/Video answer or a Check Story Context answer. Its events are skipped, but its conditions still have to pass.

Triggers are checked top to bottom in the order of your Triggers list, and each one finishes before the next starts. Folders only keep the list tidy; they don’t change anything in play.

Variables

A variable is a named value your story remembers while it’s played, like gold, affection or whether the player has found the key. Triggers check variables in their conditions and change them with actions. Create one in the editor’s Variables section with New Variable: pick a name, a type and a starting value. Every play-through starts from that value and keeps its own copy.

TypeWhat it’s for
INT · Whole numbersCounting things like gold, affection or days left. Compare it, do math with it, show it in text.
FLOAT · Decimal numbersLike INT, but with decimals, such as 0.5 or 72.5.
BOOL · True or falseAn on/off switch, such as has_key or met_mina.
STRING · Text valueA bit of text, like a nickname or a clue, to drop into your texts. It can’t be compared.
IMAGE · Uploaded imageA JPG, PNG, WEBP or AVIF to show with Show Media to player, In-Game Images/Video or an image menu.
VIDEO · Uploaded MP4 videoAn MP4 clip that loops with sound when it’s shown.
MENU · Player choice menuA popup with up to 20 choices, opened by Show Selection Menu to player.
COMMAND · Slash commandA /command players can type, like /hint, with a short description.
OBJECTIVE · Title + optional subtextOne quest goal, like Find the Lighthouse Keeper.
LIST · Objective or character listA quest log of objectives, or a list of characters like Your Party. Up to 50 items.

Type a variable’s name in double curly braces, like {{gold}}, in any text box (an Inject instruction, a Story/System text, a failure screen) and Mana fills in its current value when the action runs. Names use letters, numbers, _ and -, and start with a letter or _.

Build Your First Trigger

  1. Open the editorIn your story setup, open the Mana Game Engine tab, switch it to Enabled and press Create New, or Edit Triggers once something is saved. See Turning It On.
  2. Make your variablesUse the section menu at the top of the editor’s left panel to switch to Variables, then press New Variable. For the example above, make an INT named gold that starts at 100 and a COMMAND named bribe.
  3. Create the triggerSwitch to Triggers and press New Trigger. It starts with a name like Untitled Trigger 1; press the pen next to the name to rename it.
  4. Add an eventPress Add New Event and pick Player inputs custom command, then choose /bribe. Every Add menu has a Search... box at the top.
  5. Add a condition (optional)Press Add New Condition, pick Variable check and set it to gold, greater than or equal to, 50.
  6. Add actionsPress Add New Action for the first one, then Add Another Action for each one after it. Drag a row by its grip to change the order.
  7. SavePress Save at the top of the editor.
Every Add menu starts with Comment: a gray sticky note of up to 300 characters for you and other creators. It never runs in the game and isn’t counted with the other rows.

The Master List

Every event, condition and action in the editor’s Add menus, each with an example.

Events

Events decide when a trigger fires. If a trigger has several events, any one of them is enough, and the trigger still runs only once. Events are optional: a trigger without one runs only when something runs it by name.

Game Initialization

Event

Runs once at the very start of a new play-through, so you can set the stage: hand out starting gold, add the first quest, open a menu, or tell the narrator how the story begins.

Pick game initialization to run it as soon as a new game loads, before the player’s first turn. Pick after player finish reading starting prompt to wait until the player has clicked past the last page of your opening; that choice is for visual stories only.

If the trigger has an Inject command to narration LLM action, the first narration starts right away and follows your instruction, without the player typing anything. A play-through that already has turns won’t run a Game Initialization trigger you add later.

Example
Trigger
Opening Night
Events· 1
Game InitializationFires this trigger on after player finish reading starting prompt.
Actions· 2
Action 1
Set Variableset gold to 20
Action 2
LLM InjectInject Begin at the harbor at dusk, just as the last ferry leaves without the player. A stranger in a gray coat is watching them. to narration LLM.

Turn Count

Event

Fires on a steady rhythm as the story goes on. Every 1 runs on every turn; Every 5 runs on turns 5, 10, 15 and so on. A turn is one player message plus the narrator’s reply.

It’s checked when the player sends a message, before the narrator writes, so an Inject command to narration LLM in the same trigger shapes that very turn. It isn’t checked when the player picks from a menu.

Instead of a number you can type a whole-number variable like {{storm_every}} (it must start above 0), so other triggers can speed the rhythm up or slow it down. Great for weather that worsens, a hunger meter or a reminder every few turns.

Example
Trigger
Rising Storm
Events· 1
Turn CountEvery 5 turn(s).
Actions· 2
Action 1
Set Variableset storm to {{storm}}+1
Action 2
LLM InjectInject The storm grows stronger. Describe the wind and rain battering the ship and the crew struggling to hold course. to narration LLM.

Player inputs custom command

Event

Gives players their own slash commands, like /hint, /rest or /quests. When a player types / in the message box, your commands show up with their descriptions. Picking one adds it to the message as a badge, and the trigger fires when they send it.

Choose prohibit to make the command the whole turn: the text box locks until the player removes the badge, and only your trigger’s instructions reach the narrator. Choose allow to let the player type their own action next to the command, and both are sent together.

Create the command first as a COMMAND variable: a name of up to 12 letters, dashes or underscores, plus a short description. A few names Mana already uses, like /summary and /context, aren’t available. The first time someone plays, a Story Commands popup lists all your commands.

Example
Trigger
Ask for a Hint
Events· 1
Player InputPlayer inputs custom command /hint; prohibit additional player input.
Actions· 2
Action 1
Set Variableset hints_used to {{hints_used}}+1
Action 2
LLM InjectInject Detective Hale notices one clue the player has missed in this room and points it out, without solving the case for them. to narration LLM.

User makes menu selection

Event

Reacts to the choice a player makes in one of your selection menus. A menu opens when a trigger uses Show Selection Menu to player, and the moment the player picks an option, every trigger listening for it runs.

Pick one option to react to that choice only, or Any choice to react to whatever the player picks. Make one trigger per option to give each choice its own outcome. If one of them uses Inject command to narration LLM, the story continues right away with your instruction, so each choice can steer the next scene.

Build the menu first as a MENU variable. The option list stays grayed out until you pick a menu.

Example
Trigger
Order: Matcha Latte
Events· 1
Menu SelectionIn DrinkMenu player selects Matcha Latte.
Actions· 2
Action 1
Set Variableset affection to {{affection}}+2
Action 2
LLM InjectInject The player orders a matcha latte. Mina's eyes light up: it's her favorite, and she asks how they knew. to narration LLM.

Variable status

Event

Fires when one of your number or true/false variables reaches a value you choose, like affection reaching 10 or has_key turning true. Use it for milestones: unlock a scene, end a chapter, or play a confession once a meter fills up.

It’s checked whenever the player sends a message or picks from a menu (and along with your Game Initialization triggers at the start), and also the moment a Set Variable action changes that variable. The value can be a number, true or false, or math with other variables, such as {{max_health}} / 2.

It keeps firing on every check for as long as the comparison is true. For a one-time moment, end the trigger with Run/Modify Trigger set to Disable on the same trigger, as in the example.

Example
Trigger
Mina Confesses
Events· 1
Variable StatusWhen affection is greater than or equal to 10.
Actions· 2
Action 1
LLM InjectInject Mina finally gathers her courage and confesses her feelings to the player in this scene. to narration LLM.
Action 2
Run/Modify TriggerDisable {{Mina Confesses}}.

Conditions

Conditions decide whether the actions may run once the trigger fires. Every condition must pass; they’re checked top to bottom, and the first one that fails stops the trigger before any action runs. A trigger with no conditions always runs.

Variable check

Condition

A gate for the trigger’s actions: a number or true/false variable has to compare the way you set, or nothing happens. Use it so a /bribe command only works when the player has enough gold, or a reunion scene only plays if the player found the locket.

It offers the same comparisons as Variable status, and the value can use math like {{price}} * 2. It reads the value at the moment the trigger runs, including changes other triggers made a moment earlier in the same turn.

You’ll also find it in the If part of the If / Then and If / Then / Else actions, to check a value partway through a trigger.

Example
Trigger
Show the Locket
Events· 1
Player InputPlayer inputs custom command /show_locket; prohibit additional player input.
Conditions· 1
Variable CheckVariable has_locket is equal to true
Actions· 1
Action 1
LLM InjectInject The player shows the old woman the silver locket. She recognizes it at once, and with tears in her eyes she tells them about the daughter she lost. to narration LLM.
Older triggers may show an LLM Context Check (Legacy) condition. It still works in those stories, and it costs the player coins each time it runs, but it can’t be added anymore. Use the Check Story Context action instead.

Actions

Actions are what the trigger does. They run one at a time, top to bottom, in the order shown (Action 1, Action 2...). If one action can’t run (say, the background it uses is no longer available), it’s skipped and the rest still run. Branching actions like Use RNG and If / Then hold their own lists of actions.

Actions: Story & Narration

Inject command to narration LLM

Action

Sends a hidden instruction to the AI narrator, so you can steer what happens next: a storm rolls in, a rival shows up, the hero’s plan fails. The player never sees the instruction, only the narration it produces. If it clashes with what the player typed, your instruction wins.

When the trigger ran from the player’s turn, the instruction joins that turn’s narration; with a prohibit command it replaces the player’s input entirely. When it ran from Game Initialization or a menu choice, it starts a new narration right away. Instructions from triggers that run after the narration go out with the player’s next turn.

It counts for that one narration only and isn’t saved into the story. Several Inject actions in one check are combined, in order. Use {{name}} to drop in a variable’s current value, and keep it short and clear.

Example
Trigger
Pray at the Shrine
Events· 1
Player InputPlayer inputs custom command /pray; allow additional player input.
Actions· 1
Action 1
LLM InjectInject The shrine candles flicker as the player prays. The goddess answers in a faint, warm voice that only the player can hear. to narration LLM.

Show or inject Story/System texts

Action

Puts your own pre-written text into the story word for word, with no AI writing involved. You choose whether the player sees it, and whether it’s saved to story context so the narrator remembers it in later turns. Use it for chapter cards, clues, letters and notes, or quiet facts the narrator should know.

show + save: the player reads it and the narrator remembers it. show + don’t save: the player reads it but the narrator never sees it, good for tips and hints. don’t show: the narrator remembers it, but it stays out of the live story. When the same turn also gets a new narration, your text appears after it.

require makes the trigger’s remaining actions wait until the player has clicked through the text (visual stories only). Texts can be up to 5,000 characters, {{name}} fills in variable values, and in visual stories they can use the same character and background tags as your Starting Prompt.

Example
Trigger
Examine the Body
Events· 1
Player InputPlayer inputs custom command /examine_body; prohibit additional player input.
Actions· 1
Action 1
Story/System Textsshow You kneel beside the butler. Ink stains his fingertips, and a torn train ticket peeks out of his pocket. to player and save to story context, don't require the player to finish reading it before the remaining actions run.

Modify Custom Instructions

Action

Changes your story’s Custom Instructions, the standing rules the narrator reads every turn, while the story is being played. Add a rule, remove one or swap one for another, so the narrator’s behavior changes as the story moves on: tougher fights after the player picks Hard, a curse that makes a character speak only in riddles, a darker tone for the final act.

Add puts your text on its own line at the start or the end. Delete and Replace work on all of the instructions or on specific text, which has to match word for word. The change lasts for the rest of that play-through; your original story isn’t edited.

Watch out for repeats: an Add in a trigger that fires every turn adds the line again every turn.

Example
Trigger
Hard Mode
Events· 1
Menu SelectionIn difficulty_menu player selects Hard.
Actions· 1
Action 1
Modify InstructionsAdd Enemies fight smart and hit hard. Fights are dangerous, and the player can lose. at the end of custom instructions.

Check Story Context

Action

Lets your story notice what actually happened. After the turn’s narration finishes, the player’s decision AI (Jev by default) reads the last 3 turns and answers your questions, like “Has the player found the lighthouse keeper?” Each answer can run up to 5 of your triggers. Press the question count in the row to open the question editor.

Questions can be Yes / No (Yes when the AI is at least as sure as your setting, 50% by default), Multiple choice (2 to 20 options) or Score (2 to 10 levels, lowest first). You can add up to 50. Once a Yes / No question answers Yes, it isn’t asked again in that play-through. In the example, question 1 asks whether the player has found the hidden key (Yes runs a Key Found trigger), and question 2 asks who they suspect, with Butler and Maid each running their own trigger.

Only one per story. A trigger that holds it runs as a whole after the narration, and anything its answers inject goes out with the player’s next turn. Each check is an AI call that costs the player some coins (your In-Game Images/Video questions ride along in the same call), and it’s skipped if they can’t cover it. When the trigger’s conditions don’t pass, its questions aren’t asked that turn.

Example
Trigger
Detective’s Instincts
Events· 1
Turn CountEvery 1 turn(s).
Conditions· 1
Variable CheckVariable case_solved is equal to false
Actions· 1
Action 1
Check Story ContextAfter the turn, ask Jev 2 questions about the last 3 turns and run the triggers set for each answer (3 answers wired).

Actions: Variables & Lists

Set Variable

Action

Changes one of your variables, like gold, affection or a quest flag. The new value sticks for the rest of that play-through, so later triggers, conditions and texts all see it.

For numbers, type math using other variables: {{gold}}+10 adds 10, {{gold}}-10 takes 10 away, and ({{hp}}*2)/3 works too. Whole-number variables are rounded. For a BOOL, type true or false. For a STRING, type any text; {{name}} inside it is filled in.

Only INT, FLOAT, BOOL and STRING variables can be set here; lists change with Update List. When the value changes, triggers with a Variable status event watching it are checked straight away.

Example
Trigger
Pay for Dinner
Events· 1
Player InputPlayer inputs custom command /pay; allow additional player input.
Conditions· 1
Variable CheckVariable gold is greater than or equal to 30
Actions· 3
Action 1
Set Variableset gold to {{gold}}-30
Action 2
Set Variableset affection to {{affection}}+2
Action 3
LLM InjectInject The player picks up the check. Mina protests, but she's smiling. to narration LLM.

Update List

Action

Changes what’s on one of your lists. On an Objectives list you can add a new objective, which becomes a current goal, or mark one as completed or as failed. On a Characters list you can add or remove one of your story’s characters.

The change happens quietly, apart from a small “Objective Updated” badge the player sees for a few seconds when an objective changes. Add Show List after it if you want the player to see the whole list.

When marking, you can pick Last added Objective to mean whichever objective was added to that list most recently. A list holds up to 50 items.

Example
Trigger
Found the Letter
Events· 1
Menu SelectionIn study_search player selects Open the desk drawer.
Actions· 3
Action 1
Update ListUpdate case_objectives by marking {{find_letter}} as completed.
Action 2
Update ListUpdate case_objectives by adding new {{confront_butler}}.
Action 3
Show ListShow case_objectives on the player’s screen.

Show List

Action

Pops one of your lists up on the player’s screen, like a quest log. An Objectives list shows current goals first, then finished ones marked Completed or Failed. A Characters list shows its own title and the characters on it. The player closes it when they’re done reading.

It shows the list as it is at that moment, so put Show List after any Update List in the same trigger.

Tip: pair it with a /quests command set to prohibit and nothing else in the trigger. The player can then check the list any time without starting a new turn, because nothing is sent to the narrator.

Example
Trigger
Open Quest Log
Events· 1
Player InputPlayer inputs custom command /quests; prohibit additional player input.
Actions· 1
Action 1
Show ListShow quest_log on the player’s screen.

Actions: Menus & Media

Show Selection Menu to player

Action

Opens one of your menus as a popup so the player chooses what happens next: pick a class, choose a path, answer a riddle. The player has to choose; the popup can’t be closed without picking.

This action only opens the menu. What each choice does lives in separate triggers that use the User makes menu selection event. The trigger doesn’t wait for the player’s choice: its remaining actions still run right away.

Build menus as MENU variables: a title, an optional description and 1 to 20 choices, in a Text or Image layout. Only menus without problems show up in the picker, so give every choice a title or description, and in the Image layout every choice an image.

Example
Trigger
Choose Your Class
Events· 1
Game InitializationFires this trigger on after player finish reading starting prompt.
Actions· 1
Action 1
Selection MenuShow class_menu to user.

Show Media to player

Action

Puts one of your uploaded images or videos on the stage and adds it to the Story Media section of the player’s Gallery, where they can see it again later. Choose behind the story text to keep the text on top, or and hide the story text to also hide the text box until the player’s next command, so nothing covers the picture. Videos loop with sound, and you can set their volume from 0 to 300%.

Upload the picture or clip first as an IMAGE or VIDEO variable. It stays on the stage until the player closes it, even while new narration comes in. Visual stories only.

Want media to appear by itself when the story reaches a moment? Use In-Game Images / Video instead.

Example
Trigger
First Kiss
Events· 1
Variable StatusWhen affection is greater than or equal to 80.
Actions· 2
Action 1
Show MediaShow img_first_kiss to the player and hide the story text until their next command.
Action 2
Run/Modify TriggerDisable {{First Kiss}}.

Actions: Characters & Scene

Move Character to Active/Inactive Roster

Action

Brings a character into the story or benches them. Active characters are the ones the narrator can use; an Inactive (benched) character stays out of the story until another trigger moves them back. It’s the same switch as Move to Active / Move to Inactive in Character Management.

The change happens before that turn’s narration is written, so a character you activate can show up in that very turn. The editor’s Characters section shows who is active and who is inactive at the start. The change lasts for the rest of that play-through.

Example
Trigger
Hire the Oracle
Events· 1
Menu SelectionIn tavern_menu player selects Hire the oracle.
Conditions· 1
Variable CheckVariable gold is greater than or equal to 50
Actions· 3
Action 1
Set Variableset gold to {{gold}}-50
Action 2
Move CharacterMove Mira the Oracle to Active character roster.
Action 3
LLM InjectInject Mira the Oracle accepts the gold and joins the party, eyes already fixed on the road ahead. to narration LLM.

Use background

Action

Puts the background you choose on the scene instead of leaving it to the narrator. Next turn makes the narration that’s about to be written use that background. Immediately swaps the background the player is looking at right now.

Add also puts it on your story’s list of backgrounds, so the narrator knows the place and can return to it later. Don’t Add shows it as a one-off. Day or night art follows the story’s own time of day. Visual stories only.

Example
Trigger
Rooftop Date
Events· 1
Player InputPlayer inputs custom command /rooftop; allow additional player input.
Actions· 2
Action 1
Use backgroundUse Rooftop Garden Next turn, Add the background to current bg_list.
Action 2
LLM InjectInject The player leads Mina up to the rooftop garden. String lights glow above them, and the city sparkles below. to narration LLM.

Change story era

Action

Switches the era of the player’s play-through between Fantasy, Modern and Futuristic. When the narrator brings in a new place or character that isn’t in your story yet, Mana picks a matching one from its library, and the era decides what fits.

Use it when the story jumps through time or between worlds, like stepping through a portal from a medieval kingdom into a neon city. Backgrounds and characters already in the story stay. The change lasts for the rest of that play-through; your original story never changes.

Example
Trigger
Through the Portal
Events· 1
Variable StatusWhen portal_open is equal to true.
Actions· 3
Action 1
Change Story EraChange the story era to Futuristic for auto-surfaced backgrounds and characters.
Action 2
LLM InjectInject The portal spits the player out onto a rain-soaked street in a neon city, a thousand years in the future. to narration LLM.
Action 3
Run/Modify TriggerDisable {{Through the Portal}}.

Actions: Logic & Flow

Use RNG

Action

Rolls a random whole number and picks a branch based on the result, so the same moment can play out differently every time. Set the range (1 to 100 by default), then give each branch a rule like is less than 30 or is between 30 and 70, and its own actions. Press + Add RNG Branch for more branches.

Branches can’t overlap: if two of them cover the same number, the editor points it out and won’t save until you fix it. Both ends of the range can be rolled. If no branch matches, nothing inside runs and the trigger moves on.

Every new turn rolls again, but Redo replays the result the player already got. A branch can hold an If / Then or If / Then / Else, but not another Use RNG.

Example
Trigger
Search the Old Chest
Events· 1
Player InputPlayer inputs custom command /search_chest; prohibit additional player input.
Actions· 1
Action 1
Use RNGRoll a random integer between 1 and 100.
If RNGis less than 25 then
Set Variableset health to {{health}}-10
LLM InjectInject The chest was trapped! A poison needle pricks the player's hand. Describe the sting. to narration LLM.
If RNGis greater than or equal to 25 then
Set Variableset gold to {{gold}}+50
LLM InjectInject The player opens the chest and finds a pouch of 50 gold coins. to narration LLM.

If / Then

Action

Makes part of a trigger depend on a check, without needing a separate trigger. Put one or more Variable checks in the If box and actions in the Then box. The Then actions run only if every check passes; otherwise they’re skipped and the trigger carries on with its next action.

The difference from the Conditions panel: conditions decide whether the whole trigger runs, while If / Then only controls the actions inside it. The checks happen when the trigger reaches this action, so a Set Variable earlier in the same trigger already counts.

The editor won’t save an If / Then until it has at least one check and one Then action. The Then box can hold a Use RNG, but not another If / Then or If / Then / Else.

Example
Trigger
Second Date Nudge
Events· 1
Turn CountEvery 5 turn(s).
Actions· 1
Action 1
If / ThenRun actions only when all conditions pass.
If
Variable CheckVariable affection is greater than or equal to 10
Variable CheckVariable asked_second_date is equal to false
Then
LLM InjectInject Mina fidgets with her coffee cup, then shyly asks the player if they'd like to go on a second date. to narration LLM.
Set Variableset asked_second_date to true

If / Then / Else

Action

Works like If / Then, with a fallback. When every check passes, the Then actions run; when any check fails, the Else actions run instead. Exactly one of the two lists runs, which suits success-or-failure moments like opening a lock with or without the right code.

Like If / Then, it needs at least one check before the editor will save it. Then and Else can each hold a Use RNG, but not another If / Then or If / Then / Else.

Example
Trigger
Open the Vault
Events· 1
Player InputPlayer inputs custom command /open_vault; prohibit additional player input.
Actions· 1
Action 1
If / Then / ElseBranch on one or more conditions.
If
Variable CheckVariable knows_vault_code is equal to true
Then
LLM InjectInject The player types in the code. The vault door swings open, revealing the stolen painting. to narration LLM.
Else
LLM InjectInject The player guesses the code wrong. Alarms blare and guards come running. to narration LLM.

Run/Modify Trigger

Action

Lets one trigger control another. Run starts the named trigger right now: its events are skipped, but its conditions still have to pass. Disable switches a trigger off so it can’t fire, and Enable switches it back on. Then this trigger carries on with its next action.

Type the trigger’s name; the editor wraps it as {{Trigger Name}} and warns you in red if no trigger has that name. Renaming a trigger updates these references for you.

A trigger can disable itself, the usual way to make a moment happen only once. Enable is also how you switch on a trigger you set to Disabled in the Triggers list. On/off changes last for the rest of that play-through, and a trigger can’t Run itself, so it can’t loop forever.

Example
Trigger
Riddle Solved
Events· 1
Menu SelectionIn riddle_menu player selects The tide.
Actions· 3
Action 1
LLM InjectInject The lighthouse keeper nods slowly: the answer is correct. to narration LLM.
Action 2
Run/Modify TriggerDisable {{Riddle Hint}}.
Action 3
Run/Modify TriggerRun {{Open the Vault}}.

Wait x seconds

Action

Pauses the trigger for a moment before its next action, for dramatic timing like a fuse burning down. Type the seconds (decimals like 1.5 work) or a number variable like {{delay}}.

While it waits, the player can’t send another turn or pick a menu choice. Most results of a trigger appear once it has finished, so the pause shows best next to things that happen on the spot: a Story/System text set to require, a background used Immediately, or a Failure/death Screen.

Example
Trigger
Light the Fuse
Events· 1
Player InputPlayer inputs custom command /light_fuse; prohibit additional player input.
Actions· 3
Action 1
Story/System Textsshow You light the fuse. It hisses and sparks as it races toward the dynamite... to player and don't save to story context, require the player to finish reading it before the remaining actions run.
Action 2
WaitWait 3 second(s).
Action 3
LLM InjectInject The dynamite explodes and blows the vault door off its hinges. Describe the blast. to narration LLM.

Skip Remaining Actions

Action

Stops the trigger right there, so none of the actions below it run. It’s most useful inside an If / Then or Use RNG branch as an early exit, and even from inside a branch it stops the whole trigger.

Only this trigger stops. Other triggers still get their turn, and if another trigger started this one with Run/Modify Trigger, that one carries on as normal.

Example
Trigger
Pickpocket
Events· 1
Player InputPlayer inputs custom command /steal; allow additional player input.
Actions· 3
Action 1
If / ThenRun actions only when all conditions pass.
If
Variable CheckVariable wanted is equal to true
Then
LLM InjectInject The merchant recognizes the player from the wanted posters and shouts for the guards! to narration LLM.
Skip Remaining ActionsSkip remaining actions in this trigger.
Action 2
Set Variableset gold to {{gold}}+5
Action 3
LLM InjectInject The player lifts 5 coins from the merchant’s purse without being seen. to narration LLM.

Do nothing

Action

An action that does nothing, on purpose. Every Use RNG branch needs at least one action, so use it to fill the quiet ones, like the “no encounter” part of a roll.

Unlike Skip Remaining Actions, it doesn’t stop anything after it. It’s also a handy placeholder while you’re still building a trigger.

Example
Trigger
Wolves on the Road
Events· 1
Turn CountEvery 5 turn(s).
Actions· 1
Action 1
Use RNGRoll a random integer between 1 and 100.
If RNGis less than or equal to 70 then
Do NothingDo nothing.
If RNGis greater than 70 then
LLM InjectInject A pack of wolves steps out of the trees and blocks the road ahead. to narration LLM.

Actions: Story Control

Show Failure/death Screen

Action

Ends the run with a game-over screen: a skull, your title and message, the line “Rewind to an earlier moment to continue your story.” and a Rewind Story button. The player can’t keep playing until they rewind to an earlier moment. Use it for deaths, failed missions or bad endings.

Both the title and the message are needed, and {{name}} works in both. As soon as the screen shows, this trigger stops, no other triggers run, and the player’s turn isn’t sent to the narrator. The popup can’t be closed and is still there after a reload.

Example
Trigger
Out of Health
Events· 1
Variable StatusWhen health is less than or equal to 0.
Actions· 1
Action 1
Failure/death ScreenShow pop up to player with You Died and The goblin's blade found its mark. Your journey ends here.

Rewind to last turn

Action

Undoes the turn in progress. It stops any narration being written, removes the player’s latest turn and puts everything back the way it was after the last completed turn: variables, custom instructions, which triggers are on and which characters are active. Use it to enforce story rules, like “the hero can’t leave the castle before midnight”.

It works best in a trigger that runs after the narration, such as one run by a Check Story Context answer, so the narration that broke the rule is removed too. As soon as it runs, no other triggers run in that check.

To explain the rewind, put a Story/System text set to require right before it, as in the example. In visual stories the player reads it before the rewind happens.

Example
Trigger
Midnight Rule
Events· 0
CommentRun by the Yes answer to “Did the hero leave the castle before midnight?” in Check Story Context.
Actions· 2
Action 1
Story/System Textsshow A bell tolls. The world blurs, and you find yourself back inside the castle walls. It isn't midnight yet. to player and don't save to story context, require the player to finish reading it before the remaining actions run.
Action 2
Rewind to last turnCancel active generation and restore the previous completed turn.

Exit story progression

Action

Makes the story leave its Story Progression nodes and carry on as a normal Realism story for this play-through. Use it after a final node, or as an open-world choice, so players can keep playing freely once your planned story is done.

If the player later rewinds to before the exit, story progression comes back. In a story without progression nodes it does nothing.

Example
Trigger
Keep Playing After the Ending
Events· 1
Menu SelectionIn ending_menu player selects Keep playing.
Actions· 2
Action 1
Exit story progressionStop story progression and continue in Realism.
Action 2
Story/System Textsshow The main quest is complete, but the kingdom is yours to explore. Go wherever you like! to player and don't save to story context, don't require the player to finish reading it before the remaining actions run.

Tips

Order matters. Triggers are checked top to bottom in your Triggers list, and actions run top to bottom inside each trigger.

A Variable status trigger fires on every check while it’s true. For one-time moments, end it with Run/Modify Trigger set to Disable on itself.

Each trigger’s menu in the list has Rename, Duplicate, Enable/Disable and Delete. A disabled trigger shows a red X, never fires, and its /command disappears from the player’s list.

A prohibit /command whose trigger has no Inject action doesn’t start a new narration. Use that for commands that just open a list, show a text or change a variable.

Mana stops runaway loops: a trigger can’t run itself, and chains of triggers running other triggers stop after 8 steps.

Show Media to player, Use background and the after player finish reading starting prompt timing of Game Initialization work in visual stories only.

Questions

Why does my trigger keep firing every turn?

A Variable status event fires on every check for as long as its comparison is true. To make it happen once, add Run/Modify Trigger set to Disable with the trigger’s own name as its last action, or change the variable so the comparison is no longer true.

What’s the difference between Conditions and the If / Then action?

Conditions decide whether the whole trigger runs: if one fails, none of the actions run. If / Then sits among the actions and only controls the actions inside it, so everything before and after it still runs.

Can a trigger run without an event?

Yes. A trigger with no events runs only when something runs it by name: a Run/Modify Trigger action, a Story Progression node, an In-Game Images/Video answer or a Check Story Context answer. Its conditions still have to pass, and a disabled trigger doesn’t run.

Does Redo roll the dice again?

No. Redo doesn’t run the turn’s triggers again: it reuses the same Inject instruction, so the result of the random roll stays the same. A Check Story Context trigger does run again afterwards, because it looks at the new narration.

Do triggers cost coins?

Almost everything triggers do is free. Check Story Context is the exception: each check is an AI call that costs the player some coins, and it’s skipped if they can’t cover it. Older LLM Context Check (Legacy) conditions cost coins too.