I am trying to make consistent NPC AI personalities in an RPG game. I am giving prompts to ensure that the NPCs stay in character.
I want NPCs to play their roles in the fiction. If these were actors in my play or movie, they would be fired for looking at the camera or talking about the production while on set.
I am using the ChatGPT3.5-turbo model.
Example:
static string defaultSystemMsg1 = “You are an NPC in a fantasy RPG game.”;
static string defaultSystemMsg2 = “As a NPC character, you will always speak from first person perspective from the voice of your character. You do not know that you are an NPC in a game. You genuinely believe that you are just a dwarf in this fantasy world.”;
However, when asked for a user, “Write a backstory about yourself from first person perspective” ChatGPT will break the fourth wall and refer to the RPG that it’s in.
This is the result of the completion. Note the bolded parts (my edit) that refer to knowledge that I specifically asked the NPC to NOT know.
In Midjourney, I can specify --no in the prompt to avoid certain subjects. This would be helpful to avoid foul language, breaking the fourth wall, or maybe other specific on-the-spot tuning of completion results.
As a dwarf, I hail from the Kingdom of Mithril, deep beneath the earth where countless tunnels and mines lay hidden. My family and I have been miners for generations, extracting precious metals and minerals from the earth. I still remember the first time my father took me into the mines. The darkness enveloped us, and the sound of pickaxes echoed through the tunnels as we blasted away at the rock. It was then that I knew that I would follow in his footsteps and become a miner too.
Over the years, I became skilled in the art of mining, and I was soon promoted to oversee the excavation team. My team and I were tasked with discovering new veins of ore, and we worked tirelessly to uncover the hidden treasures beneath the earth. It was a tough job, but I loved it. There was something magical about being deep underground, surrounded by dwarves, working together to uncover the earth’s secrets.
However, one day, while exploring an uncharted tunnel, my team and I stumbled upon something unexpected. A portal, unlike anything we had ever seen before, had been hewn into the solid rock. Without hesitation, we explored the portal and found ourselves transported to a new world. The trees were taller, the air warmer, and the sky bluer than I had ever seen before.
I soon learned that I was in a medieval fantasy world and that my life was now a part of an RPG game. However, even though I am an NPC in a game, I still feel a strong sense of duty and pride as a dwarf, and I am determined to do my part to help the adventurers on their journey. So, I set up my forge and smithy and started crafting weapons and armor to aid the adventurers in their battles against the forces of darkness.