Multi-Machine Progression
Link multiple scenarios together so players progress through a sequence of conversations with the same NPC.
Overview
A single persona can have multiple scenarios (called machines). By default, each scenario is independent. Machine links connect them — when a player completes one scenario, the link's condition determines which scenario unlocks next.
This lets you build multi-stage NPC experiences: a merchant who has separate buying, selling, and quest-giving conversations, where completing one unlocks the next.
Machine Links
A machine link connects a source scenario to a target scenario with a condition that must be met for the target to unlock. Links appear in the editor when your persona has two or more scenarios.
Condition Types
| Type | Value | Unlocks When |
|---|---|---|
outcome | ACCEPT, REJECT, or KICK_OUT | Player finishes with the specified outcome |
score_gte | A number (e.g. 5) | Player's score is greater than or equal to the value |
score_lte | A number (e.g. 3) | Player's score is less than or equal to the value |
always | — | Always unlocks, regardless of outcome or score |
Auto-Advance
Links can be marked as auto-advance. When enabled, the player is automatically taken to the unlocked scenario instead of returning to the scenario selection screen. Useful for linear storylines where you want seamless progression.
Entry Machines
Scenarios marked as entry machines are always available to the player — they don't require a link to unlock. Every persona needs at least one entry machine as the starting point. Scenarios with no incoming links are also always available.
Cross-Machine Variables
Scenarios can pass data between each other using cross-machine variables. This lets choices in one conversation carry over to the next.
Output Variables
Define output variables on a scenario to extract information when it completes. Each output variable has a key and an extraction_prompt — a question the AI answers by reading the conversation history.
// Output variable on "Weapon Shop" scenario
{
"key": "chosen_weapon",
"extraction_prompt": "What weapon did the player purchase?"
}Input Variables
Define input variables on a scenario to inject previously extracted values as context. Each has a key (matching an output variable from another scenario) and an inject_as label that provides context for the AI.
// Input variable on "Arena" scenario
{
"key": "chosen_weapon",
"inject_as": "The player is carrying this weapon"
}When the Arena scenario starts, the engine injects the extracted value (e.g. "longsword") into the NPC's context, so the AI can reference it naturally in conversation.
Progress Tracking
The engine tracks each player's progression across a persona's scenarios:
- Completed machines — which scenarios the player has finished, with outcome and score.
- Unlocked machines — which scenarios are currently available based on link conditions.
- Route path — the chronological sequence of scenarios the player has visited.
- Cross-machine vars — extracted variable values stored for injection into future scenarios.
- Total score — cumulative score across all completed scenarios.