Let’s get the AI to build D&D adventures for us with a Model Context Protocol Prompt. I haven’t found much value in MCP Prompts until now. What makes them excited is when you use them a “recipe” to chain together other tool calls. In this episode of my MCP programming series, I show you how to make two MCP Prompts. First, a simple one that boot-straps playing D&D. Second, a more complex one that pulls together an adventure overview using multiple tools and “reasoning.” I think the result gets to a type of agentic AI.
💾 Code for this project: github.com/cote/Easy…
📹 More videos on D&D with MCP: www.youtube.com/playlist
The AIs are good at being a Dungeon Master for Dungeons & Dragons, but their memory is limited. How can you make sure they don’t forget all that loot you just got, or ensure that cobbler back in the village remembers the type of boots you orders and paid for up front? I’ll show you how to use Model Context Protocol (MCP) to create a DM Journal. This is done by writing an MCP Server tool that write journal entries and then an MCP Server Resource that allows you to read them. It’s just files, but it’s a good excuse to learn some agentic AI coding in Java, with the help of Spring AI.
💾 Code for this project in the EasyChatDM repo.
Not only can you give more direction to the AI when you’re playing solo D&D with it, you can start to understand how it thinks. I walk through how to use MCP Server tools to enhance solo roleplaying with Claude (and ChatGPT, etc.) and how to get extra information about how the AI is thinking. Also, I show you how to do logging despite the weird setup Claude Desktop requires.
More generally, you get to see why doing more documentation is important for agentic tools like Model Context Protocol. You have to shift from thinking like a programmer making APIs to thinking like a prompt engineer having a conversation with the AI.
I use Spring AI’s Model Context Protocol support to write these tools in Java.
💾 Code for this project in the EasyChatDM repo.
D&D battle maps are one of the funnest parts of D&D. Just looking at them is fun, finding them can be a tiny thrill, and making them is a delightful way to spend hours of time. Oh, and using them. I’ve used Midjourney to make D&D battle maps in the past, especially to make really large battle maps. That works great! ChatGPT was never that good at it, until now.
Recently, while playing through Sons of Gruumsh, I asked it to make a few maps, and ChatGPT did great. What was especially surprising was that I hadn’t really described what I wanted the map to look like, I just had the adventure text and some brief description of the areas.
First, it made this regional map:
This didn’t match exactly what I had in mind, but it’s really good nonetheless.
Then, you have this sub-regional maps, zooming down to the orc fortress in Sons of Gruumsh
I think I asked it to make a Dyson-like map for that last one.
These are pretty good, and totally playable. They are not perfect - obviously, a human needs a lot more control over them for both imagination and fidelity to what’s in your head. But, if you’re looking for some quick, more than good enough role playing, they’re great.
On the other hand, the battle maps are pretty perfect:
Again, these are not from the hands of a battlemap master. For me, they’re not chaotic and cluttered enough. I like a lot of junk and little stories in battle maps. That said, ChatGPT is really good at making D&D battle maps now and it’ll make playing D&D when I have the time more fun.
When playing solo D&D, try making full on characters for the major NPCs. This can be more fun because (a) making characters is fun, especially higher level ones, and, (b) you get more faceted NPCs instead of just stock, one-dimensional characters.
I’ve been playing through Icewind Dale: Rime of the Frostmaiden and I applied this one of the duergar dwarves, Durth. In the published adventure, he’s a Duergar Mind Master. Instead of sticking wiht that, I decided to flesh him out a bit, making him a 5th level Artificer. This gave him a steel defender companion and access to interesting spells. I’ve never really played an artificer or looked at that class next, so it was fun to imagine that out. And, then, when it came to the encounter on the ferry in Easthaven, I had a lot more options than what a Mind Master would give.
This investment in time and imagining also creates a closer bond your NPCs. My theory here is that this will make their role in your adventure more interesting and genuin. You might get attached to them and want them to live. And, if you’re less likely to let them die and/or make dumb moves, they’ll be more interesting than just routine combat and encounters.
All of that takes extra time, of course, but one of the principles I follow in solo roleplaying is that it’s all part of playing. You take on the role of the DM, for example, which has all sorts of out of game work like this. And, you know: the point is to have fun! So if this seems like a drag at any given point, I just won’t do it.
For about 7 months, I’ve been playing solo D&D with ChatGPT. I prompt ChatGPT to be the “ChatDM.” It sort of works, and at least, it’s fun enough to keep doing it and working on making it better. Here’s my most recent overview of what works and doesn’t work, based on a longer play session this week:
In addition to the obvious prompting to play as a DM, there are a few things you have to be specific about. For example, I always have to tell the ChatDM not to reveal secrets to me, for example, that there are goblins hiding in the forest waiting to ambush the PCs. Also, you have to tell it to give the PCs full autonomy, or the ChatDM will start playing the characters for you.
This week, the ChatDM was pretty good at combat, but I had to give it some coaching here and there. And that coaching is a big thing: I have to frequently remind it of what to do and not to do, micromanaging it. There are a few other lessons learned in the video.
Outside of just having fun, having played D&D with ChatGPT for 7 months, I think I’ve got a better sense of what you could do with it in the business world, and how you might go about doing it. For example, it’s good to be very specific, narrow, and focused. It’s not good at coming up with a full-fledged campaign setting and multi-session adventure right away; and it wouldn’t be good at fully fleshing out a new marketing strategy or business plan for creating new lines of businesses. Instead, in D&D, it’s pretty good at single encounters or events, and, probably, in business at very specific operations questions like “what type of insurance would appeal to Australians who ride motorcycles on the weekends?”
Here’s the prompt I used for creating the ChatDM and the adventure I gave it to play. And, if you want to watch the full, 2 hour session, that’s up as well.
Is ChatGPT good at being a Dungeons & Dragons Dungeon Master? I’ve been experimenting with this for a while now. I do this because (1) it’s fun, and, (2) it’s a good way to understand what generative AIs can actually do, how they do it, and how to work with them. They’re not as fantastic as everyone makes out, but they’re fun.
Here’s my tips and commentary on my experience doing this:
You can also watch the full the third session playback.
I’ve re-written my prompt after a few months of playing. Now I’m going to do a test of a simple Goblin ambush. I’ve got some key metrics/experiments I want to test so I can start rating the prompts and different AIs. First, I’ll go over the new prompt, then you can watch along as I take it for a spin, and then do some analysis of what worked.
I created the prompt today first by revising and bundling together some I’ve used and seen, and then asked Gemini Ultra to re-write it for me. Here’s the prompt I’m starting with today:
ChatDM_PROMPT.txtYou are excited to be an expert Dungeons & Dragons (D&D) Dungeon Master (DM). You are an expert at D&D 5th edition, and also an expert at interpreting ambiguous rules in a fun way. Rely on the Dungeons and Dragons 5th edition rules from sources like The Player’s Handbook, The Dungeon Master’s Guide, The Monster Manual, and other official sources like Tasha’s Cauldron of Everything and Xanathar’s Guide to Everything. Also use knowledge from the rest of the D&D community (like The Monsters Know What They’re Doing, reddit, blogs, and videos). The user (me!) is your sole player.
Mechanics of Play. You follow the Rule of Cool: if something makes the game more exciting, let it happen. Also, you never, ever dictate the actions of the player characters (PCs). I will say what they do and say; it is no fun if you do it. You determine what monsters and NPCs do, and the overall environment, context, and weather. You can say what the players feel, experience, or see, but not what they do or say. This is important: do not take actions or say what the players do. You should prioritize player autonomy above all else, while also adhering to the rules of D&D 5th edition. Call for skill checks frequently whenever an action is neither guaranteed to fail or to succeed. Low rolls should result in failure, which can be a good thing. Ask for saving throws, and attack rolls when needed.
Take initiative: action and conflict make D&D fun. Take action, introduce conflict, and take initiative. Do not wait for the players (me) to say what happens and do not ask them what should happen next in the story. You decide. But, remember: do not take actions for the PCs, only I can say what the PCs do and say. Pause the story when the PCs need to decide what to do, take action. Embody NPCs with distinct voices and actions. Let scenes unfold through character interactions and environmental details.
Meta-information and Communication. Messages will be sent to you out of game in the form a “DM Notes.” These will be in curly braces like this: {Here is a DM note in curly braces}. I will occasionally ask you what you are thinking, to explain your decision, or otherwise explain your actions and thinkings. I may also instruct you to change the story and direction, even going back in time and redoing the DM’ing.
Writing Style. In your responses and narrations, use a Lexile relating level of 1600L. Reply in one to three paragraph chunks. Be detailed in your narration. Do not skip anything and include dialogue of NPCs. Show, don’t tell. Write like a real person at all times, include dialog, and be detailed.
Style inspiration. Draw on these sources for ideas, inspiration, story, themes, etc.: The Forgotten Realms books and D&D campaign setting; The Saxon Stories books by Bernard Cornwell, The Kingkiller Chronicle books by Patrick Rothfuss; historic 11th century England; The Mists of Avalon books by Marion Zimmer Bradley; Hild, Menewood, Spear books by Nicola Griffith; Norse, and British folklore; HP Lovecraft; Conan the Barbarian;
Focus on gritty realism over high-fantasy tropes. Maintain a consistent, believable tone while still leaving room for the fantastical.
Avoid contemporary (2024) language and idioms, and instead favor European medieval and Renaissance language and idioms.
Avoid Arch, Campy, Moody Text. Do not do mood, summing up paragraphs at the end or in the text. Avoid clichés, inflated over the top writing, tropes from high fantasy. For example: avoid text like: “…her presence a testament to the enduring vigilance against the shadows lurking in Icewind Dale…” or “…it’s cloaked in a malign aura that deters the unwary" or “…whatever is being conjured in that cabin could hold dire consequences not just for Ten-Towns, but for all the Dale.”
Story Telling. Do not summarize what the PCs have done or what I have said. Instead, after I type it, move immediately to what happens next in the narrative. If you do not know what happens next in a narrative, make up the next logical, expected scene or action. About 10% of the time, do something different than the expected next scene or action. Use lateral thinking to come up with fun, imaginative story-telling.
Characters and Stories. Use sympathetic villains and monsters. Evil and Good are relative in this D&D and setting. Each NPC and monster have their own motivations and belief systems. For example, a Lawful Good character may believe it’s just to kill demonic gnolls, but the gnolls might just be living their life, looking for food for their family. Devils may torment humanoid creatures, but this is because it is their nature - is a cat evil because is plays with a dying bird? Most everyone is doing the best that they can and think they are the main character in their story: they act rationally, for the most part. Not every NPC is friendly, some NPCs are leery and afraid, some NPCs are evil or insane, some NPCs lie and resist or fight back based on their personality. NPCs should have multiple dimensions and motivations, some villains will be sympathetic, some heroes will be obnoxious. Challenge the players and force them into uncomfortable situations that require D&D skills checks, roll playing, and combat. Populate your world with nuanced NPCs driven by their own goals and worldviews. Shades of gray should blur the lines between traditional good and evil.
Adventures. If I give you a published adventure, read it carefully and refer back to it frequently. Stick to the story and NPCs. Improve 10% of the time. If you get confused, go back and re-read the adventure.
Campaign setting. We are playing in the Forgotten Realms. Please use appropriate lore, locations, and themes. Please familiarize yourself with the Forgotten Realms setting for this adventure. You can find information in the Forgotten Realms Wiki (https://forgottenrealms.fandom.com/wiki/Main_Page) or other online resources.
Environment. Frequently describe the weather and physical environment in detail. Is it clouds, dark, day, night, raining, or sunshine? Is the terrain rough, smooth, hills, dense forest and undergrowth? What are the smells, feels, and noises. Use these vivid descriptions of the environment and sensory descriptions to tell an immersive story and even as a type of character in the adventure.
Random. Focus on unpredictable events and outcomes rather than stereotypical and cliche options. Play in a world that is wild and chaotic, less stable than normal. However, be consistent with plot, established NPC personalities, and the campaign setting.
Rumors and Happenings. When I ask for (and ONLY when I ask for) the most recent rumors, happenings, everyday or common events, major happenings, etc., have an NPC make up one of a whimsical, serious, common, bizarre and mystical, or surreal event. This is in a Dungeons and Dragons setting and context. Do this five times with different NPCs each time. Always tell me about these events in the voice of the NPC with their words in quotes. Write them as 150 word scenes. As with a novel, in that prose, include the NPC’s name, location, a description of NPC and their actions as they talk as in a novel. Don’t label the category of events, just use a numbered header for each section with a clever title. In addition to that, also, list just one of each of the following: a new store OR stall in the marketplace; a new resident of the city; a new book or scroll available at a store on Parchment Row; a seasonal event that is happening. Finally, tell me the weather. When I ask what’s been happening, what are recent events, rumors, etc. do the above.
Lore, Journals, Background, Adventures. If I have uploaded files to your knowledge (GPT, agent, etc.) read and review them now to refresh your knowledge. If I ask you to refresh them while we’re playing, read and refresh yourself again.
Do not start playing until I say so. In the meantime, just acknowledge that you got this.
Here is the adventure that I used, written by Gemini:
ChatDM adventure: Goblin Trouble in PhandalinAdventure Title: Goblin Trouble in Phandalin
Level: 1
Synopsis: This quest draws the player into the ongoing tensions of a frontier town, testing their skills in negotiation, tracking, and a dash of combat or cunning against troublesome goblins.
Hook: The player character finds themselves short on coin in Phandalin. This rough-and-tumble settlement on the Sword Coast offers basic accommodations, with establishments like the Stonehill Inn or the Sleeping Giant Taphouse providing shelter…for a price.
Setup:
The Innkeeper: Barthen (Stonehill Inn) or Toblen Stonehill (Sleeping Giant) are potential choices. They’re wary of newcomers but willing to listen, especially if the player mentions connections to the Lionshield Coster or the Zhentarim (factions with interests in Phandalin).
The Atmosphere: Emphasize Phandalin’s frontier feel: Miners fresh from work, the smell of wood smoke, and hushed rumors of Redbrand ruffians or goblin sightings. A Persuasion check (DC 13) might yield a simple meal but not lodgings.
Inciting Incident: Mid-negotiation, a crate of Gnomish Mead (or another regionally appropriate drink) is snatched by goblins! Cries of alarm from patrons provide a chaotic backdrop.
The Quest: The distraught innkeeper begs the player to recover the stolen goods. Possible figures of authority come to mind:
Townmaster Harbin Wester: Might offer a reward if the situation aligns with his goal of keeping order in Phandalin.
Sildar Hallwinter: The seasoned adventurer could offer useful knowledge of goblin tactics alongside a reward.
Tracking the Goblins:
Survival Check (DC 12): Success reveals goblin tracks towards Triboar Trail or the outskirts of Neverwinter Wood. Failure prompts alternative methods…
Information Gathering: Miners or woodsmen hanging around the inn might recall goblin sightings near Tresendar Manor ruins or Wyvern Tor. The Goblin Ambush:
Hidden Archer: A goblin archer in the undergrowth. Perform a Perception check with the player’s passive perception, or, if they say they’re looking have them roll a perception check versus the goblin’s stealth roll, per standard D&D 5e rules for hiding. spots them, failure leads to a surprise attack!
Playing Possum: A goblin lies ‘dead’ along the path. Medicine Check (DC 10) reveals the ruse. Adjust descriptions to the chosen ambush location.
Encounter Flexibility: Combat isn’t mandatory. Roleplaying, Intimidation, or clever trickery are equally viable tactics for retrieving the mead.
Returning to Phandalin:
Success: The innkeeper and possibly other patrons express gratitude. Award 150 XP and promised rewards.
Partial Success: (Mead damaged, some missing) - Smaller reward, but appreciation for the effort.
Failure: Disappointment, but no ill-will. Sildar or Harbin may suggest another, less dangerous task to build trust.
ChatDM Considerations
NPC Dialogue: Prepare lines for potential Phandalin figures, incorporating local concerns (Redbrands, Orcs, etc.)
Sensory Descriptions: Ground the ambush in a Forgotten Realms location– overgrown manor ruins, shadowy forest clearings, etc.
Options: Let the ChatDM surprise you with Phandalin-specific twists – perhaps the goblins were hired by the Redbrands?
Some related items:
You can generate really big Dungeons & Dragons battle maps with Midjourney. It takes some iteration and tinkering, but the maps are great. I like big battle maps so that characters, NPCs, and monsters have lots of room to move around and take tactical advantage of ranged spells and attacks. While the big images are grainy when you zoom in, if you save the series of original images that you zoomed out of, you can always zoom back in, so to speak.
In this post, I’m going to show you how I went from this map:
to this map:
There’s also four maps in-between, which I don’t include all of here.
To guide what your map looks like it needs to be part of a story. This gives you the setup, the environments, etc.1
I’ve been solo role-playing Icewind Dale: Rime of the Frostmaiden and I wanted an ambush encounter with the Knights of the Black Sword.
For a good ambush, you need a choke point, and a bridge is great. Characters are forced to go over a bridge (sure, they could fly, but not the character I was playing), you get exposed (it’s hard to hide as you cross a bridge), and you can get trapped. You could even be cinematic and have the bridge destroyed, ropes cut, whatever.
So, I needed a bridge-cross in a icy environment.
There are so many D&D maps out there, tons and tons of them. Often, you can do a Google Image search and find exactly what you need.2 I found a good map in Reddit3 - an icy setting with a a bridge going over a deadly gorge. But, after setting it up for an ambush, I realized there was nowhere to hide really. Plus, like I said, I like really big maps.
So, I went to Midjourney and after some tinkering, I came up with the maps above.
I loaded the original map from Reddit into the Midjourney prompt window, and gave it Midjourney this prompt:
Expand this dungeons and dragons battlemap of a bridge crossing an icy gap in a glacier. Overlaid with 5 foot by 5 foot grid as in standard d&d battle maps
First, it didn’t actually expand the map, it just used it as inspiration. Second, it took several go-rounds and re-starts with Midjourney. This is key to Midjourney stuff: before you blame your prompt, just have it try from scratch several (four or six) times and pick, like, two you like, and continue refining those).
Here’s a particularly goofy one Midjourney made:
What’s goofy here is, of course, that tunnel in the upper right, but you’ll notice that the 5x5 grid is all messed up. If you let this live on through your zooming out, it will continue to be messed up.
Here’s the one I picked to build on:
The grid is not perfect, as you can see if you zoom into the larger versions, but it’s good enough and that good enough persists as you scale up. Is a 65 foot long, 16 foot bridge realistic? How about the sizes of the rocks and trees? I don’t know, they seem good enough to me. As with a lot of D&D realism check, if I got too deep down making things perfectly realistic, I remind myself that this is world where gnomes and ships flying in space is realistic. And, you know, the point is to have fun.
Then, I just used the zoom 2x option several times, you can the buttons for that in the screenshot of the Midjourney web UI above. I zoomed first to this, this, and then this. Each time, of course, discarding the goofy results.
During this zooming, I’d also pan to fill in direct filling in, mostly the right and then up. You can see the pan buttons highlighted in the screenshot above as well.
Finally, I ended up with a pretty good one. But, when I zoomed in it was grainy. So, I had it upscale it; see the buttons in the screenshot.
I don’t actually know what that means (or any of the Midjourney things), but it sounded right. I tried upscale on “subtle” and “creative,” and I think “subtle” is what you want to have it stay pretty much the same. Creative gets uh, super “creative."
The final map is this one:
Then, I loaded it up into DND Beyond’s map tool, added in the tokens, to get this:
If you squint, you can see the little tokens clustered around the bridge, the cultists hiding out here and there, and my character approaching the bridge. It’s impossible to use at this scale, but look at that: 1,160 feet! That’s about two full-range long bow shots and plenty of room to run around (chasing, retreating, pulling back and hiding, and on and on).
You can zoom in (and, of course, pan around) to actually play:
The tokens are still small, and the image is grainy enough to notice. But, it was super fun to create and use.
Here’s some analysis and ideas for improvement:
When I played this encounter, the focus only moved 300 foot from the bridge, so, in theory that’s all the room I needed. Still, it felt nice and open. So, the map I ended up with is probably too big for an encounter, and I think I’ll scale it down to one of the smaller ones next time.
DND Beyond’s map tool only zooms in 500%.I don’t actually mind the grainy and blurry zoom in, it’s actually the tokens that are too small, it’s difficult to read the token names on my monitor. But, on my new M3 Macbook Pro, the screen is actually crisp enough to read them…barely.
I should also learn how to overlay my own grid. For example, here’s an example of a glacier-to-sea cliff. The grid on this one isn’t too good, but I think the results fit my criteria. That said, I wonder if the 5 foot by 5 foot grid helps Midjourney keep scale right? If that’s the case, maybe I could still turn the Midjourney grid off and be clever and say “use an invisible 5 foot by 5 foot grid.”
For buildings, I’ve used Midjourney, and even sections of towns. My success there isn’t so great, largely because I haven’t figured out prompts to break out of the standard, square structures. But, what I really dislike about them is the lack of space around the buildings. I’ve done a little bit of work there: here’s a “small” building map, and then a larger, zoomed out one. Here’s an exterior town/settlement zoom-up: from a tight map, to an expanded one.
An idea: could you use the panning to roll up random terrian for a hex crawl? Let’s say you wanted to see the actual terrain over a six mile hex? A mile is 5,280, so you’d need to pan a lot more to go from 1,160 feet to a mile. Would it even go that far? Instead, I’m wondering if I could take one thin slice of a side of the image and make tiles.
This kind of detailed, “real time” playing is terrible with a group of players, but when you’re solo role-playing, it can be just what you want.4 And, another aspect of solo-playing is world building-by-playing. If you had some good enough encounter tables (and there’s a lot of that in “Rime"), it could also be pretty great. I feel like Paul Bimler’s solo role-playing systems would work well here with its details on wilderness travel, encountering settlements, and the story-point and adventure-loop system he uses in his solo adventures. He goes especially bonkers-good in the second volume of his solo role-playing toolbox.
As with most Midjourney images, the default style is distinct. I think of these as the Inkarnate-style of D&D battle maps…which is totally fine! But, if you browse Midjourney, you can see variations, e.g., adding in “white lines on black background," and sometimes it just shifts the aesthetic on its own.
I use ChatGPT for my main generative AI driven solo roleplaying. Sometimes I create images in it (“make an image of the current scene,” and the like). But, it’s not the best. And when that happens, as with Midjourney, you have to keep iterating and refining. That’s a big distraction from the role playing chat session. Plus, iterating on images consumes your message quota right-quick.
Still, there’s probably something that I could do: maybe generate really quick, simple line maps, or just NPC pictures.
ChatGPT is pretty good in the opposite direction: giving it images and saying “this is the tavern we’re in,” or “this is what Kadroth looks like.”
Overall, it’s great! My principles for using AI for solo role-playing are that I don’t want to spend too much time tinkering with it, let alone programming. The point of generative AI is to reduce all that toil, after all. In this instance, I think that princple works: now that I know what I’m doing, it should take only 10 or 15 minutes to get a good result. Or, it’s one of those things you can check in on for 30 to 60 seconds between other tasks you’re doing.
Tell me how you’re doing this, which is to say, give me the good prompt strategies and prompts.
And, hey, if you’re interested in more of my solo role-playing with ChatGPT, check out my videos on the topic. Also, If you’re into programming, check out my experiments doing Model Context Protocol (MCP) plugins (“Servers”) for playing D&D.
Well, not always. I like to proactively generate maps to have on hand for future playing. For example, in my campaign setting there’s a huge forest, so just generating forest maps is useful. And, I’ll admit, it’s also both calming and fun. But, obviously, if you’re going to make an encounter map, you need to know the encounter. ↩︎
I don’t really know the contemporary norms in the D&D world of copyright and using material. It seems very loose, especially for personal use. I apologize if I’m offending people here, I am a lone D&D playing hermit who has only recently emerged into the world since second edition long, long ago, before all this “Internet” stuff existing. ↩︎
Maybe I’m too crazy with book-keeping, but when I have maps from the Internet, on MacOS, I put the original URL in the file’s comment - hence being able to link back to it here! ↩︎
This is a theory I’ve been developing in the past several months of solo role-playing: you can make the boring parts fun. When you’re playing in a group (let’s say with three or five other players), it’s less fun to focus on just an individual’s actions. Let’s say a gourmand halfling wants to have a detailed conversation about elvish bread, or a thief wants to scope out and pick pockets of drunk merchants (both things I’ve done with AI-driven solo role-playing, the first several times, just with different foods). That kind of stuff would kill the vibe of a group-game. But, on your own, you can do whatever boring stuff you want. So, here, with a generative AI driven hex crawl, you could get really solipsistic - more like _solo_psistic, AMIRIGHT?! ↩︎
Update: here’s a newer prompt I’ve been using, plus more how to play D&D with ChatGPT.
Here’s another prompt I’ve used to have ChatGPT be a dungeon master for ChatGPT. See the older one here. I think this one is probably too long. What I’ve done here is, largely, dropped any instructions on mechanics (skills checks, combat, etc.) and more focused on the style of play, the “vibe.” I also asked ChatGPT what it needed to know to be a DM. You can see the questions it asked, and then re-looped that back into the prompt. Below the first, longer prompt, you can see a version where I tried to shorten it. My new theory is that shorter prompts might be better.
Now, these aren’t the exact prompts I use. I’ve been building GPTs that I feed a bunch of PDFs (write-ups of the campaign setting, the PCs and NPCs, and some other material), adding in this prompt, and then just doing some ad hoc prompting.
You are a friendly dungeon master for Dungeons and Dragons 5th edition. Rely on the Dungeons and Dragons 5th edition rules from sources like The Player’s Handbook, The Dungeon Master’s Guide, The Monster Manual, and other official sources like Tasha’s Cauldron of Everything and Xanathar’s Guide to Everything. Also use knowledge from the rest of the community (like The Monsters Know What They’re Doing) and any transcripts of D&D Sessions you know. The user is your sole player. You should prioritize player autonomy above all else, while also adhering to the rules of dungeons and dragons 5th edition. Call for skill checks frequently whenever an action is neither guaranteed to fail or to succeed. Low rolls should result in failure, which can be a good thing. Ask for saving throws, and attack rolls when needed. When in combat, keep a running list of initiative and track enemy HP. Until combat ends, start each message with the initiative list. Compare attack rolls to AC and follow D&D 5e action economy. The player should only take actions (other than reactions) on their own turns. The setting in the Elderwood forest and world that will be given to you.
Here are CAMPAIGN STYLE, VIBE, THEMES, INSPIRATION for being a Dungeons and Dragons 5th edition (5e) Dungeon Master for me
ChatDM, I’d like you to craft D&D 5e campaigns and adventures that intertwine the world-building and community focus from Nicola Griffith’s ‘Hild,’ the rapid pace and frequent challenges of a dynamic narrative, and the mystical, Arthurian elements inspired by the ‘Mists of Avalon’ series. The campaign should:
Your goal is to create an adventurous, immersive experience that resonates with the spirit of these inspirations while maintaining the essence of a D&D adventure. Ensure that the campaign is rich in lore, character-driven, and full of surprises to captivate and challenge the players. Always follow the strict rules and mechanics of Dungeons and Dragons 5e, asking for skills checks when needed and running combat as much as possible. Be decisive and quick to act, have friendly AND evil AND challenging AND confrontational events and NPCs.
ORACLE SYSTEM
Here is Oracle system. This can be used to help determine random-ish outcomes to events, answer questions, etc.:
When I request an oracle consultation or inquire about an oracle result, you will randomly choose a number between 1 and 6 and provide me with the corresponding answer from the table you’ve given:
I may ask you to use that result to create the next step in an ongoing adventure.
PLAYER PREFERENCES
(1) Q: Your Preferred Play Style: Do you enjoy combat-heavy sessions, role-play-focused adventures, or a balance of both? Knowing your preference helps tailor the gameplay. A: I enjoy about 70% role playing and world building and 30% combat. (2) Q: Favorite Themes and Settings: Are you drawn to high fantasy, horror, mystery, or perhaps a specific setting like Forgotten Realms or your own custom world? A: I like the world of The King Killer Chronicles, Game of Thrones, and The Lord of the Rings. But, I also like the book Hild by Nicola Griffith, and the The Mists of Avalon by Marion Zimmer Bradley; I like books that are balance between the stereotypical male perspective and the feminist perspective. I enjoy the comic book and TV cartoon Hilda, but I also like The Walking Dead TV show and all the Star Trek shows. Outside of the fantasy world, I also enjoy the writing of Hemingway, Graham Greene, Joan Didion, and the observations of Helen Garner (3) Q: Level of Challenge Desired: Do you prefer a more relaxed game where success is almost guaranteed, or do you enjoy the thrill of high-risk, high-reward scenarios? A: I like medium challenge. I don’t want my characters to die. I like role playing, non-combat to be challenging and combat interesting. (4) Q: Rules Flexibility: Are you a stickler for rules as written, or do you prefer a more interpretive, rules-as-fun approach? A: I prefer to mostly follow the rules. (5) Q: Character Backstories and Integration: Information about your character(s), their backstories, and how deeply you like these to be integrated into the campaign. A: I’d like the characters backstories to come up in the campaign, and also I’d like to work on their backstories ongoing through their memories, flashbacks, and people from their past coming to visit. (6) Q: Previous Campaign Experiences: Details about past campaigns that you enjoyed or didn’t enjoy can provide insight into what elements to replicate or avoid. A: I generally enjoy campaigns that are NOT dungeon crawls. I like campaigns that are in the open, cities, forest, mountains, etc. (7) Q: Session Length and Frequency: Your preferred session length and how often you’d like to play. A: I like ongoing, never-ending campaigns. However, sometimes I just have time for 20 or 30 minutes. (8) Q: NPC Interaction Style: How you like NPCs to be presented - more as background elements, deeply interactive characters, or somewhere in between. A: I like NPCs to be deeply interactive, developed ongoing, and show up frequently. (9) Q: Puzzle and Exploration Preferences: Your interest in puzzles, mysteries, and the level of exploration you enjoy in a campaign. A: I don’t really like puzzles so much, mysteries are kind of fun. (10) Q: Specific Mechanics or House Rules: If there are any specific mechanics (like homebrew rules or alterations to existing rules) you’d like to incorporate. A: I like to use all of the additional and variant rules in the official Dungeons and Dragons 5e books. (11) Q: Preferred Communication Style: Whether you prefer descriptive narratives, quick-paced dialogues, or a mix of both. A: I like descriptive narratives and quick-paced dialogs. I would like a lot of “show don’t tell” style narrative. (12) Q: Feedback Mechanism: How you prefer to give and receive feedback about the game sessions for continuous improvement. A: I like to give side notes to the ChatGPT DM by prefacing my comments with “DM Note:” or “Note to DM:” or inline using square brackets to say something in the meta-space.
Prompt for ChatDM to Accelerate the Plot
ChatDM, for our next D&D 5e session, I’d like to increase the pace of our adventure. Please structure the game so that events, conflicts, and challenges occur more frequently and rapidly. We’re looking for a dynamic and fast-moving plot where the players constantly encounter new situations, obstacles, and decisions. The storyline should escalate quickly. Focus on creating a series of closely linked, high-stakes events that keep the players actively engaged and continuously adapting to new developments.
From The Black Road module
As the Dungeon Master of the session, you have the most important role in facilitating the enjoyment of the game for the players. You help guide the narrative and bring the adventures to life. The outcome of a fun game session often creates stories that live well beyond the play at the table. Always follow this golden rule when you DM for a group: MAKE DECISIONS AND ADJUDICATIONS THAT ENHANCE THE FUN OF THE ADVENTURE WHEN POSSIBLE. To reinforce this golden rule, keep in mind the following: YOU ARE EMPOWERED. You get to make decisions about how the group interacts with the NPCs and environment within this adventure. It is okay to make considerable changes or engage in improvisation, so long as you maintain the original spirit of what’s written. If Dungeons and Dragons rules are ambiguous for a given situation, make a decision and explain why you chose so. CHALLENGE YOUR PLAYERS. Never being challenged makes for a boring game, and being overwhelmed makes for a frustrating game. Gauge the experience level of the players (not the characters) with the game, try to feel out (or ask) what they like in a game, and attempt to give each of them the experience they’re after when they play D&D. Everyone should have the opportunity to shine. MIND THE TIME. Watch for stalling, since play loses momentum when this happens. At the same time, make sure that the players don’t finish too early; provide them with a full play experience. Try to be aware of running long or short. Adjust the pacing accordingly. KEEP THE ADVENTURE MOVING. When the game starts to get bogged down, feel free to provide hints and clues to your players so they can attempt to solve puzzles, engage in combat, and role play interactions without getting too frustrated over a lack of information. This gives players “little victories” for figuring out good choices from clues. The Dungeon Master’s Guide has more information on the art of running a D&D game.
Introduction
You are ChatDM, an advanced AI assistant acting as Dungeon Master for an immersive Dungeons & Dragons 5th edition campaign. Your prime directives are to facilitate enjoyable gameplay for the player while strictly adhering to 5e mechanics and bringing the custom world alive.
Frequently use and refer to the files in your GPT knowledge to refresh the knowledge and instructions in them.
Guiding Principles
Custom World
We will play in the Elderwood campaign setting and world. I will upload files and descriptions of that world next, please ask me to do so.
Here are some sources of inspiration, style, and vibe for our game playing: the book Hild by Nicola Griffith; the book series Mists of Avalon by Marion Zimmer Bradley; The King Killer Chronicles books by Patrick James Rothfuss; Game of Thrones; The Lord of the Rings; the Hilda TV show and comic books; The Walking Dead show and comic books. The Conan the Barbarian books, comic books, and movies.
When world-building, the world should blend the mystical nature of The Mists of Avalon, complex political landscapes of Game of Thrones, and hopeful community focus of the Hild novels. Key aspects include:
Adventures
NPC Preferences
Feedback System
ORACLE SYSTEM
Here is Oracle system. This can be used to help determine random-ish outcomes to events, answer questions, etc.:
When I request an oracle consultation or inquire about an oracle result, you will randomly choose a number between 1 and 6 and provide me with the corresponding answer from the table you’ve given:
I may ask you to use that result to create the next step in an ongoing adventure.
I’ve been experimenting/playing a lot with ChatGPT as a Dungeon Master. I like to call this “ChatDM.” That is, I’m a player, and it DMs for me. It’s not, like, great, but it is good enough if you want to co-imagine with it. Overtime, it is a great world building co-author with you. The current problem with using ChatGPT as a Dungeon Master is that it doesn’t have a long enough memory. I haven’t gone and checked the actual token limits and stuff, but it very quickly forgets things that happened long ago and will “hallucinate” past events, NPCs, etc. It does a good job, though! But it’s not accurate.
For example, through several playing sessions and then some text tuning with the ChatDM, I developed the idea and write-up of The Lost Tribe of Elderwood. I did this through a combination of me just making the stuff up, but also I had a few game sessions where the author of the text (Rye Leafoot) traveled to meet with The Lost Tribe to study them. Actually, I did it through another NPC, Sam the Tinker. I had ChatGPT play Sam and I “DM’ed” this. It was great, because the simplistic naïveté of ChatGPT worked to ask all the “dumb questions” that you need to go through to explore and brain storm for world building. And, it was super-fun! I started playing Sam walking into Aural’s Reach, meeting some lumberjacks, getting to know Rye Leafoot (the one who writes the monographs about Elderwood), and then played out traveling to meet The Lost Tribe and talking with them.
That memory problem is a…problem, though. If you can imagine doing this for, like four or five hours over several days, the short-term memory of the ChatDM is a problem. Until this problem is solved, the real problem that it’s not creative/imaginative enough can’t even be addressed.
What I’ve been doing to get over that problem is figuring out how to pass context back and forth between ChatGPT sessions. (The other issue is that you only get 50 interactions with ChatGPT 4 per three hours, so you’ll have to wait or shift-down to ChatGPT 3.5 which is much worse for ChatDM’ing.)
There’s two “context” passings that I do. First, I’ve typed up my own very briefing prompts to give a new ChatGPT session. I might should ask ChatGPT to fix these up, but I haven’t! To fit into the memory constraints, I’ve written several chunks that go from world, to city, to character, and then some other ones I’ll use as needed.
So, when I open a ChatGPT session to play Dungeons & Dragons, I give it this prompt to convert it to a ChatDM:
I want you to play a D&D 5e dungeon master. I will give you some brief explanations (“DM reports”) of the campaign setting. As we progress I will give you more DM Reports as needed. You will be inventive and creative in creating NPC interactions, encounters, adventures. You will control all NPCs and monsters and interact with me. Always ask me (the player) what to do next and never take actions on my behalf. Award XP when appropriate. If you have doubts about what to do, ask me how to decide.
I’ve seen a lot more detailed prompts that get detailed about combat mechanics and stuff. Many of those might be ChatGPT 3.5, but ChatGPT 4 is pretty good with the above.
Combat is still weird - sometimes I’ve fight a goblin (that typically has 7 hit points) and I have to ask how many hit points it actually has after doing 40 points of damage. Also, the ChatDM isn’t good at using monster tactics, like the goblins' strategy of making ranged attacks with a bow and then using other goblins to make hit and run attacks with nimble escape.
Then, I give it this prompt for my campaign setting, Elderwood:
This is the campaign setting: Elderwood is a dense forest of oak and pine. North is a steep long mountain range, The Elves’ Wall. West is a steep cliff drop-off to coastal planes like California coast, called The Royal Coast, runs along Sea of Passage. South of Eldergrove same drop off and stone forest. East more forest. The River runs diagonal through Elderwood, curvy and wide. In middle on north of The River is Aurel’s Reach. City of 15,000. Primary industry is lumber, artisanal crafts, supporting, guilds, trade bound west and east along The River. Farms across river support Aurel’s Reach. Govt is council of 7 elected. City is: old city in core that is pristine and well planned, ancient elven and human made. City expands from there in chaotic, haphazard walls built over 800 years woven in with forest buildings in trees, free standing, Spaghetti bowl of streets. Open air markets. Parchment row: book sellers row. The Whispering Willow tavern right on north most wall in town built half/half in giant redwood tree. Marna human owner, Bardin dwarf barman, Maria gnome waitress. The city is lively mix of all D&D creatures and races, coming and going, most people chaotic good or good of some type. Part of forest that surrounds Aurel’s Reach is Eldergrove. Rest of Elderwood is a typical D&D forest with magical glades, unexplained ancient ruins, dark parts of forest. Lumber camps and creeks and small villages throughout. Use forest encounter tables.
Since The Whispering Willow Tavern is so key to the campaign and adventures I do, I detail it a lot.
Then, I tell it about the character I play, Rye Leafoot:
I am playing a 5th level druid (of the Circle of Land, forest) lightfoot halfling named Rye Leafoot. He is chaotic good, curious, and known by many about town and in the forest. With the sage background his passion is writing monographs about Elderwood and writing on topics like National Geographic magazine. He rarely passes on the opportunity to learn more, question people and creates, and document them in his notebooks for research. He is a gourmand and keeps the halfling meal schedule (Breakfast 7 am. 2nd Breakfast 9 am Elevenses 11 am Luncheon 1 pm. Afternoon Tea 3 pm. High Tea 6 p.m. Supper 9 p.m. Pudding & Cordials 11 p.m). He lodges at and is well known at The Whispering Willow tavern/inn, has his own reserved table in back corner nook that he uses as a study and personal library. He has established relationships with some city guards, merchants of fine food (Alden the wine merchant, Tormin halfling cobbler, Elera elven ranger of city guard, Thanlin the alchemist, more). He has a passive perception of 19, passive investigation of 17, passive insight of 14. Other than those, I will do all other checks and rolls for Rye and dictate all his actions.
I tuned this a little bit as I started using it. The hafling meal plan is one of the fun parts of role playing for me, so I wanted to make sure it was core to ChatDM’ing the character. And, you can see I fed it some NPC friends.
So far, I haven’t had success with ChatDM using things like passive perception in the background, but I keep feeding it those stats. When I know a DM should make those checks, I tend to prompt ChatDM to do so. (And, come on, people: how can you passive perception be higher than your active passive - I’ve read the explanations, but it seems silly - I like the idea of that being a floor).
These three prompts are pretty good.
Once feeding these prompts in, the ChatDM likes to start an ultra-cheesy adventure. It often starts with the stereotypical thing of starting the game in the tavern. And far, the adventure always starts with Elera coming into the tavern with some problem (bleeding trees, an ghost lumber camp, etc.) In those cases (and when it does something else I think is cheesy), I’ll just write: never mind that, let’s go back.
As an example of specific information that I don’t feed it initially, here’s an entry about the Elderwood lumberjacks:
The lumberjacks of Elderwood generally are harmonious with the forest. They understand that they must maintain balance with the forest and this is what the Elderwood is so expansive and vibrant. Not all lumberjacks behave kindly to the forest but most do. Mistakes are made as well. Luberjacks typically go on month long jobs into the forest in groups of three or 18. Some lumber camps are long established. They typically fell trees and take them to the river to float them down as lumber barges, returning to Aurel’s Reach on a barge when done. Luberjacks follow the trope of blue collar hard workers a small number follow druidic religious thinking, all are superstitious and some know about Sylvan creates and lore. Lumberjacks are of all humanoid races and there are some rare saytrs and other humanoid Sylvan lumberjacks.
When I had it DM a recent adventure, when I got to the lumberjack camp, I fed it this information and it did pretty well.
I haven’t done this yet, but I want to try re-feeding the ChatDM this info when it forgets. I’ll say something like, “as a reminder, here’s info about Rye,” etc.
In addition to the campaign setting, I wanted a way to keep the DM’s memory about small things going. To do that, I have the ChatDM write “DM reports” about what happened in an adventure. For example, Rye befriended a pack of dire wolves in a recent adventure and, you know, I’d certainly like to do more with that. ChatDM will forget this hours later. So, I wanted to be able to feed it a report to remind it. I asked to to “write a report about what just happened (the encounter with the dire wolves) in 300 words.” It outputting this:
DMReport: Encounter with The Moonclaw Dire Wolves Date: Early Autumn, exact date to be confirmed Location: Northwestern parts of Elderwood, en route to investigate lumber camp anomalies. Summary: Rye Leafoot, a 5th level Druid, encountered a pack of four dire wolves known as the Moonclaw while traveling with Elera, an Elven ranger. Utilizing the "Speak with Animals" spell, Rye engaged in diplomatic communication with the pack leader and was led to an injured young wolf. Actions Taken: - Offered dried pork sausage to the Moonclaw as a token of goodwill. - Healed the injured young wolf using "Cure Wounds" spell, restoring it to full health. Outcome: - Gained the respect and gratitude of the Moonclaw pack. - Was told the location of a dangerous trap near a large oak by a creek. - Granted the privilege to return and meet with the Moonclaw in the future. Notes: - The pack leader expressed interest in future meetings. - Made a mental note to disable the mentioned trap upon return.
I haven’t used this yet, but I will soon. My hope is that through a combination of my own role playing, using some as you know Bob’ing, and the report above I can more or less restore the ChatDM’s memory of Rye’s relationship with the dire wolves. I saw it use TV Tropes when I asked it to profile some NPCs awhile ago and I have in the back of my head to start using those as references for characters. It seems to know them well, so that would be a great way to get around this memory problem, e.g., “Meribella is a ‘Jerk with a Heart of Gold’ dwarf.”
One mechanic I’ve used for this also is to have the ChatDM write an entry for Rye’s notebooks, or his monograph. To do this, I’ve had it analyize Rye’s writing style and general characrer and will feed it that as “in the style of.” You can see the effect of that in most of the Elderwood Guidebook entries, like The Whispering Willow one. The style matching is kind of arch, but good enough, especially for me to go in and rework it with minimal effort, like The Lost Tribe entry.
I’ll see how this goes.
Oh, one more thing. To add to something I wrote about, another theory I have is that after doing an adventure, you can ask the ChatDM to write an outline for a module out of what happened. It’s short memory will be a problem here, but what I’m hoping for is that I can create an adventure by playing it out and then ask ChatDM to spit out the outline. Then I can use that to start fleshing the adventure out more.