OpenAIs ChatGPT is arguably the most advanced AI currently freely available to the public.

But perhaps, one of its most underestimated abilities is its storytelling.

Well work you through how to create a prompt to achieve the kind of RPG you want.

Giant dice floating over a palm

In the end, well put the finished prompt so you’re able to copy it.

After you get the hang of the AI, you’re able to begin to create your prompt.

Play the game in turns, starting with you.

ChatGPT displaying text adventure game output in code blocks

Always wait for the player’s next command.

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.

ChatGPT text-based RPG output showing ability scores and possible commands

Number five is purely for visual presentation reasons.

The Description must stay between 3 to 10 sentences.

Increase the value for Turn number by +1 every time its your turn.

Villager asking on the player’s welfare in text game dialogue

Time period of day must progress naturally after a few turns.

Once Time period of day reaches or passes midnight, then add 1 to Current day number.

Change the Weather to reflect Description and whatever environment the player is in the game.

GPT-4 generating texts for a turn-based text RPG

you’re free to change things here to whatever you like.

For example, if you prefer one-sentence descriptions, this is where you might 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.

Heres how we structured the game mechanics in our prompt:

Fundamental Game Mechanics:

1.

Determine AC using Dungeons and Dragons 5e rules.

Generate Abilities before the game starts.

Use a bit of discretion here for your own prompt.

Start the game with 20/20 for Health, with 20 being the maximum health.

Eating food, drinking water, or sleeping will restore health.

Always show what the player is wearing and wielding (as Wearing and Wielding).

Display Game Over if Health falls to 0 or lower.

The 7th command should be Other, which allows me to key in in a custom command.

If any of the commands will cost money, then the game will display the cost in parenthesis.

Determine the bonus by dividing the trait by 3.

If an action is unsuccessful, respond with a relevant consequence.

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

The player can obtain a Quest by interacting with the world and other people.

The Quest will also show what needs to be done to complete it.

Adding a Quest line will also help ChatGPT remember what exactly youre doing at the moment.

We highly recommend you have a Quest item or something similar.

The only currency in this game is Gold.

The value of Gold must never be a negative integer.

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

These gold rules help establish the spending mechanic and limit exploitation.

Rules for Setting:

1.

Use the world of Elder Scrolls as inspiration for the game world.

Import whatever beasts, monsters, and items that Elder Scrolls has.

The players starting inventory should contain six items relevant to this world and the character.

The game world will be populated by interactive NPCs.

Whenever these NPCs speak, put the dialogue in quotation marks.

Completing a quest adds to the player’s XP.

you could embellish this section with as many rules and preferences as you like.

But remember to keep it simple because multilayered rules may confuse the AI.

Heres what our rules look like:

Combat and Magic Rules:

1.

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

Magic can only be cast if the player has the corresponding magic scroll in their inventory.

Using magic will drain the player characters health.

More powerful magic will drain more health.

Combat should be handled in rounds, roll attacks for the NPCs each round.

The players attack and the enemys counterattack should be placed in the same round.

Always show how much damage is dealt when the player receives damage.

  1. Who goes first in combat is determined by initiative.

Use D&D 5e initiative rules.

Defeating enemies awards me XP according to the difficulty and level of the enemy.

Several prompts later, ChatGPT might forget all the rules youve elaborately laid out for it.

Thats why we added this part:

Refer back to these rules after every prompt.

And finally, dont forget to actually start the game:

Start Game.

As you play, you might have to remind the AI of the rules youve laid out.

The AI will respond to the same prompt differently, so every user might have a different experience.

You should try running a few RPG sessions with GPT-4 instead of GPT3.5.

It’s way more creative, better at crafting stories, remembering rules, and all-around better at improv.

It costs $20/month, and it’s a good tool for doing other things apart from text-based gaming.

Should you pay the $20 solely for text-based gaming?

Unless you’re a big fan of RPGs, it might not be worth the money.

Some users have also complained thatGPT-4 is slower than GPT3.5.

Always wait for the players next command.

Wrap all game output in code blocks.

The player can obtain a Quest by interacting with the world and other people.

The Quest will also show what needs to be done to complete it.

Completing a quest adds to my XP.

Your experience using our prompts may differ significantly from ours.

Is This the Beginning of Open-Ended Gaming?

Have fun, but remember that right now, AI is still very limited.