This feature is in an experimental state so you can try it out, provide feedback, and see what we are planning. You cannot publish a project that uses persona or its related features at this time.
To use this feature, you need to enable the persona_component in the Experimental Scene Graph features. Then, under Experimental Access, check LLM-Powered Conversation.
The quickest way to start using conversations is to create a new NPC Character Definition and add the Persona Modifier to the list of NPC Character Modifiers. Within the Persona Modifier, you can define your persona's character facts, personality, the voice they use to speak, and how they handle interruptions during speech.
Create an NPC Character Definition
To create an NPC Character Definition, follow these steps:
Navigate to your project's content folder and right-click within the Content Drawer.
In the pop-up menu, navigate to Artificial Intelligence > NPC Character Definition.
Name your Character Definition "PersonaNPCDefinition" then double-click the thumbnail to edit your NPC's properties.
Ensure you save changes to your NPC Character Definition before closing the tab.
Add a Persona Modifier to an NPC Character Definition
To add a Persona Modifier to your PersonaNPCDefinition, follow these steps:
Navigate to NPC Character Modifiers > Modifiers and click the AddElement (+) icon to add a modifier.
Find the newly added Modifier index (usually Index[2] if no other modifiers have been added) and select Persona Modifier from the dropdown menu.
Save the changes to your NPC Character Definition.
Your PersonaNPCDefinition is now equipped with a persona. You can select the dropdown arrow next to Persona > Character Facts to see the definition of your persona's Personality Prompt and Knowledge Prompt. These are editable either directly in the Modifier, or through the Prompt Editor Tool. The Prompt Editor Tool simulates conversations with your NPC's persona to help refine its personality and facts to iterate on your desired NPC behavior quickly.
Additionally, you can set the Voice Model to determine the persona's voice and Interruption Rule to determine how the persona will handle overlapping prompts.
Naming your Persona
To add a name to your persona, you need to add a UI modifier and set the Display Name.
Interact with your NPC Persona
To begin interacting with your NPC persona, click Edit in Prompt Editor.
This brings up the Prompt Editor Tool, enabling you to immediately begin interacting with your NPC persona.
Here you can type a prompt in the textbox in the middle of the Prompt Editor Tool and see your NPC persona's responses:
This is the first place you can interact directly with the persona you are constructing and simulate how it responds in the game world once attached to NPC Spawner.
Add Personality and Knowledge to your NPC Persona
To get you started iterating, here are example Personality and Knowledge Prompts for a sample Fortune Teller persona:
Personality:
You predict a player's fortune when asked for a prediction.
You are a helpful, kind fortune teller.
Knowledge:
You grew up in the desert.
If the player mentions anything about the desert, recite a haiku about the beauty of the desert.
Add this personality and fact information to your NPC Persona and see how the response changes.
Iterate on the personality and facts of your persona until you are satisfied with the responses. You also have the option to create one that is entirely your own.
Once you are satisfied with your newly created persona, ensure that you save your changes.