Creating Dungeons & Dragons Content with GPT-3

Earlier this summer, I got access to GPT-3 API from OpenAI. Since then, I’ve built a set of twelve fantasy RPG content generators. It has been an amazing and encouraging experience. In this post I’ll share my experience and outline what I learned.

OpenAI GPT-3 is a state-of-the-art generative text model. GPT-3 takes a sequence of characters as input and produces the next character in the sequence as output. It can generate whole sentences with this method. GPT-3 was trained on an enormous amount of fantasy and sci-fi content. As a result, it’s very good at generating new content that’s similar to existing works.

Using what’s coming to be known as “prompt engineering,” I have coaxed GPT-3 to deliver character backstories, spells, skills, creatures, dungeons, cities, shops, and more. Because I’m using a general model (Davinci) that is not fine-tuned (yet), I have to give GPT-3 two examples for it to output something decent. This is known as two-shot learning, by the way.

GPT-3: Character Backstories

My personal journey with GPT-3 began back in February as I used the previous model (GPT-2) to create D&D character backstories. After many hours of fine-tuning the 775m model, I began to see some interesting results. Then GPT-3 was announced. I didn’t get access right away, but I emailed with a detailed plan of how I’d been using GPT-2, and how I would like to use GPT-3.

AI + Procedural Generation = Worldbuilding Tool of your Dreams...

Coming soon to LitRPG Adventures Workshop...

A couple years ago, Janelle Shane wrote about using an RNN (recurrent neural net) to create D&D character backstories. She used a dataset supplied by her readers. I stumbled across her blog post while researching during my experiments with a character backstory generator of my own using GPT-2.

After emailing Greg Brockman at OpenAI and explaining what I’d been working on and asking for access to the GPT-3 API beta, I was surprised to find out I was accepted. I quickly got to work, putting together a very rough examples.

Check out my DND Backstory Generator made with the latest, greatest AI...

Unlike my work with GPT-2, I wasn’t using fine-tuning on GPT-3 at all. I simply gave it two examples of what I wanted, and it was able to figure out the rest. And that’s how LitRPG Adventures was born. Yes, it’s an ambitious project. I’ve recently joked that I’m old enough to know it’s a foolish endeavor and will likely fail, but I’m still young enough to think I can do it anyway. Small smile.

It started as an idea for 2d text-based MMORPG powered by GPT-3 (hence the name), but being a single person (mostly an author, not a full-time developer) I ran out of time before OpenAI began charging for their API in October. I totally understand their need to do this and want to help fund GPT-4 and future models too!

That’s why I switched gears and decided to release the LitRPG Adventures Workshop. I realized I had created a bunch of cool generators for the game, and changed them to make it easy for gamemasters to quickly produce a ton of unique (and sometimes quite amusing) RPG content with the press of a button.

With character backstories, you can tell your players that the NPC they all met last week is actually a powerful wizard who was defeated in battle and raised from the dead by a necromancer. Because GPT-3 is quite good at generating natural-sounding speech, I’m able to generate a variety of backstories.

I currently have 25 or so races and 30 or so classes to choose from when you’re generating a character backstory. This means there’s over 800 combinations to create. Whether you’re creating a new character or re-rolling a backstory, the generator is well-suited to both.

GPT-3: Fantasy Skills Generator

With skills, you can create a funny and unique skill that’s either general for one of the four major class archetypes (fighter, mage, rogue, and priest). Some of the skills GPT-3 comes up with are very bizarre. On the other hand, it’s also quite capable of creating a skill that makes sense if you think of it as a combination of existing skills.

GPT-3: Fantasy Spells Generator

With spells, you can create a funny and unique spell, choosing the school of magic and well as other details. Then, with the press of a button, GPT-3 will output a spell description that you can use in your adventures.

GPT-3: Fantasy Dungeon Generator

With dungeons, you can create a funny and unique dungeon. I have a few dungeon generators that will take a variety of input and craft a dungeon from it. The input is again keywords with a variety of different options.

GPT-3: Fantasy Creature Generator

With creatures, you can create a funny and unique creature. Creatures can be added to a dungeon, placed in a city, or used in any other situation where you want to add an NPC or monster. You have a lot of different options here, including the size and intelligence of the creature and other things like it’s attack types and more.

GPT-3: Fantasy Magic Shops Generator

With the LitRPG Adventures Workshop Magic Shop generator, you can create a funny and unique shop. The shop generator also allows you to add a number of different items to the shop.

Fantasy RPG Random Tables Books
Make life as a Gamemaster easier.... If you play Dungeon & Dragons, Pathfinder, or other fantasy tabletop role-playing games, this RPG random tables book is full of encounters, NPCs, and more. Available as an eBook or in a classic print format. Either way, you'll have a wealth of adventure ideas at your fingertips.

GPT-3: Fantasy City Generator

With our city generator, you can create a funny and unique city. The city generator also allows you to add a number of different buildings and NPCs to the city.

GPT-3: More D&D RPG Generators

There are a few more generators that I haven’t mentioned yet, but I’ll save that for a future article.

In all, it’s been an amazing experience. I am so grateful that I had the opportunity to work with GPT-3. If you’d like to see the LitRPG Adventures Workshop in action, you can watch this video:

Like what you see? Head over to LitRPG Adventures and start creating D&D or other tabletop RPG content today!

Paul Bellow

LitRPG Author Paul Bellow

Paul Bellow is a LitRPG author, gamer, RPG game developer, and publisher of several online communities. In other words, an old school webmaster. He also developed and runs LitRPG Adventures, a set of advanced RPG generators powered by GPT-3 AI. Here at LitRPG Reads, he publishes articles about LitRPG books, tabletop RPG books, and all sorts of DND content that's free to use in your personal tabletop campaign - i.e. non-commercial use. Enjoy your stay and reach out on Twitter or Discord if you want to make contact.

AI + Procedural Generation = Worldbuilding Tool of your Dreams...

Coming soon to LitRPG Adventures Workshop...

Fantasy RPG Random Tables Books

Make life as a Gamemaster easier....

Or try my D&D Backstory Generator