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.
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, and triggers whose Character on screen event matches a character that narration showed.
- While the AI writes a turn and calls one of your tools: triggers with a Model calls a tool event on that tool, right away, before the AI carries on writing.
- 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.
| Type | What it’s for |
|---|---|
| INT · Whole numbers | Counting things like gold, affection or days left. Compare it, do math with it, show it in text. |
| FLOAT · Decimal numbers | Like INT, but with decimals, such as 0.5 or 72.5. |
| BOOL · True or false | An on/off switch, such as has_key or met_mina. |
| STRING · Text value | A bit of text, like a nickname or a clue, to drop into your texts. It can’t be compared. |
| IMAGE · Uploaded image | A JPG, PNG, WEBP or AVIF to show with Show Media to player, In-Game Images/Video or an image menu. Drop several files at once and each becomes its own variable, named after its file. |
| VIDEO · Uploaded MP4 video | An MP4 clip that loops with sound when it’s shown. Several can be uploaded at once, like images. |
| MENU · Player choice menu | A popup with up to 20 choices, opened by Show Selection Menu to player. |
| COMMAND · Slash command | A /command players can type, like /hint, with a short description. |
| OBJECTIVE · Title + optional subtext | One quest goal, like Find the Lighthouse Keeper. |
| LIST · Objective, character or status list | A quest log of objectives, a list of characters like Your Party, or a Status list: a character sheet whose rows show a character, HP / Mana / Trust bars, money and lists of text, filled from your other variables. Up to 50 items or rows. |
| TOOL · Function the AI can call | A tool the AI can use mid-turn, like hire_guard: a function name, instructions and the values it passes. Model calls a tool triggers decide what it does. See Tool Calls. |
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
- 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.
- 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.
- 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.
- 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.
- Add a condition (optional)Press Add New Condition, pick Variable check and set it to gold, greater than or equal to, 50.
- 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.
- SavePress Save at the top of the editor.
Tool Calls
Let the AI use your game rules by itself, in the middle of a turn.
How A Tool Call Works
Most triggers wait for the player: a /command, a menu choice, a turn count. A tool lets the AI decide instead. You describe a tool, like hire_guard or check_gold, and when the story reaches a moment it fits, the AI calls it while it writes the turn. Your triggers apply the rules (take the gold, add the guard to the party) and tell the AI what happened, and the AI writes the rest of the turn from that. The player doesn’t have to type a command, and the story can’t hand out a guard the player can’t afford.
- The AI gets your toolsEvery turn, the AI is given each tool’s function name, instructions and values, as long as an enabled trigger listens to that tool.
- It calls oneWhen the story reaches a moment the instructions describe, the AI calls the tool with its values, like hire_guard with guard_name Brakk. It may write part of the turn first.
- Mana runs your triggersIf the AI leaves out a required value, or passes one of the wrong kind or one that isn’t allowed, nothing runs and the AI is told what was wrong. Otherwise each value is written into its variable, then every enabled trigger with a Model calls a tool event on that tool runs, top to bottom, with its conditions checked as usual.
- The AI gets the resultThe text of the triggers’ Tool result actions goes back to the AI. Without one, it gets a short summary of what the actions did.
- The AI carries onIt writes the rest of the turn from the result, or calls another tool. A turn can have up to 4 rounds of tool calls.
Each call and its result are kept with the turn as a short line the AI sees in the story history (players never see it). On later turns the AI knows what it already did, so it doesn’t call a tool again for something an earlier result settled. In stories with Story Progression nodes, the Story Director gets the tools instead of the narrator until the story exits progression, and its calls aren’t kept in the history.
Make A TOOL Variable
In the editor’s Variables section, press New Variable, pick TOOL and fill in the name, function name and instructions. Then select the new variable to add its parameters. The variable’s name is only for you in the editor; everything below is what the AI sees.
| Field | What to put in it |
|---|---|
| Function name | The name the AI calls, like hire_guard: letters, numbers, _ and -, starting with a letter or _, up to 64 characters. Every tool needs its own, and insert_tags is taken. |
| Instructions | What the tool does and when to call it, up to 2,000 characters. The AI decides from this text alone, so say when to call it and when not to. A {{name}} here is sent as written, not filled in: tools never carry live values. |
| Parameters | The values the AI passes, up to 16. Each has a name (letters, numbers and _), a type (Text, Whole number, Number or True / false), required or optional, and a description of what to pass. At least one must be required. A new tool starts with a required reason parameter that you can keep or turn into a real one. |
| Allowed values | For Text, Whole number and Number parameters: type a value and press Enter to accept only the values on your list (up to 50), like bought, sold and lost. Leave it empty to accept any value. Text values ignore capitals. |
| Writes to | The variable the value goes into before the triggers run, so they can check it and use it as {{name}}. Text goes into a STRING, Whole number and Number into an INT or FLOAT (an INT drops the decimals), True / false into a BOOL. Without one, the value is only shown in the action log. A new value also checks the Variable status triggers watching that variable. |
Under the fields, What the AI is given shows the exact text the AI gets for all your tools, and warns you when a tool isn’t offered yet because no enabled trigger listens to it. A story can have up to 32 tools, and no variable can be named tool_calls.
Example: Hiring A Guard
A tavern where the player can hire guards. The story has an INT gold, a STRING hire_name, a Characters list tavern_guards holding the guards (all inactive at the start) and an empty Characters list party. The TOOL variable hire_guard has the instructions “Call when the player agrees to pay a guard to join them. A guard costs 50 gold.” and one required Text parameter, guard_name, that writes to hire_name, with the guards’ names as its allowed values.
Tips For Good Tools
- Give each tool one job and name it after that job: check_gold, hire_guard, open_market.
- Say when to call it and when not to, like “Call once when the player arrives at the market, not again on the same day.” The AI only knows what the instructions tell it.
- Give the AI a tool that reads what it needs to know, like check_gold, instead of writing numbers into the instructions. Tools never carry live values.
- Use allowed values for names and choices, so a typo is turned back before anything changes.
- Write results as plain facts the AI can build on (“Brakk is hired. You have 30 gold left.”), and answer the failure case too, so the AI never has to guess what happened.
- To offer a tool only at certain times, switch its trigger off and on with Run/Modify Trigger. A tool is offered only while an enabled trigger listens to it, starting with the next turn.
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
EventRuns 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.
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.
Turn Count
EventFires 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.
Player inputs custom command
EventGives 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.
Variable status
EventFires 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.
Model calls a tool
EventFires when the AI calls one of your tools while it writes a turn, so the AI can use your game rules by itself. Pick the TOOL variable to listen to. The trigger runs, the AI gets the result and carries on writing, so the story matches what really happened. Tool Calls above covers making a tool, with a full example.
The values the AI passes are written into their variables before the trigger runs, so its conditions and actions can use them. Answer with a Tool result action; without one, the AI gets a short summary of what the actions did. When several triggers listen to the same tool, they all run, top to bottom, and their results are joined.
A tool call runs in the middle of a turn, so a few actions work differently there: Rewind to last turn, Exit story progression and Show Failure/death Screen aren’t allowed (the AI is told they failed), Wait x seconds is skipped, an Inject command reaches the AI as a note in the tool result, and selection menus, lists, Story/System texts and media appear once the narration has finished.
A story with this event on any trigger plays in Realism mode, like one with Story Progression: when a player starts it, Hardcore and Agent Mode show “This story does not support this mode yet.” Tools work while the story is played on the website, not in the mobile app.
Character on screen
EventFires after a turn whose narration put one of your characters on the player’s screen, in the dress mode you choose. Use it to react to a character showing up: play a special picture the first time they appear, or keep count of how often the player meets them.
Pick the character from the story’s cast, then any dress mode, or check up to two of clothed, undergarment and nude. Topless and bottomless count as nude; a named outfit counts as its base dress mode.
It reads the character tags of the text the player was shown (in Two Pass mode, the Scene Formatter’s, which can tag inactive characters too), once the turn has finished, so it runs alongside your Check Story Context triggers. It fires on every turn the character appears; for a one-time moment, disable the trigger at the end, as in the example. A Show Media in it waits for the player to read up to that character before the picture appears. An LLM Inject in it reaches the narrator on the player’s next turn.
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
ConditionA 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.
Character List Check
ConditionA gate that looks at a Character list: it passes when the list contains a character (or does not contain them), or when the list is empty (or is not empty). Pick the character, or choose “character named by” and a string variable that holds the name. The name is matched the way Update List matches names: capitals don’t matter, and a first name is enough when only one character has it. A name that isn’t on the list simply counts as not there; nothing fails.
Use it to stop a tool trigger before it changes anything. If the AI model asks to hire a guard who isn’t for hire, or to message someone who isn’t one of today’s matches, a Character List Check catches it first, so a Tool result can tell the model and Skip Remaining Actions can end the trigger.
You’ll also find it in the If part of the If / Then and If / Then / Else actions.
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
ActionSends 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.
Show or inject Story/System texts
ActionPuts 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. Texts can be up to 5,000 characters, {{name}} fills in variable values, and they can use the same character and background tags as your Starting Prompt.
Modify Custom Instructions
ActionChanges 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.
Check Story Context
ActionLets 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.
Tool result
ActionAnswers the AI’s tool call. The text goes back to the AI as what the tool did, and the AI carries on writing from it, so write it as plain facts, like “You hired Brakk. You have 30 gold left.” {{name}} fills in variable values, after the trigger’s earlier actions have changed them, and a Characters list fills in the names on it. Up to 4,000 characters.
You can only add it to a trigger with a Model calls a tool event; elsewhere it’s grayed out in the Add menu. If that trigger runs some other way, like from Run/Modify Trigger outside a tool call, the result is skipped. If several triggers or results answer the same call, their texts are joined in order. Without any, the AI gets a short summary of the actions that ran, or is told that nothing handled the call when no trigger ran or its conditions didn’t pass.
An action that fails, like a name that isn’t on the list, adds an Error line to the result, but it doesn’t undo the actions before it or stop the ones after it.
To handle a “not enough gold” case, give the tool a second trigger with the opposite condition, or use If / Then / Else with a Tool result on each side.
Actions: Variables & Lists
Set Variable
ActionChanges 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.
Update List
ActionChanges 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, pick some at random into another Characters list, move every character into another list, or clear the list. A Status list isn’t offered here: change the variables its rows show with Set Variable instead.
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.
With picking random, up to the number you set (a number or an {{int}} variable) are chosen from the characters not already in the other list, like a tavern rolling which guards are for hire. They come off this list unless you choose keeping them on this list too. With moving every character, everyone not already in the other list moves there. Picking and moving stop when the other list is full (50); anyone who doesn’t fit stays on this list. Clearing every character empties the list.
To add or remove the character named by a STRING variable, pick a Characters list to look the name up in. Capitals don’t matter, and a unique first name or whole word is enough (Brakk finds Brakk Ironjaw). When nothing matches, the action fails with a message listing the names on that list; in a tool call, that message goes back to the AI so it can try again.
Show List
ActionPops 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. A Status list shows a character sheet: its rows in order, with a first Character row as the header. 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 or Set Variable in the same trigger.
A Status list’s rows are set up on the variable: Character (a portrait and name), Status (a name, a current and a max value, and the HP, Mana or Trust style of its bar), Money (a name, an amount, and a gold or cash icon) and Text List (a name and a list of short texts). Values are a number or {{int}} / {{float}} math like {{hp}} or {{gold}}+10, and names and texts can show {{name}} values, so the sheet changes when you set those variables. Typing {{sheet}} in a text gives the same values in one line, like HP 84/100 · Gold 1,240.
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.
Actions: Menus & Media
Show Media to player
ActionPuts 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 while it is up, 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 while the player reads the text it came with. Their next >> (or a tap on the picture) takes it away as the story moves on, and so does their next command (do, say, Continue, a menu choice) or closing it. Newer media replaces it at once; nobody has to close the old one. When one pass shows several, the first appears and each >> or command shows the next before the story text moves on. In a Character on screen trigger, the media waits until the player reads up to that character’s part of the narration.
Put a Story/System text (shown) right after it in the same trigger and the media appears with that text: it takes the stage when the player reaches the text and stays while they read it, and the next >> or tap moves to the next text and its own media in one press. So “photos of A, text about A, photos of B, text about B” shows each set with its text instead of all the sets first.
Want media to appear by itself when the story reaches a moment? Use In-Game Images / Video instead.
Show multiple Images
ActionPuts up to 10 of your uploaded images on the stage together. The player browses them with the purple < and > buttons at the sides of the screen, or by swiping the picture left or right; a small counter at the top shows which one they are on. Every image unlocks in the Story Media section of the player’s Gallery, as with Show Media to player, and you can again choose to keep the story text on top or hide it.
Pick each picture from your IMAGE variables with Image, in the order the player should see them (videos are not offered here; use Show Media to player for those). The whole set leaves the stage the same way a single picture does: their next >> or their next command takes it away, and so does closing it.
Actions: Characters & Scene
Move Character to Active/Inactive Roster
ActionBrings 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. In Two Pass mode the Scene Formatter still knows benched characters, so if the narration features one anyway, their sprite shows and Character on screen fires, but they stay inactive. 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.
Instead of the character you picked, it can move every character in a Characters list at once (say, the whole party), or the character named by a STRING variable, looked up in a Characters list the same way as in Update List.
Change Character
ActionRewrites a character’s background, personality or sample dialogue, the same three texts you fill in for each character in your story setup. The narrator and the rest of the AI read the new texts from then on. Write only the ones you want to change; a text you leave empty keeps what the character has now.
For each text, choose replace, add at start or add at end. Replace swaps the whole text for yours. The adds keep what the character has and put your text on its own line before or after it, the way Modify Instructions adds to the custom instructions, so a trigger can reveal one more secret without rewriting the rest.
The change is for that play-through only: your template, and everyone else’s play-throughs, keep the original. It lasts until another Change Character rewrites it, and Rewind to last turn puts the old texts back. The change happens before that turn’s narration is written, so the very turn that changes a character already uses the new texts.
The texts can use {{variables}}, filled in with their values when the action runs (later changes to the variable don’t change the text again). {{user}} stays the player’s name, as in your story setup. Like Move Character, it can change the character you picked, or the character named by a STRING variable, looked up in a Characters list.
Use background
ActionPuts 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.
Change story era
ActionSwitches 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.
Actions: Logic & Flow
Use RNG
ActionRolls 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.
If / Then
ActionMakes 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.
If / Then / Else
ActionWorks 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.
Run/Modify Trigger
ActionLets 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.
Pick the trigger from the menu; type to filter the list. The first option, This Trigger, means the trigger the action is in, even after you rename or duplicate it. Renaming a trigger updates references to it by name for you, and a reference to a trigger that no longer exists shows in red.
A trigger can disable itself with Disable This Trigger, 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.
Wait x seconds
ActionPauses 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.
Hide narration this turn
ActionThis turn gets no narration. In a Tool Call trigger the AI is used for its tool call only: it stops after the call that ran this action (no second call, and no Two Pass formatter call), and nothing it wrote is shown or saved. From a player-send pass or a menu choice that starts a turn, no narrator call is made at all. Your Story/System texts and media are what the player gets this turn, and they are what the next turn’s narrator reads, together with the tool call and its result.
Use it when a tool’s result is better told by your own texts than by the AI: a dating app’s new matches, a shop’s stock list, a status screen. Pair it with Show Media or Show multiple Images followed by a Story/System text (shown) for each item. It has no effect in a trigger that runs after the turn (Check Story Context, Character on screen, In-Game Images / Video): that narration is already written. The turn still costs the AI call that made the tool call.
Skip Remaining Actions
ActionStops 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.
Do nothing
ActionAn 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.
Actions: Story Control
Show Failure/death Screen
ActionEnds 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.
Rewind to last turn
ActionUndoes 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. The player reads it before the rewind happens.
Exit story progression
ActionMakes 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.
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 This Trigger.
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.
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 This Trigger 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.
Why didn’t the AI call my tool?
The AI decides by itself, from your instructions. Check that an enabled trigger with a Model calls a tool event listens to the tool (the TOOL variable’s panel warns you when none does), that the instructions say plainly when to call it, and that you’re playing on the website, since the mobile app doesn’t offer tools. AI models differ in how readily they use tools, so test with the models your players are likely to pick.
Does the AI remember tool calls from earlier turns?
Yes. Each call and its result are kept with the turn, and the AI sees them in the story history on later turns, so it doesn’t call a tool again for something an earlier result already settled. Players never see these lines. In stories with Story Progression nodes, the Story Director’s calls aren’t kept this way.
What happens to tool calls on Redo or Rewind?
Whatever the tool triggers changed that turn (variables, lists, custom instructions, active characters) is put back first. A Redo writes the turn again, so the AI can call the tools again.
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. Tool calls make a turn cost a little more: after each call, the AI is asked again to carry on writing, and those requests count toward that turn’s narration.