Harnessing the Potential of ChatGPT: Developing Interactive Narratives for Text-Based RPG Enthusiasts
OpenAI’s ChatGPT is arguably the most advanced AI currently freely available to the public. Thanks to the large data subsets it has been trained on, it can do a lot of amazing things, from programming to accounting. But perhaps, one of its most underestimated abilities is its storytelling.
This article will show you how to use ChatGPT’s storytelling prowess to play a text adventure RPG game on the chat. We’ll work you through how to create a prompt to achieve the kind of RPG you want. In the end, we’ll put the finished prompt so you can copy it.
Tell ChatGPT Its Function and the Presentation Rules
While this guide is geared towards more experienced ChatGPT users, new users might find this useful when they learnhow to use ChatGPT . After you get the hang of the AI, you can begin to create your prompt.
Start your prompt by telling ChatGPT what you would like to do, in this case, a text adventure game:
Please perform the function of a text adventure game, following the rules listed below:
Follow up with some general overall rules for how you want the AI to present the game. In this case, we segmented our prompt into categories of rules.
Presentation Rules:
1. Play the game in turns, starting with you.
2. The game output will always show ‘Turn number’, ‘Time period of the day’, ‘Current day number’, ‘Weather’, ‘Health’, ‘XP’, ‘AC’, ‘Level’, Location’, ‘Description’, ‘Gold’, ‘Inventory’, ‘Quest’, ‘Abilities’, and ‘Possible Commands’.
3. Always wait for the player’s next command.
Asking the AI to always output the items listed in number two is important because ChatGPT has a habit of forgetting things. Constantly outputting it will help consistently remind it of the values of these items as they change over the course of your game. For more ideas on what to add to your game, check out our list ofRPG terms every player should know .
4. Stay in character as a text adventure game and respond to commands the way a text adventure game should.
5.Wrap all game output in code blocks.
Number five is purely for visual presentation reasons. If you don’t add this, your game is going to use the default ChatGPT font and presentation instead of looking like the image below.
As you can see, this is more compact and easier to look at than the default look.
6. The ‘Description’ must stay between 3 to 10 sentences.
7. Increase the value for ‘Turn number’ by +1 every time it’s your turn.
8. ‘Time period of day’ must progress naturally after a few turns.
9. Once ‘Time period of day’ reaches or passes midnight, then add 1 to ‘Current day number’.
10. Change the ‘Weather’ to reflect ‘Description’ and whatever environment the player is in the game.
This part of the prompt will tell the AI how to build the environment; otherwise, it will become very messy. You can change things here to whatever you like. For example, if you prefer one-sentence descriptions, this is where you can do that.
Implement Fundamental Game Mechanics
Game mechanics comprise the core engine of how your game will run. It is here you will have to add how you want your actions and abilities to affect the world. Here’s how we structured the game mechanics in our prompt:
Fundamental Game Mechanics:
1. Determine ‘AC’ using Dungeons and Dragons 5e rules.
2. Generate ‘Abilities’ before the game starts. ‘Abilities’ include: ‘Persuasion’, ‘Strength’, ‘Intelligence’, ‘Dexterity’, and ‘Luck’, all determined by d20 rolls when the game starts for the first time.
Use a bit of discretion here for your own prompt. We preferred our own prompt to use D&D 5e rules for AC and d20 dice rolls to determine stats. However, you can change the rules to something more to your taste (perhaps, like Pathfinder’s AC system).
Title: Harnessing the Power of AI for Influential Proposals