Emergent Narrative

Grimmloch runs on a pipeline we call AWEN — Action Weighted Emergent Narrative. In its simplest form it is three steps, and those three steps are the entire engine of the game. Every NPC, every location, every quest runs through the same pipeline.

The Pipeline

Step one

Uses a language model to understand the roleplay post — whether that comes from a player or another NPC. Its job is intent parsing: what is actually being said, what is relevant about the current state of the world, what goals are in play.

Step two

Routes that to a GOAP system — Goal Oriented Action Planning, a deterministic planning architecture that makes all the decisions you never want an AI to hallucinate. The NPC's mood, personality, knowledge, location, skills, inventory, and their individual relationship with every other character they have ever met. The GOAP queries our PostgreSQL database directly. If an NPC remembers something, it is because the system retrieved it. If they need to ask which harvest festival you meant, it is because they genuinely need more context to find the right record — not because anything was invented or lost. Every decision is traceable and testable.

Step three

Takes the GOAP's output — a fully specified decision about what this character does and why — and routes it to a second language model with one instruction: respond as this character, with this information, in this situation. The behavior is already decided. This model's only job is expression. It makes the response sound like that specific person. It cannot go off the rails because it has no authority over what actually happens.

Where the Stories Come From

At the end of each cycle, could be daily or weekly, a larger language model sweeps the accumulated interactions and surfaces the plot threads that have started to take shape — rumors players have introduced, tensions building between NPCs, events quietly setting themselves in motion. The game master team reviews those threads and decides which ones to let quietly resolve and which ones to feed.

If a player mentions bandits on the northern road and we think that sounds worth making real, we find NPCs who could plausibly be those bandits, give them motivations and goals, and release them into the world. They do not follow a script. They pursue their goals — and what that looks like from the outside is a storyline, because it is one. It just grew from the ground up rather than being handed down from above.

This is the heart of how Grimmloch respects player creativity — the world takes your ideas seriously and builds on them. Players are not following a story, they are making one. The game master team's job is not to author that story but to make sure the world it grows in stays coherent, immersive, and true to itself.

On the other hand if a player claims their best friend is Odin, we'll probably just let that one go untouched ... or we might let Odin know you are actually claiming friendship with him, maybe he'll show up.

The AI surfaces possibilities. Game masters decide which ones become part of the world. The living world does the rest.

Have a question or comment? Join the discussion on our Studio Discord in the #design-discussions channel.