Freedom Without Rails
How to make a solo D&D game interesting without passing a linear story off as real freedom. The mechanics we built, broke, and rebuilt.
A solo roleplaying game run by an AI has two familiar failure modes, and both are boring in exactly the same way. The first is rails: the master tells their story, and your actions become set dressing for a scene that was always coming. The second is a sandbox with no intent: the master obediently reacts to everything, remembers nothing, and leads nowhere. The first lies about you deciding anything. The second promises nothing at all — which is precisely why, twenty turns in, nothing has happened.
We shipped both of them before we got here. What follows is specific: what actually broke, which mechanics we put in their place, and where we deliberately stopped. Everything described runs server-side in Divergentum — the player never sees any of this state, and that is part of the design too.
ITwo failures wearing different clothes
Rails and sandbox look like opposites, but they collapse at the same point: the player's action carries no weight. In the first case the script drives over it; in the second it has nowhere to land, because the world has neither memory nor intent. The only difference is who is bored: on rails you feel led, in the sandbox you feel abandoned.
IIThe pattern comes from the prompt, not the model
The most expensive mistake we made was diagnostic. Campaigns kept degenerating into the same opening — a tavern, a rumour, a stranger at the next table — and the obvious first hypothesis was the model. Swap providers and the prose will come alive.
So we ran the direct test: one prompt, three different models, identical starting conditions. There was no difference in the manner of the telling. What came out of it was the opposite conclusion, and a far more useful one: the manner is dictated by the prompt. If all three models slide into the same tavern, the instruction is what's broken.
The real cause was in a counter. Our story clock advanced on "weighty" turns: a fight, a serious check, an event. A player who mostly talks and looks around produced nothing but minor turns — the counter never moved, and the campaign spun forever inside the first beat with its very narrow instruction: build atmosphere, do not rush toward conflict. The model followed that order faithfully. Forever.
We thought we were diagnosing the AI. We were diagnosing our own instruction.
IIIA rhythm, not a script
The first thing that separates a live table from a text generator is rhythm. A human master keeps it in their head: they know when to exhale, when to raise the stakes, when to let everyone breathe. We moved that rhythm into explicit campaign state — and deliberately not into plot.
An arc runs through six beats (the classic five-room dungeon, plus a slow opening). Each beat is a module of directives mixed into the master's prompt: what to do this beat, what is forbidden, which technique fits. The SLOW_BURN beat explicitly bans combat and loot and demands that one or two concrete details be planted for later. The ROOM_3 beat demands that the twist be fair: the clues must have appeared earlier, and the player's prior effort may never be voided — only redirected.
The crucial detail is the very one that betrayed us and, once fixed, became an advantage. Only weighty turns move the counter, not every exchange of dialogue. Which means the player owns the pacing: want to spend an hour drinking in a tavern, the story will wait. The problem was never the rule itself — it was that we had no content for a held breath. That is the next section.
IVThe hidden seed
The cure for our monotony turned out to be content, not machinery. On its first turn, every campaign draws a secret director's note: a myth — the hidden truth of this world — and four chapters that unfold as the player completes arcs. The player never sees it. The master is explicitly forbidden to retell the myth, summarize it, or dump it as lore.
This is not a plot to be played out. It is the direction the world drifts in when you are not pushing it. The weaving rules are what separate design from rails, and they are worth quoting in full:
- Reveal only through play — details, characters, consequences. Never explain.
- On passive turns, the world takes one visible step along the current chapter — and the detail arrives where the player is standing.
- Player agency always wins. If the player pushes elsewhere, follow the player; the design waits and resurfaces later.
- Attach seed roles to characters the story already has, instead of breeding new ones alongside them.
That third line is this entire article in one sentence. The design outranks emptiness, but never the player. The difference between "the world is leading you" and "the world lives while you choose" is simply who yields when the two collide.
The seed is not drawn blind
The library holds ten seeds built from public-domain material: the Fisher King, Tam Lin, Bisclavret, the Pied Piper, Marya Morevna. The draw is weighted by the hero's background: a soldier is three times more likely to pull the false-king story, a scholar the sleeper below, a criminal the debt at the crossroads. It is cheap personalization that costs the player no questionnaire — they simply notice that the story seems to be about them.
VThe agency lock
The subtlest form of rails does not live in plot structure. It lives in a single sentence. "You decide to check the door." "You realize it's a trap." "You feel you shouldn't trust him." Every one of those is the master playing your turn for you and handing back the result as description. Formally it isn't even plot linearity. Practically it is exactly that, in its ugliest form.
So the prompt kernel carries a hard lock. Describing the hero's decisions or thoughts is forbidden. Praising the player is forbidden — "great choice!" is a master flattering you instead of arbitrating. Moving the character somewhere they did not go is forbidden: listening, inspecting, talking, and thinking all happen exactly where the character stands.
That last one turned out to be startlingly hard. AI loves to accelerate a plot by teleport: the player listens to a distant scream and is suddenly standing under the dragon. The rule had to be written the way life works — the only way to move a hero against their will is physical. Seized and carried, knocked out, an explicit magical teleport. Everything else is an invitation: a track, a scream, a glow over the hill. The invitation goes into the action options, and the decision stays with the player.
Hooks may invite movement: a scream outside, tracks leading away, a glow over the hill. Offer them as action options — the player decides whether to follow. Show the dragon's shadow, not the dragon.
The same principle governs the three action options that close every turn. Three variations of one move — attack, strike, charge in — are an imitation of choice. So the options must spread across the three pillars of play: combat, social, exploration. Each starts with a different verb. Each accounts for this specific hero's abilities. We measure violations of that rule with a dedicated detector — more on measurement below.
VIThe die that does not fold
There is one more species of fake freedom that gets discussed far too rarely: the master who folds. An AI is obliging by default. It wants you to feel good. Let it both narrate and roll, and it will quietly start rounding in your favour — and the world stops pushing back. Freedom without resistance is worthless: if losing is impossible, choosing decides nothing.
So we took the dice away from the master. Combat is resolved by the server: 54 monsters from the open SRD with real stat blocks, attack rolls, crits on 20, misses on 1, damage from honest formulas. The master narrates the attempt; the server decides the outcome. The same goes for the inventory: you cannot drink a potion that isn't in your pack — the hero reaches for it and finds nothing. And for limited resources: abilities have charges, and a spent ability stays spent until rest, however persuasively the player asks.
Freedom is measured not by what is permitted, but by whether the world is allowed to say no.
VIIMemory is the only visible proof
A choice the world does not remember is not a choice — it is an animation. So every turn the master may anchor a fact in world memory, stamped with the turn it was established. Then the mechanism we like most for its sheer cheapness kicks in: after five turns with no reference to the past, the server slips a directive into the prompt — raise one fact or character from memory into the scene. Not invent a past: use the one that exists.
Returning is handled separately. If the player has been gone a day or more, the first turn of the session opens with a single change that happened without them. One — not a cascade. And never a punishment for leaving.
VIIIHope and fear
We turned emotional rhythm into state as well, but carefully. Every turn carries a tone — hope or fear. Flip them every turn and you get a mechanical metronome, which reads worse than monotony. So the bar for intervening is simple: push for a change of tone only once a run has formed — at least two identical tones in a row. And after a flip the run resets, so the next turn is guaranteed to be free.
IXFreedom has to be measured
Everything above is text instructions to a model, and a model is free to disregard them. So every turn writes telemetry: which kernel version, which modules were mixed in, which arc beat, how many tokens, what it cost — and, most importantly, how many violations the detectors found.
The detectors are simple and dull, which is exactly why they work. One scans the master's prose for banned agency phrases ("you decide", "you realize"). One checks whether the three action options actually diverge in type and verb. One counts whether the memory directive was honoured. That turns a question usually answered by taste into one answered by data: did the new prompt revision actually reduce the number of turns where the master played for the player — and by how much.
XWhat we deliberately do not do
- We do not force the arc mechanically. The temptation was there: after N minor turns in a row, shove the story forward. We refused — it cures the symptom at the cost of the exact thing we are protecting. The symptom was cured with content (the seed); the machinery was left alone.
- We do not show the player the arc state. No "beat 3 of 5" indicator anywhere. A rhythm you can see stops being a rhythm and becomes a timetable.
- We do not reveal the seed. Not even at the end — for now. A "chronicle" that shows the hidden design once a campaign concludes sits in the backlog, and we are not convinced it wouldn't retroactively spoil the experience.
- We do not let the master roll its own dice. This is not about trusting the model; it is about roles. An arbiter and a storyteller in one body will always drift toward flattery.
XIThe contract
Boiled down to rules you can carry into any AI-master project of your own, it comes to seven lines.
Freedom in a solo game is not a count of doors on the screen. It is the confidence that somebody stands behind them, that they have plans of their own, and that your decision outweighs those plans rather than the reverse. Everything else is direction — and direction is only visible when it's done badly.
How to cite this article
Kharchuk, M. (2026). Freedom Without Rails: designing an AI dungeon master that feels free. Merowingus Studio. https://www.merowingus.com/blog/freedom-without-rails.html
@misc{kharchuk2026freedom,
author = {Kharchuk, Mykola},
title = {Freedom Without Rails: designing an AI dungeon master that feels free},
year = {2026},
note = {Merowingus Studio · Divergentum build log},
url = {https://www.merowingus.com/blog/freedom-without-rails.html}
}


