New to Narrative

Design and storytelling resources for game makers, old and new.

A stack of cards that say Plot Beat C, Plot Beat A and Climax in order.
Home » Blog » Procedural Narrative and How to Make It Coherent

Procedural Narrative and How to Make It Coherent

Don’t you just hate it when you get a haircut on self-care day and suddenly a raccoon falls through the ceiling and causes havoc? There’s a difference between your expectations and your experience. This is a common problem in procedural narrative games as well! Procedural narrative is a great way to create dynamic stories that are unique to each player, but it can be difficult to make a coherent story out of it. You might run into inconsistencies in continuity, tone, or pacing. Today, we’ll be taking a look at what procedural narrative is, what these inconsistencies are, and most importantly, tips to deal with them!

Preview

  • 20 Minute Read
  • Beginners/Intermediates
  • Useful for writers and narrative designers

Video

If learning through video is more your style, I have a video on this topic instead:

What Is Procedural Narrative?

Typically, when we talk about “story” in games or interactive fiction we think of either a linear story that the player experiences plot beat to plot beat. Or perhaps a branching story where the player’s choice influences the direction the story takes. I like to describe procedural narrative as a branching story of which the creators don’t know if or when a plot beat will show up. 

A popular approach of procedural narrative is chopping up the story into little pieces, that I like to call events. We pile these events up in a big stack, like a deck of cards, and then sort them by probability. Probability in this case refers to the likelihood of that card being picked next. Like in a lot of interactive fiction, the player’s actions and choices then influence that probability.

Linear Story

To illustrate this more clearly, let’s think of a small example. Let’s write a linear story, where we have the player encounter Loki, the Norse god of mischief, hanging off a cliff. Then, the player saves him. He hands the player a heavy bag as a reward… very suspicious. Finally, Loki pushes the player off the cliff. What a twist, nobody saw that coming! You could visualize each of those plot beats as cards, stacked into a deck, in consecutive order. The player then draws each card one by one. When they pull the last card in the deck the story is over.

Branching Story

In a branching story, we could have the player choose to save Loki or let him fall to his doom. Naturally, that would take the story in a different direction. If the player lets Loki fall, he curses them as he plummets to his demise. In this case, there’s a deck of cards for the first choice and another, different deck for the second choice. The decks are still in order, however.

Procedural Story

In procedural narrative, we’d take all those cards and shuffle them together. Naturally, not every plot beat still makes sense when it’s out of order. So, we take only the cards that make sense by themselves. We put aside the cards that don’t.

Loki pushing you off a cliff unprompted is definitely something Loki would do. I also wouldn’t put it past him to hand you a heavy bag out of nowhere. But him plummeting to his demise and cursing you would not make much sense without any prior context. So we put that card aside and only shuffle it into the deck after you draw the event that precedes it.

A deck of cards for linear, branching and procedural narrative. The linear deck is neat and drawn in order. The branching deck has two decks with different stories. The procedural deck is shuffled messily and the cards are out of order.
Here we visualize our narrative examples as decks of cards.

In addition to the original story, now it could follow this progression instead:

  1. You encounter Loki.
  2. He gives you a heavy bag for no apparent reason.
  3. You later find Loki hanging off a cliff.
  4. You let him fall.
  5. Now you have a free bag and it only cost you eternal guilt. 

Or, alternatively:

  1. You encounter Loki.
  2. He pushes you off of a cliff for no apparent reason.
  3. You later find Loki hanging off a cliff himself.
  4. Looks like the tables have turned, Loki!

Examples

If we shuffle in another, different event, we can create even more combinations. For example, Loki might hand you the heavy bag and you then get attacked by giants. How will you fight back while still holding that bag? Hopefully, you can already imagine the possibilities of this kind of storytelling! If you have many of these events players will likely experience an entirely unique sequence of them.

Just a quick disclaimer: this is just one implementation of procedural narrative. I chose probability-based events because it’s easy to visualize and explain. You have stories driven by systems, tales guided by generative AI, narrative-building board games with dice mechanics, the list goes on. Those can all also be called procedural narrative, because the plot is driven by some sort of dynamic procedure, as opposed to a pre-defined path.

What Makes Procedural Narrative Incoherent?

These randomized events can be a strong foundation for a procedural narrative. The hard part is controlling the randomness so that the overall story still makes sense. I’ve found that there are three major inconsistencies you can run into when creating a procedural narrative: continuity, tone, and pacing

Continuity

Continuity is how well-established the consequences of plot beats are in your story. If one character dies in a plot beat but is suddenly alive without explanation in the next, that breaks continuity. Fortunately, it is the most measurable of these inconsistencies. That makes it easy to spot for you as the creator but also for the player. If a continuity error is too noticeable or happens frequently, the player will stop expecting your story to be believable. That’s a good reason for them to stop playing and not come back.

A classic continuity error in ‘Beauty and the Beast’. The beast tears up his own portrait, but it’s torn up differently when Belle finds it later.

For example, Supergiant’s Hades’ is a game about dying over and over again. The main character Zagreus says something to the final boss about dying over and over again when you encounter it for the first time. But you can potentially get to the final boss on your first try, which means that Zagreus has not died at all! The writer had to go back and add alternative lines for characters that would remark on Zagreus’ many failed attempts. Even though the vast majority of players won’t ever finish the game on the first try. They added that in just for the sake of continuity!

Tone

Tone is the overall atmosphere of your story. If your story is a dark, gritty, murder mystery, it would feel very jarring for a cartoon dog to suddenly walk into your scene and quip a few jokes. When shuffling events around randomly, it can be hard to measure what tone the player is currently experiencing. 

For example, ‘Wildermyth’ is a procedural roleplaying game in which characters speak based on randomized personality traits. On paper, this should create scenes where each character adds their own flavor to the situation. In practice, however, it can create situations where one character is making jokes about a tense situation, another is dramatically emotional and the last one is citing lengthy prose. A scene like that might be more coherent if it focuses on one of those things instead.

Screenshot of Wildermyth in which one character says the following: "You couldn't string much sleep together. Since we entered these thickets. Sorry, I did notice. Don't get far from me, if you can help it, I'm better rested." To which the other character responds: "Yeah, it's... but I'm good. Thanks."
Wildermyth’s procedural nature can sometimes generate dialogue that’s not coherent.

You could potentially write all your events in a similar tone to avoid this problem, but that would create a pretty dull story without much variety. That brings us to the next issue.

Pacing

Pacing is the rhythm and speed in which a story unfolds. If an adrenaline-pumping action scene gets interrupted by ten minutes of heartfelt dialogue, the sudden shift might feel jarring to the player. Good pacing can prepare players for what’s to come, keep them from nodding off, prevent them from getting overwhelmed, and build up to a satisfying emotional payoff.

While writing a linear story, you have full control over pacing. But in procedural narrative, pacing is by far the hardest of these inconsistencies to get right. This is due to your lack of control as a creator over the order of events. Games in particular have other dimensions that can suffer from bad pacing as well, like difficulty spikes and flow-breaking gameplay. Turret segments and mandatory stealth missions come to mind.

Any of these inconsistencies can break the spell you want your story to have on the player. A story without proper continuity will stop making sense. Clashing tone can throw off players’ expectations. Poor pacing can bore or overwhelm players. All of that adds up to an incoherent narrative. But what can we do about that?

How Do We Keep Procedural Narrative Coherent?

Traditional writing has many methods to maintain continuity, manage tone, and set the pace for readers. I recommend looking into outlines, beat sheets, style guides, and motifs if you’re not already familiar with those. But even if you’ve mastered writing linear stories, keeping a procedural narrative coherent requires a different set of tools. We will now discuss a handful of them in no particular order. 

Prerequisites & Guard Clauses

In short, a prerequisite is when you check if certain conditions are fulfilled to allow an event to get picked. If a character comments on the player’s cool sword, the player should actually have a sword equipped, right? Similarly, you can abort events based on certain conditions as well. If the current event is triggered by a cursed artifact in the player’s inventory, but they just sold their entire cargo off to a merchant, you might want to cancel it altogether. That’s called a guard clause.

‘Hades’, a game I mentioned earlier, thrives on prerequisites and guard clauses. There are thousands of these conditions. They check how many enemies you’ve killed, which fish you’ve caught, what upgrades you’ve bought, and most importantly, which plot beats have already come to pass. The developers also give each event a priority and sort the imaginary deck of cards based on that. This ensures that each time the player talks to a character, the dialogue is relevant to their most recent playthrough. 

Achilles from the game Hades says: "As you may know, lad, I've a connection to the weapons that you use, having once wielded one of them myself. Of course not knowing its significance back then, but I digress. Sometimes, it... well, it keeps in touch. And I've a vision from it to impart.
Achilles, a character in Hades, responds to a condition regarding your weapons.

Prerequisites and guard clauses are a great way to ensure continuity, but can also be applied in strategic ways to improve pacing and tone. For example, you could track tension as a variable to add some chill events to cool down after a particularly action-packed sequence. I’ll come back to this in a future article about pacing in procedural narrative. Keep your eyes out for that!

Foreshadowing

In a previous example, we talked about how Loki can potentially push you off of a cliff randomly. Naturally, the player might find that unreasonable if they don’t even know that Loki is around. Foreshadowing is a way to warn the player of upcoming events, albeit indirectly. If you can somehow measure which events will be picked in the future, you can easily foreshadow the content of those events. 

For example, if an earlier event told the player that someone was sneaking around that cliff, they would be more on their guard there. Suddenly getting pushed off might still come as a surprise, but at least they were aware of some sort of lurking danger. Massaging players’ expectations like this is important in all storytelling, but doubly so if you have little control over the order of events.

Tooling

Using and tailoring the right tools is essential to any kind of development process, but especially for anything procedural. You want to be able to easily simulate different combinations of events to check if continuity, tone, and pacing are all connecting nicely. If you can somehow fix these inconsistencies at runtime, that will also dramatically improve your workflow.

Similarly, you want feedback from players to be easily accessible and categorized, so you can quickly assess what went wrong in their playthrough. Don’t underestimate the power of good feedback tools!

The TAPIR Method

The Thematically Accurate Procedural Interaction Registry, or TAPIR for short, is a system I initially designed for procedural dungeon generation. Know that I will jump through hoops to make an acronym work. The goal was to make sure that all the creatures and loot inside would fit the dungeon’s setting. It makes more sense to find a magic Trident in an Underwater Grotto than inside a Coal Mine, right? 

You could just make a list of loot and creatures for each dungeon setting, but that would get repetitive quite fast. After your third playthrough, you would know that the Underwater Grotto would have Mermaids, Crabs, and a Trident whereas the Coal Mine would have Dwarfs, Bats, and a Sledgehammer. So I thought to mix it up a little. It’s not too farfetched to imagine Dwarfs squatting a Grotto, right? And a surprise Dragon could make its lair in both the Grotto and Coal Mine, without any further justification needed.

Dungeon generation from classic Spelunky.
Classic Spelunky’s dungeon generation.

TAPIR is basically a big list of keywords with numbers attached for modifying the probability of other keywords. Initially, the keywords and their numbers are manually tailored by you. But at runtime, you programmatically choose one keyword from the list, Underwater Grotto for example, and it goes through all the keywords that Underwater Grotto is supposed to modify. In this case that would be Mermaid, Crab, and Trident, and their probability gets boosted. Then you pick the next keyword from the list that now has increased probabilities, which influences the next set of keywords. Rinse and repeat.

TAPIR Example

A TAPIR list could look as simple as this:

  • Grotto: +30% to Mermaid, Crab, Trident
  • Coal Mine: +30% to Dwarf, Bat, Sledgehammer
  • Mermaid: +10% to Grotto, Trident, Crab
  • Dwarf: +10% Coal Mine, Sledgehammer, Dragon
  • Sledgehammer: +20% Dwarf

What’s cool about this, is that any keyword can modify any probability. So instead of choosing the setting of a dungeon, we could instead choose a creature we want in there, and the creatures modify the probability of the setting instead. Any consecutive pick from the dictionary will make the next pick more thematically accurate.

I have yet to try the TAPIR method for procedural narrative specifically, but I don’t see why it wouldn’t work on events that modify each other, or keywords for tone like Dramatic, Tense, Silly, etc. 

Roll With The Implausibility

Lastly, this technique, if you can even call it that, might seem like a bit of a cop-out. Instead of trying to fix inconsistencies, you can simply try to justify them. Embrace the randomness of procedural narrative by setting it in a multiverse, for example. Or make a young child your story’s narrator. Maybe your events are out of order because somebody jumbled the pages of the manifest accidentally. 

There are endless creative ways to temper players’ expectations. Doing that is just as valid as trying to glue together a coherent story. I, for one,  would love to see something like a wacky procedural narrative game in the ‘Hitchiker’s Guide’ universe, using the infinite improbability drive as an excuse to have randomized plot beats.

Conclusion

So there we are! Procedural narrative can be described as a story of which you, the creator, don’t know when a plot beat shows up for the player. This can cause several inconsistencies related to continuity, tone, and pacing. If any of those issues are obvious to the player, they will stop believing in the legitimacy of your story, become bored or overwhelmed.

To help smooth out those inconsistencies and make your story more coherent, we’ve discussed a few techniques and tools. You can pick and choose the ones that fit your workflow best. Be creative with their application! Additionally, conventional storytelling methods help keep your narrative coherent as well. In the end, it’s really difficult to fix any and all inconsistencies, traditional or otherwise. Hopefully, this will help you on your way to at least make sure players enjoy your story for the cool, experimental thing that it is!

Thanks for reading! If you found this information useful and want to be notified when the next blog drops, you can subscribe to my free, weekly email newsletter. Alternatively, you can subscribe to my YouTube channel for videos on the same subject. If you can somehow spare a few coins for your local narrative design Witcher, I sincerely appreciate donations and subscriptions on my Ko-fi page as well.

TLDR

What is procedural narrative?

Procedural Narrative is a story that is driven by dynamic “procedures”, as opposed to a pre-defined path. I like to describe it as a story of which the writers don’t know if and when a plot beat will happen.

What’s the difference between linear, branching and procedural narrative?

A linear story unfolds plot beat to plot beat: the player starts at the beginning and finishes at the end. A branching story is much the same, but the direction changes based on the player’s choices. A procedural story is usually jumbled up, so plot beats can be experienced independently from each other.

What makes procedural narrative incoherent?

Your lack of control over when plot beats will happen makes you run into inconsistencies in continuity, tone and pacing. If those inconsistencies happen too frequently or are too obvious, players will not be immersed in your story.

What is continuity?

Conintuinity is how well-established the consequences of all your plot beats are. If a character dies in one scene but is alive without explanation in the next, that breaks continuity.

What is tone?

Tone is the overall atmosphere of your story. Is your story serious, dark and riddle with crime? Is your story light-hearted, funny and absurd? A consistent tone helps set players’ expectations.

What is pacing?

Pacing is the tempo at which the player experiences the story. If too much or too little happens in a certain period of time, that can overwhelm or bore players.

How can we make procedural narrative coherent?

By implementing prerequisites, guard clauses, foreshadowing, and trying to control continuity, tone, and pacing in creative ways we can prevent procedural narrative from becoming incoherent. Traditional storytelling methods like beat sheets, style guides and motifs also help.