Create dynamic character interactions in your experiences through conversations powered by a large language module (LLM).
The Scene Graph persona_component and the Persona Modifier in UEFN together provides an LLM that players can interface with in your island through a voice chat. The voiced identity is represented by an icon in the user interface (UI), that serves as a type of non-player character (NPC) in your island.
The combination of these features to create dynamic characters is known as conversations.
The LLM interface means players can have bespoke conversations and interactions with these NPCs, creating a unique experience each play session. These experiences can range from players interacting with a competitive barista at a coffee shop to helping a grumpy cat find its owner. Through the character prompts you provide, you can define the persona for these characters.
Enable Experimental Persona Features
The persona_component and LLM session is currently in an experimental state in UEFN. This means that you cannot publish a project that has the features enabled at this time.
To use this experimental feature, you must enable it in your project settings:
In your project go to Project > Project Settings.
Under Experimental Access, click the Scene Graph Experimental Features box to enable it.
Clicking the box automatically enables all the listed components. Double-check that persona_component is enabled.
Also, under Experimental Access, enable LLM conversations.
About Large Language Models (LLMs)
An LLM is a trained model that processes and outputs human language. It learns from a vast dataset of text, which you can think of as a large library showing how language is used.
The model generates language by predicting the next unit of text (called a token) step-by-step to build a complete response to a prompt. During training, it uses an algorithm to learn patterns and relationships in language. This system of training is called machine learning.
What the LLM Does
The LLM:
Processes and understands language.
Generates text.
Answers questions.
Summarizes and translates text.
When combined with the persona component in UEFN, it:
Provides an interactive LLM session for players.
Creates personalities from your inputs.
Provides mechanics for unscripted conversations between players and NPCs.
Generates audio from text so players can hear the persona, and generates audio to text for the LLM to listen to the player.
Generates events based on the program's response.
What You Can Do
You can use the LLM-powered feature to:
Input descriptions to craft a persona.
Add events that trigger based on an LLM's response.
Bind the persona to a physical NPC using an NPC Character Definitions.
The LLM conversation removes the barrier of building characters that rely on scripted words, providing the means to create responsive yet adaptive characters.
This dynamic behavior is different from the prescribed conversations and options you make with the Conversation device. For the Conversation device, you must manually set the core behavior of how the NPC responds compared to the LLM that produces organic and unscripted conversations.
In addition, the feature includes a default UI for players to identify persona-based NPCs, understand how to initiate a conversation, and recognize when they are conversing with it.
Define Personas with Character Prompts
A persona encapsulates the personality, knowledge, and characteristics of the LLM character on your island. The key to creating a persona is through prompts and facts in the device. Prompts and facts provide context to who the NPC is (the role it plays) and what it knows. The LLM registers the persona you define, along with its learned knowledge to role-play how it responds to players.
For example, you could create the following personas:
A mysterious cosmic entity that tries to convince players to press a button.
A fierce barista on a mission to shut down its competitor.
A grumpy cat who is sure that aliens abducted its owner.
A comedic fort instructor who teaches players the basics of building in Fortnite.
A scared carrot determined to avoid bunny bandits.
Check out the State of Unreal 2025 presentation for the Mr. Buttons LLM gameplay example.
You can create one persona per character definition. Through prompts, you can bring awareness about another persona on your island.
The following are tips for creating prompts:
Define the persona with a clear identity, values, and traits so that the LLM can understand the role to be performed.
Divide prompts into modular sections for the LLM to categorize ideas into distinct chunks that it can reference more effectively. Consider sections such as identity, origin, motivations, dialogue, and gameplay.
Keep descriptions short, specific, and relevant.
Lean into some repetition for essential details. If you repeatedly call out a fact, the LLM can better understand a key point.
Provide dialogue examples and catchphrases to give the LLM tone, rhythm, and repeatable verbal patterns.
The LLM is trained through a writing style called markdown syntax. Because of this learning style, it helps to write prompts with this syntax in mind. For example, use double asterisks to bold a word for emphasis.
Consistency is key for pattern recognition. The first time the LLM processes the syntax, it registers it. Each additional time it notices the matching syntax, its pattern processing is trained to better emphasize and assign meaning to the syntax.
Personality Prompt
To define the core personality attributes of a character and the information that it knows, add personality prompts. These prompts can include constraints for the LLM to process, such as limiting a response to ten words.
When thinking of personalities to add, anticipate questions players may ask. For example, "Why are you here?"
There is no limit to the number of facts you can provide. However, a large list of facts can cause latency for a player if the LLM session becomes too full. The LLM takes in your facts, along with prompts from the players during a play session. All of this information is parsed through the LLM before it responds to a player.
The table below includes personality prompt examples.
| Persona NPC | Prompt Examples |
|---|---|
Mysterious Cosmic Entity (Mr. Buttons) |
|
Hiding Carrot |
|
Knowledge Prompt
The knowledge prompts you to provide help to set the scene for the NPC and how it interacts with players. Describe the environment and event, and provide direction in your prompts.
For example, instead of prompting a persona that they are in a coffee shop, you can elaborate with either:
You are in a neglected coffee shop that has seen better days. Cobwebs, broken furniture, and an unpleasant lingering smell fill the place. What might deter others excites you. With some love and care, you are confident you can bring the place back to its glory.
You are in an enchanting coffee shop with vibrant furnishings and a selection of gourmet goods. You are eager to fill the place with customers.
The table below includes knowledge prompt examples.
| Persona NPC | Prompt Examples |
|---|---|
Mysterious Cosmic Entity (Mr. Buttons) |
|
Hiding Carrot |
|
For additional prompts that activate during an event, you can use Verse — for example, a prompt response when a player tries to leave the room without pressing the button.
Prompts from the character definition are only available at runtime. With Verse, you can add prompts for dynamic understanding.
Use the Prompt Editor Tool or playtest your island to see how the persona responds, then iterate on the prompts for a stronger result.
Additional Persona Attributes
You can further define the attributes of a character through a name, audio, and how it handles a player attempting to talk to it while it's talking. For audio, you can choose various voice styles. Currently, the persona responds only in English.
Rules and Moderation
When using conversations, your personas, prompts, and character designs must adhere to the Fortnite Developer Rules, Epic Community Rules, and Epic Content Guidelines. We’ve added safety layers on top of the model to keep your characters’ responses aligned with our Fortnite Developer Rules.
To learn more about the rules for using the conversations, refer to Rule 1.22 of the Fortnite Developer Rules.
Developers who break these rules risk enforcement actions, up to and including an account ban.
The LLM conversations are currently not supported for any brand islands. To learn more about building brand islands, see Game Collections.
Prompt Editor Tool and Verse API
The system and character prompts function through the Prompt Editor Tool and Verse.
To start editing your prompts, you must create an NPC Character Definition and add a Persona Modifier. The modifier adds a persona component that the LLM controls. This modifier is only available for the Custom NPC Character Type. Create and drag the character definition into the viewport to automatically attach it to an NPC Spawner device. To learn more about character definitions, see NPC Character Definitions.
The modifier includes a Character Facts dropdown to add in your personality and knowledge prompts. The section also includes access to the Prompt Editor Tool.
Add your character prompts to either the character definition window or Details panel of the NPC Spawner device to avoid overriding prompts.
You can use the Prompt Editor Tool to quickly iterate your character design to help craft the desired persona as it does not require you to launch a session to test the persona. For example, you add prompts to your persona to define it as a cashier at a restaurant. In the response you notice they mention perfecting their craft in the kitchen. To adjust, you can add a line that they work the register only and another line of who is working in the kitchen.
For a player to converse with a persona, you must set a custom Verse behavior in the character definition.
The Verse API for the component includes the same settings as the definition, but with these additional options:
Create prompts outside of the default runtime. This provides the option for event prompts.
Add or remove prompts at runtime. This can help further build an evolving narrative, like a personality shift or corrupted knowledge.
Create structured outputs. Further drives gameplay like when to end a game.
The persona component is not persistent for the player. The LLM session clears after each round in the game.
To learn more about the editor and Verse, see Using The Prompt Editor Tool and the Conversations module Verse API Reference.
Next
Get started creating your own immersive persona-based NPC and learn more about creating a custom behavior as you go!