top of page
  • Writer's pictureDanny McKeever

ChatGPT Prompt Engineering: 5 Steps to Creating Campaign Prompts

Updated: Feb 22, 2023

The Art and Science of ChatGPT Prompt Engineering that Work


--Midjourney: /imagine fantasy dungeons and dragons, The Art and Science of ChatGPT Engineering --ar 2:1 --q 2 --c 33--


This article explains how to engineer a Dungeons and Dragons (D&D) campaign using the Generative nature of a Large Language Model (LLM) like ChatGPT. The process involves creating a campaign template and building the story, writing a campaign outline, developing the campaign chapters through encounters, and iterating until complete. The template includes various elements such as campaign title, setting, NPCs, monsters, and conflict, while additional details like unique magic items, monsters, riddles, puzzles, books, painting, statues, and instructions for creating consistent dialog and characters are also important to consider.


Here is an overview of the 5-step process:


Step 1: Creating a Campaign Template - This serves as the input framework for building the campaign and includes various elements like campaign title, setting, NPCs, monsters, and conflict to enable ChatGPT to deliver the output you are looking for.

Step 2: Building the Story - This involves creating a story that is engaging and immersive for players.

Step 3: Writing a Campaign Outline - This involves outlining the campaign's narrative and breaking it down into manageable parts.

Step 4: Developing the Campaign Chapters Through Encounters - This step involves designing encounters and scenarios that allow players to engage with the world and progress through the story.

Step 5: Iterating Until Complete - This final step involves refining and iterating on the campaign until it is complete and ready to be played.


Step 1: Creating a ChatGPT Campaign Template


The campaign template construct:

  • Campaign title

  • Setting

  • NPCs

  • Monsters

  • Conflict

  • Hooks


Other Inputs that I may give ChatGPT

  • Dialog Creation

  • Instructions for consistency around dialog and characters

  • Any additional details and requirements for unique magic items, monsters, riddles & puzzles, books, painting, statues, etc..


ChatGPT Prompt Template (This is a simple version)


**Write for me 3 dungeons and dragons campaign titles, one about a dungeon, one about a forest and one about a mountain adventure. For each include the title, a description of the setting, 3 key NPCs, with their name, class, short description and a motivation, important monsters, and the conflict.**


Example Output (I picked one of the 3)


Title: The Crystal Caverns

Description: The Crystal Caverns are an underground labyrinth of winding tunnels and glittering chambers filled with sparkling geodes and rare gems. However, a terrible curse has befallen the mines, and the dwarves who once worked there have been turned to stone. It's up to the adventurers to uncover the source of the curse and put an end to it.


Key NPCs:


Hrogar Stoneheart, Dwarf Fighter - Hrogar is a gruff, no-nonsense dwarf who once worked in the Crystal Caverns. He's now a stone statue, but his spirit has been trapped in a nearby crystal. He desperately wants to be freed from his crystalline prison.

Zora Nightshade, Half-Elf Rogue - Zora is a sneaky thief who has been hired to steal valuable crystals from the caverns. She may be able to help the adventurers navigate the mines, but can they trust her?

Lord Valtor, Necromancer - Lord Valtor is a powerful evil wizard who has taken over the Crystal Caverns, he is looking to find the power of the crystals to animate the stone statues and turn them into his minions. He seeks to harness the power of the crystals for his own nefarious purposes.


Important Monsters:


Stone Golems - Animated statues that attack anyone who enters their territory.

Crystal Spiders - Giant spiders that weave webs of crystal and venomous silk.

Cave Trolls - Large, brutish creatures that can regenerate from most injuries.


Conflict:

The adventurers must navigate the treacherous Crystal Caverns, avoiding traps, solving puzzles, and battling monsters. Along the way, they must uncover the source of the curse and put an end to it, while dealing with the nefarious Lord Valtor and his minions.


Second Prompt: Flesh out the characters


Pick the one campaign that interests you and copy it, then add in the below prompt. In this example I will use the crystal caverns.


ChatGPT Prompt


**For the NPCs in the title the crystal caverns Write for me the following. For each NPC develop a positive and negative quirk, a unique tick or mannerism, and a common phrase that they use. Then write 5 potential Hooks for the player characters (PC’s)**


Output


Hrogar Stoneheart, Dwarf Fighter

Positive Quirk: Loyal to his friends and allies, and will fight fiercely to protect them.

Negative Quirk: Stubborn and unwilling to compromise, even when it might be in his best interest.

Unique Tick: Taps his foot against the crystal he's trapped in, creating a rhythmic tapping sound.

Common Phrase: "Let's get a move on, lads! There's no time to waste!"


Zora Nightshade, Half-Elf Rogue

Positive Quirk: Resourceful and quick-witted, able to think on her feet in dangerous situations.

Negative Quirk: Self-serving and untrustworthy, always looking out for her own interests.

Unique Tick: Twirls a lock of hair around her finger when she's nervous or anxious.

Common Phrase: "You scratch my back, and I'll scratch yours. What do you say?"


Lord Valtor, Necromancer

Positive Quirk: Intelligent and cunning, able to plan and strategize with precision.

Negative Quirk: Arrogant and overconfident, underestimating his opponents and overestimating his own abilities.

Unique Tick: Strokes his long, white beard when he's deep in thought.

Common Phrase: "You fools have no idea what you're up against. I am Lord Valtor, and you will kneel before me!"


Potential Hooks

  1. A local merchant offers the players a large sum of money to retrieve a rare and valuable crystal from the depths of the caverns.

  2. A powerful wizard hires the players to investigate a strange magical disturbance emanating from the Crystal Caverns.

  3. The players learn that a group of villagers who were last seen exploring the caverns have gone missing, and they're asked to help find them.

  4. A rival adventuring party has boasted of their exploits in the Crystal Caverns, and the players take on the challenge to prove their own worth.

  5. The players stumble upon a map or ancient manuscript that reveals the location of a long-lost treasure trove hidden deep within the caverns.


Step 2: Build the Story


Once you have created your campaign construct you can now move to the second input. In this step I would ask ChatGPT to write for me a 5 step outline of the story.


ChatGPT Prompt


**For the title the crystal caverns write for me a story outline that includes an introduction, rising action, a climax, falling action and conclusion. In the introduction introduce the NPCs, and establish the central conflict, in the rising action, outline any obstacles or challenges for the PCs and build tension, for the climax, develop the turning point of the story, make it dramatic, falling action, the aftermath and resolution and tie up loose ends, finally the conclusion, write the final outcome a key takeaway of the story**


I. Introduction

  • Introduce the main character(s) and setting

  • Establish the central conflict or problem


II. Rising Action

  • Introduce obstacles or challenges that the main character(s) must overcome

  • Develop the characters and their relationships

  • Build tension and suspense


III. Climax

  • The turning point of the story

  • The most dramatic and intense moment


IV. Falling Action

  • The aftermath of the climax

  • Resolve the central conflict or problem

  • Tie up loose ends


V. Conclusion

  • The resolution of the story

  • The final outcome of the main character(s) and their relationships

  • The takeaway or message of the story


Output


Introduction:

The players are hired by the local villagers to investigate the sudden disappearance of several people who were last seen near the Crystal Caverns, a dangerous and mysterious network of caves that are rumored to be filled with treasure and danger. As they make their way to the caverns, they meet two important NPCs: Hrogar Stoneheart, and Zora Nightshade. Hrogar is a gruff and loyal dwarf fighter, and Zora is a quick-witted and untrustworthy half-elf rogue.


The central conflict is established: the group must navigate the treacherous caverns to find the missing people, while also contending with the various dangers that lurk within.


Rising Action:

As the players venture deeper into the caverns, they face a series of obstacles and challenges. They must navigate narrow passageways, avoid deadly traps, and battle fierce monsters, all while contending with the cavern's unique crystal formations and dangerous terrain. Meanwhile, tensions rise between the NPCs as their conflicting motivations and goals come to light. Hrogar wants to rescue the missing villagers and protect his allies, and Zora wants to steal as much treasure as possible.


Climax:

The turning point of the story comes when the group reaches the heart of the caverns, where they discover that the missing villagers have been captured by Lord Valtor and a powerful crystal golem that has gone rogue. As they engage in a fierce battle with the golem, tensions boil over between the NPCs, leading to a climactic showdown. In the end, the group must work together to defeat the golem and rescue the villagers, but the conflict between the NPCs leaves the group divided and uncertain about their future together.


Falling Action:

After the battle, the group returns to the village with the rescued villagers and the treasure they've gathered. However, they must also deal with the aftermath of their conflict with the NPCs, which has left them with unresolved tensions and difficult decisions to make. They must decide whether to part ways or continue adventuring together, and come to terms with the consequences of their actions in the caverns.


Conclusion:

In the end, the group must face the key takeaway of the story: that the conflicts and tensions between people can be just as dangerous as the dangers they face in the world. The NPCs each represented a different motivation or goal, and the players had to navigate those differences to achieve their ultimate objective. The final outcome of the story depends on the choices and actions of the players, but ultimately, they will have learned the importance of trust, communication, and cooperation in the face of adversity.


Step 3: Write Campaign Chapters Outline


I will ask ChatGPT to write chapters for me in this format.


ChatGPT Prompt


**Write for me a chapter overview of the story. Start with a campaign overview and then 4 chapters that include 3 chapter unique names, so I can choose, a description of what happens in that chapter and a few bullet points, the key NPCs in that chapter, and a summary at the end.**


Output

Campaign Overview: The players are hired by the local villagers to investigate the sudden disappearance of several people who were last seen near the Crystal Caverns, a dangerous and mysterious network of caves that are rumored to be filled with treasure and danger. As they make their way to the caverns, they meet two important NPCs: Hrogar Stoneheart, and Zora Nightshade The central conflict is established: the group must navigate the treacherous caverns to find the missing people, while also contending with the various dangers that

lurk within.


Chapter 1: Into the Depths

  • Unique Name: "The Mouth of the Cavern"

  • Description: The players enter the caverns and must navigate treacherous terrain, avoid deadly traps, and battle fierce monsters.

  • Key NPCs: Hrogar Stoneheart, and Zora Nightshade

  • Bullet Points:

    • The players encounter their first traps and must work together to avoid them.

    • They battle a group of stone golems that have been animated by dark magic.

    • They come across an underground river and must navigate it to reach the next section of the caverns.


Chapter 2: A Light in the Darkness

  • Unique Name: "The Crystal Forest"

  • Description: The players find themselves in a vast chamber filled with glowing crystals and must navigate its twisting paths to find a way forward.

  • Key NPCs: Hrogar Stoneheart and Zora Nightshade.

  • Bullet Points:

    • The players must use the crystals to light their way and avoid the darkness that lurks at the edges of the chamber.

    • They encounter a group of crystal spiders that have been feasting on the cavern's inhabitants.

    • They discover an ancient dwarven tomb hidden in the depths of the chamber.


Chapter 3: The Heart of the Cavern

  • Unique Name: "The Golem's Lair"

  • Description: The players reach the heart of the caverns, where they discover the source of the missing villagers and the corruption that has been spreading throughout the caverns.

  • Key NPCs: Hrogar Stoneheart, Zora Nightshade, and Lord Valtor.

  • Bullet Points:

    • The players encounter Lord Valtor and a powerful crystal golem that has been animated by dark magic and they are holding the missing villagers captive.

    • Tensions boil over between the NPCs as they argue over how to proceed.

    • The players must work together to defeat the golem and rescue the villagers.


Chapter 4: The Aftermath

  • Unique Name: "Tensions and Treasures"

  • Description: The players return to the surface with the rescued villagers and the treasure they've gathered, but they must deal with the aftermath of their conflict with the NPCs and the consequences of their actions in the caverns.

  • Key NPCs: Hrogar Stoneheart, and Zora Nightshade

  • Bullet Points:

    • The players must decide whether to part ways or continue adventuring together, and come to terms with the consequences of their actions.

    • They must divide the treasure they've gathered and deal with the unresolved tensions between the NPCs.

    • The campaign ends with the players reflecting on the lessons they've learned and the challenges they've overcome.



Step 4: Develop the Campaign Chapters Through Encounters


Now that I have my outline, I will go back to chatGPT and flesh out the details for each chapter. I may add additional chapters, or delve into the details around hooks, specific NPCs, conflict, or encounters.


For example I may dig into the introduction and get more details. I will be looking for environmental, encounter and NPC details. As well as ideas that may foreshadow what is to come.


Example: For the Introduction

The players are hired by the local villagers to investigate the sudden disappearance of several people who were last seen near the Crystal Caverns, a dangerous and mysterious network of caves that are rumored to be filled with treasure and danger. As they make their way to the caverns, they meet three important NPCs: Hrogar Stoneheart, and Zora Nightshad. Hrogar is a gruff and loyal dwarf fighter, Zora is a quick-witted and untrustworthy half-elf rogue. The central conflict is established: the group must navigate the treacherous caverns to find the missing people, confront Lord Valtor while also contending with the various dangers that lurk within.


Now I think about the different encounters that I want to see?


  • Central Square Local Market

  • Local Pub - Introduce the fear of Lord Valtor through conversation

  • Chase Scene - tracking down Lord Valtor Spies

  • Pickpocket - because it is fun


Questions that I want to know:

  • Where exactly do they meet the NPC's?

  • How big is the town?

  • What does it look like and what are the popular locations?

  • What is the mood of the population?

  • What are the top 10 NPCs that the characters may bump into?


Questions I may ask ChatGPT give me 3 interesting locations within the town, the central square, the pub and the alleyway that would be good for an encounter, include a description, current atmosphere and any interesting happenings.


In future blogs I will talk about how to leverage ChatGPT to generate encounters.


Step 5: Iteration


Have a conversation with ChatGPT to flesh out the details for each section.


For example, you might ask ChatGPT for ideas on the central conflict, such as

"What are the different encounters that I should consider during the rising action?"

"What are some ways to make the Crystal Caverns setting more dynamic and engaging?"

"What are different options for the climax with Lord Voltor? What are his motivations?


As you work through each section of the campaign, you can continue to use ChatGPT to generate ideas and refine your approach. For example, you might ask ChatGPT to suggest unique character traits or mannerisms for the NPCs, or to help brainstorm creative obstacles and challenges for the players to face.


I then repeat this process for the sections that I want to update and or just write it myself.


The key to successful iteration is to stay flexible and open to new ideas, while also keeping the core elements of the story intact. By using ChatGPT to generate fresh ideas and perspectives, you can continually refine and improve your campaign until it reaches its full potential.


236 views0 comments
bottom of page