How to Create Scripted RPG Adventures with LoreKeeper's Trama Editor
Writing an RPG adventure takes hours: the encounters, the narrative arc, the NPCs, the plot twists. The Trama editor in LoreKeeper is built so you can design all of that visually, publish it with one click, and have others play through it in your world while you sleep.
What is a Trama and how is it different from a regular campaign?
When you play in LoreKeeper without a Trama, the AI Game Master improvises. You say what your character does, the AI decides what happens next, and the story grows in real time from the world the creator defined — its factions, NPCs, locations. It is an open, freeform way to play, similar to how a human GM improvises at a classic tabletop session.
A Trama is something else entirely. It is an adventure that someone has designed in advance: a sequence of connected moments with a beginning, a middle, and one or more possible endings. The AI Game Master follows that script instead of improvising. It could be a dungeon with three rooms and a boss, a mystery where you have to talk to five NPCs to find the killer, or an epic adventure with multiple branches depending on the player's choices.
The closest analogy in traditional tabletop RPGs is a published module: an adventure the author designed, that the GM has in front of them, and that the players work through. In LoreKeeper, you are the one who creates that module, and the AI Game Master is the one who narrates it.
How the Trama editor works
The editor is a visual canvas. You see your adventure as a graph: each moment in the story is a block, and the blocks connect to each other with arrows that represent how the story flows.
On the left is the node palette — the blocks you can drag onto the canvas. On the right, the inspector: when you select a node, you see and edit all its details. The top bar shows a live counter with the number of nodes, connections, NPCs, and maps in your adventure, plus an autosave indicator.
The editor validates the graph continuously. If you connect nodes in a way that creates a loop, if a starting node is missing, or if a combat node has no enemies assigned, an alert appears in the toolbar. You cannot submit the Trama for review until all errors are resolved.
Everything saves automatically as you work. You can close the editor and come back days later — the graph will be exactly as you left it.
The four node types
Each node represents a distinct moment in the adventure. There are four types, and each has a specific role in the graph:
Intro — The starting point
Every Trama needs at least one Intro node. This is where the adventure begins: the opening scene the player sees when they start. Here you set up the narrative hook, describe the setting, or introduce the first NPC the player will interact with. An Intro node can never be the target of a connection — it is always a starting point, never a destination.
Scene — Decisions and plot twists
Scene nodes are the moments in the adventure that are neither combat nor an ending. An important conversation, a dungeon room, a narrative crossroads. You can have as many scene nodes as you want. Each can have up to two outgoing connections, which lets you branch the story based on what the player has done. In the node's description field, you write what the AI Game Master should narrate when the player reaches that moment.
Combat — Prepared tactical encounters
A Combat node triggers LoreKeeper's tactical combat engine with the enemies and map you configured. This is not a combat the AI improvises — it is the exact encounter you designed. You set the enemies (from the world's bestiary or using built-in archetypes), the map with starting positions for characters and enemies, the rewards given on victory, and optional rules like permadeath or the ability to flee.
Ending — Where the adventure concludes
Every graph needs at least one Ending node. This is where the adventure finishes. You can have several different endings — a good one, a bad one, a secret one — and connect each from different branches of the graph. The player reaches whichever ending they earned based on the choices they made along the way.
Activation conditions: how the adventure knows when to advance
The most important part of the Trama editor is activation conditions. Every node — except the Intro — has a condition that determines when the player can reach it. Without a condition, a node is unreachable.
Conditions are configured with a visual rule builder. You do not write code: you select an entity from the world — an NPC, a location, an item, an event — and the verb that describes what needs to have happened with that entity for the node to activate. Some examples:
- The character meets Aldric the blacksmith — the node activates when the player has spoken with that NPC.
- The character arrives at the Northern Ruins — activates when the player enters that location.
- The character obtains the Stone Seal — activates when the player picks up that item.
- The Guard Betrayal event occurs — activates when that world event has taken place.
You can combine several conditions in one rule. You can require that all conditions are met, or that at least one is. This gives you a lot of flexibility to design alternative routes and complex requirements.
The editor includes a predicate health panel that automatically checks whether the conditions you wrote are coherent with the node's content. If you mention an NPC in the condition but that NPC does not appear in the node description, the system flags it. This prevents you from building adventures that look correct on paper but never actually advance in play.
Tactical combat with prepared maps
Combat nodes are where the editor really shines. You can configure an encounter with a level of detail that no improvising GM — human or AI — could maintain consistently across every session.
The tactical map has its own sub-editor inside the Trama editor. You upload a background image — a dungeon illustration, a forest clearing, a tavern interior — and place tokens on top: the player's starting position, enemies, obstacles, cover, and combat objectives. When the player reaches the Combat node, LoreKeeper's combat engine loads exactly that map with those positions.
You choose enemies from your world's bestiary or using built-in archetypes: goblins, skeletons, bandits, young dragons, and more than a dozen other options. Each enemy has a level, hit points, and a creature type. You can have multiple combat encounters in the same Trama, each with its own map and its own enemies.
Rewards are configured directly on the node: gold, experience, or a named specific item. The combat engine delivers them automatically when the encounter closes — the AI does not have to decide anything in real time.
You can also enable per-node special rules: permadeath (if the character goes down, they stay down), the ability to flee and return to the previous node, or a multi-phase combat where the boss changes behavior at 50% HP.
Publishing your Trama
Once you finish the design, you submit the Trama for review. A moderator checks that the graph is playable and that the content follows community guidelines. When the Trama is approved, it appears in the public adventure catalog and any player can choose it when starting a campaign.
Your Tramas also appear linked to the world they were created in. If someone browses your world in LoreKeeper's gallery and sees it has published Tramas, that is an extra incentive for them to start playing.
If your world belongs to someone else and you want to contribute a Trama to it, you can do so using the contribution button. The Trama goes to the world owner first, who decides whether to approve it before it gets published.
Who the Trama editor is for
The Trama editor is not for everyone, and that is fine. Two profiles get the most out of it:
- World builders who want their adventures to have structure. If you built a world with factions, locations, and NPCs, you can design Tramas that put all that material to work. A mystery adventure where the player has to talk to the NPCs you defined, visit the locations you created, and face enemies from the bestiary you populated. The Trama gives life to the groundwork you already laid.
- Tabletop RPG fans who always wanted to publish their own adventures. Designing a print module is a long, tedious process: layout, art, playtesting, distribution. With the Trama editor you design the adventure, submit it to the catalog, and have thousands of players trying it within days. No printing, no distribution, no middlemen.
Who is it not for? Players who just want to play. The editor is for creators. If your role is being the adventurer — not the author — then browsing the published Trama catalog and picking whatever sounds most fun is all you need.
If you want to understand how LoreKeeper works in general before creating, the guide on what an AI Dungeon Master is covers the fundamentals. And if you already have a world and want to make the most of it, the AI world builder guide explains how factions, locations, and NPCs work — all the elements the Trama editor can reference.
Frequently Asked Questions
What is a Trama in LoreKeeper?
A Trama is a scripted adventure with its own structure: a series of connected moments that players discover based on their decisions. Each moment — called a node — can be an exploration scene, a dialogue with an NPC, a combat encounter with a prepared map, or the finale of the story. You decide how the nodes connect and what conditions move the adventure forward.
What is the difference between a Trama and a regular campaign?
In a regular campaign, the AI Game Master improvises the story in real time based on the world you defined. In a Trama, you as the creator have designed the key moments, the combats, and the possible endings in advance. The AI follows your script instead of improvising. The result is an experience closer to a published adventure module: the player feels there is a real story behind it, with a beginning, a middle, and an end.
Do I need to know how to code to use the Trama editor?
No. The editor is visual: you drag blocks onto a canvas, connect them with arrows, and fill in the text fields. Activation conditions are configured with a visual rule builder — you pick an entity (an NPC, a location, an item) and the event that needs to happen. No code, no formulas.
Can my Tramas have multiple endings?
Yes, and that is one of the most interesting parts of the editor. You can create several Ending nodes and connect them from different branches of your story. The player reaches whichever ending they earned based on the choices they made during the adventure. The editor automatically validates that the graph is correct and that every branch has at least one reachable ending.
Do Tramas work in any LoreKeeper world?
Tramas are created inside a specific world and inherit its resources: the bestiary, NPCs, maps, and locations from that world. When another player picks your Trama, they play it in the context of your world, with the setting and characters you defined. This makes the adventure coherent with the lore you built.
Build your first adventure
The Trama editor is available to all world builders in LoreKeeper. Create your world, open the editor, and start connecting nodes.
Free to start. No credit card required.
Related guides
AI World Builder for RPGs
How AI can build factions, locations, races and lore that feed the game master in real time.
AI Arena: PvP Combat in an AI RPG
Player-versus-player combat run by AI — how it works, when to use it, balance considerations.
Living Wiki: A Codex That Writes Itself
A self-updating wiki of every NPC, location and event your sessions create.
