Games

ChatGPT as a Detailed, Interactive Text-Based RPG

ChatGPT from OpenAI is the most advanced AI currently available to the public for free. It can accomplish various fantastic things, from programming to accounting, thanks to the enormous data subsets on which it was trained. However, one of its most underappreciated qualities is its storytelling.

This tutorial will show you how to leverage ChatGPT’s storytelling abilities to play a text adventure RPG game in the conversation. First, we’ll walk you through creating a prompt to create the type of RPG you want. Then, we’ll put it online at the conclusion to allow you to copy the completed prompt.

Tell ChatGPT Its Function and the Presentation Rules

While this guide is intended for more experienced ChatGPT users, new users may find it beneficial as they learn how to use ChatGPT. You can begin to create your prompt once you’ve mastered the AI.

Begin your prompt by informing ChatGPT of your intention to play a text adventure game:

Please complete the function of a text adventure game according to the rules given below:

Then, make general rules for how you want the AI to present the game. In this situation, we divided our prompt into rules categories.

Presentation Guidelines:

1. Take turns playing the game, starting with yourself.

2. The game result will still show ‘Turn number,’ ‘Time period of the day,’ ‘Current day number,’ ‘Weather,’ ‘XP,’ ‘AC,’ ‘Level, Location,’ ‘Description,’ ‘Health,’ ‘Gold,’ ‘Inventory,’ ‘Quest,’ ‘Abilities,’ and ‘Possible Commands’.

3. Always wait for the following command from the player.

Because ChatGPT has a history of forgetting things, instructing the AI always to output the items specified in number two is critical. Constantly outputting it will assist it in remembering the importance of these items as they change throughout your game. Check out our list of RPG terminology every player should know for more ideas on what to add to your game.

4. Maintain your text adventure game character and respond to commands as a text adventure game should.

5. Enclose all game output using code blocks.

Number five is strictly for the sake of visual presentation. If you do not add this, your game will use the default ChatGPT typeface and presentation rather than look like the image below.

ChatGPT

As you can see, this is closer and easier to view than the default appearance.

6. The ‘Description’ must stay within three to ten sentences.

7. Every time it’s your turn, increase the value for the ‘Turn number’ by one.

After a few spins, the ‘period of the day’ must proceed organically.

9. When the ‘Period of the day’ reaches or exceeds midnight, add 1 to the ‘Current day number’.

10. Modify the ‘Weather’ to suit the ‘Description’ and the player’s environment in the game.

This part of the prompt will instruct the AI on how to construct the environment; otherwise, it would become highly cluttered. Of course, you can change this to whatever you like. For example, if you like one-sentence descriptions, this is the place to do so.

Implement Fundamental Game Mechanics

Game mechanics are the heart of how your game will function. Therefore, you must add here how you want your actions and talents to impact the world. In our prompt, we structured the game mechanics as follows:

The Basic Game Mechanics:

1. Determine ‘AC’ using the rules of Dungeons and Dragons 5e.

2. Create ‘Abilities’ before starting the game. ‘Abilities’ include ‘Persuasion,’ ‘Intelligence,’ ‘Strength,’ ‘Dexterity,’ and ‘Luck,’ all of which are determined by a d20 roll when the game starts for the first time.

For your own prompt, use your own judgment. For example, we preferred using our own prompt to determine stats using D&D 5e rules for AC and d20 dice rolls. You can, however, change the rules to something closer to your liking (like Pathfinder’s AC system).

ChatGPT

3. Begin the game with a ‘Health’ score of 20/20, with 20 being the maximum. Eating, drinking, and sleeping will all help to restore health.

4. Show what the player is wearing and wielding at all times (as ‘Wearing’ and ‘Wielding’).

5. Display ‘Game Over’ if ‘Health’ reaches 0 or less.

6. The player must choose all commands. The game will list 7 of them under ‘Commands,’ assign them a number 1-7 that I may type to choose that choice and vary the possible selection based on the actual scenario and characters being interacted with.

7. The seventh command should be ‘Other,’ which allows me to type in my command.

8. The game will display the price in parenthesis if any of the commands cost money.

9. To determine whether a command is victorious, the game must roll a d20 with a bonus from a suitable ‘Trait’. Then, calculate the bonus by dividing the trait by three.

10. If an action is filed, respond with an appropriate consequence.

11. Always display the d20 roll result before the rest of the output.

12. By interacting with the world and other people, the player can obtain a “Quest.”

The ‘Quest’ will also show you what you must do to complete it. Including a ‘Quest’ line will also assist ChatGPT in remembering what you’re doing right now. We strongly advise you to have a ‘Quest’ item or anything similar.

13. The only currency in this game is Gold.

14. The value of ‘Gold’ must never be a negative integer.

15. The player can not spend more than the total value of ‘Gold’.

These “golden” rules aid in the establishment of the spending mechanism and limit exploitation.

Craft the Story, Setting, and NPCs

The way you craft your prompt on ChatGPT will determine the quality of your experience—and the next thing you should think about for your game’s prompt is the location and story you want. For example, in this one, we used a world inspired by the Elder Scrolls as the foundation of our world.

Using an already-established world makes it easier for ChatGPT to fill out a setting without putting many extra layers into your prompt.

Setting Guidelines:

1. Use the Elder Scrolls world as inspiration for the game world. Import all of the Elder Scrolls’ creatures, monsters, and items.

2. The player’s starting inventory should include six items related to the world and character.

3. Display the information in at least two paragraphs if the player chooses to read a book or scroll.

4. The game world will be populated by NPCs that can be interacted with. Put the dialogue in quotation marks whenever these NPCs talk.

5. Completing a quest adds to the player’s XP.

You can add as many rules and preferences as you want to this section. For example, in this section, you can add an overall plot, set governing rules, or even detail NPC clothing and attitudes. However, remember to keep things basic because multilayered rules confuse AI.

Add Combat and Magic Rules

Magic and combat play a significant part in the experience, much like in any adventure RPG. If you don’t add rules to guide this part of your game, you’ll wind up with a game that’s easy to skip. Of course, it doesn’t help that ChatGPT favors the user in its storylines and will often make things go your way. So here are our ground rules:

Combat and Magic Regulations:

1. Import magic spells from D&D 5e and the Elder Scrolls into this game.

2. Magic can be cast only if the player possesses the proper magic scroll in their inventory.

3. Using magic drains the player character’s health. More potent magic drains more health.

4. Combat should be handled in rounds, with the NPCs rolling attacks each round.

5. The player’s attack and the opponent’s response must occur in the same round.

6. When the player is damaged, always show how much damage is dealt.

7. Roll a d20 + a bonus from the applicable combat stat against the target’s AC to determine if a combat action is successful.

8. In combat, who goes first is determined by initiative. Use the initiative rules from D&D 5e.

9. Defeating foes grants me XP based on the difficulty and level of the opponent.

Combat rules can be particularly difficult for the AI, so you may need to play around with them until you find something that works.

Conclude Your Prompt

 

Your prompt ending should include critical commands to keep the game’s structure intact.

ChatGPT may need to remember all the rules you’ve meticulously spelled out after a few prompts. Because of this, we decided to add this part:

After each prompt, refer back to these rules.

Last but not least, don’t forget to start the game:

Begin the game.

As you play, remind the AI of your established rules. Because the AI will respond differently to the same prompt, each user may have a unique experience.

The Complete ChatGPT RPG Prompt

We’ve compiled everything and put it here for you to copy so you may start your own game right away.

Please perform the function of a text adventure game according to the rules given below:

Presentation Guidelines:

1. Take turns playing the game, starting with yourself.

2. The game output will always show ‘Turn number,’ ‘The day,’ ‘Current day number,’ ‘Weather,’ ‘Health,’ ‘XP,’ ‘AC,’ ‘Level, Location,’ ‘Description,’ ‘Gold,’ ‘Inventory,’ ‘Quest,’ ‘Abilities,’ and ‘Possible Commands.’

3. Always wait for the following command from the player.

4. Maintain your text adventure game character and respond to commands as a text adventure game should.

5. Enclose all game output using code blocks.

6. The ‘Description’ must stay within three to ten sentences.

7. Every time it’s your turn, increase the value for the ‘Turn number’ by one.

After a few spins, the ‘period of the day’ must proceed organically.

9. When the ‘Period of the day’ reaches or exceeds midnight, add 1 to the ‘Current day number.’

10. Modify the ‘Weather’ to suit the ‘Description’ and the player’s environment in the game.

The Basic Game Mechanics:

1. Determine ‘AC’ using the rules of Dungeons and Dragons 5e.

2. Create ‘Abilities’ before starting the game. ‘Abilities’ include ‘Persuasion,’ ‘Strength,’ ‘Intelligence,’ ‘Dexterity,’ and ‘Luck,’ all determined by a d20 roll when the game starts for the first time.

3. Begin the game with a ‘Health’ score of 20/20, with 20 being the maximum. Eating, drinking, and sleeping will all help to restore health.

4. Show what the player is wearing and wielding at all times (as ‘Wearing’ and ‘Wielding’).

5. Display ‘Game Over’ if ‘Health’ reaches 0 or less.

6. The player must choose all commands. The game will list 7 of them under ‘Commands,’ assign them a number 1-7 that I may type to choose that choice, and vary the possible selection based on the actual scenario and characters being interacted with.

7. The seventh command should be ‘Other,’ which allows me to type in my command.

8. The game will display the price in parenthesis if any of the commands cost money.

9. To determine whether a command is successful, the game must roll a d20 with a bonus from a relevant ‘Trait.’ Then, calculate the bonus by dividing the trait by three.

10. If an action is failed, respond with an appropriate consequence.

11. Always display the d20 roll result before the rest of the output.

12. By interacting with the world and other people, the player can obtain a “Quest.” The ‘Quest’ will also show you what you must do to complete it.

13. Gold is the only currency in this game.

14 ‘Gold’ must never have a negative integer value.

15. The player is not permitted to spend more than the total worth of ‘Gold.’

Setting Guidelines:

1. Use the Elder Scrolls world as inspiration for the game world. Import all of the Elder Scrolls’ creatures, monsters, and items.

2. The player’s starting inventory should include six items related to the world and character.

3. Display the information in at least two paragraphs if the player chooses to read a book or scroll.

4. The game world will be populated by NPCs that can be interacted with. Put the dialogue in quotation marks whenever these NPCs talk.

5. Quest completion adds to my XP.

Combat and Magic Regulations:

1. Import magic spells from D&D 5e and the Elder Scrolls into this game.

2. Magic can be cast only if the player possesses the proper magic scroll in their inventory.

3. Using magic drains the player character’s health. More potent magic drains more health.

4. Combat should be handled in rounds, with the NPCs rolling attacks each round.

5. The player’s attack and the opponent’s response must occur in the same round.

6. When the player is damaged, always show how much damage is dealt.

7. Roll a d20 + a bonus from the applicable combat stat against the target’s AC to determine if a combat action is successful.

8. In combat, who goes first is determined by initiative. Use the initiative rules from D&D 5e.

9. Defeating foes grants me XP based on the difficulty and level of the opponent.

After each prompt, refer back to these rules.

Begin the game.

Remember that AI is still a developing technology that will change over time. Therefore, your experience with our prompts may be very different from ours.

Is This the Beginning of Open-Ended Gaming?

ChatGPT has demonstrated that creating a game that changes with the player rather than following a pre-defined path or requiring the player to engage in the same NPC discussions is feasible. Entering your settings and letting AI produce your dream game without needing a staff of creators could be the future of gaming.

You may tap into that future by using ChatGPT to create your exciting adventure text game in the chat. So have fun, but remember that AI is still pretty limited.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button