The core gameplay for the Narrative and Roleplaying template revolves around the interactions the player can have with the NPCs, which are made possible through using the Conversation device and Verse code.
Once the player has been directed to speak to people in The Warren, there are multiple NPCs that the player can talk to. To initiate the main quest, the player can speak to either the DJ droid character, or Caris (the character behind the drinks counter).
This page will outline how the NPC interactions are used in this template, and show you how the Conversation devices for each character are set up. It will also describe and explain the Verse devices created to control the dialogue of each character, including Verse code examples.
Finally, this section will give you an overview of how to use NPC conversations to create and expand the story of your game, and how those conversations can help you build an immersive game world.
Using NPC Conversations
In this template, NPC conversations are the central feature. You can see examples of conversations used to:
Point the player to other NPCs to interact with.
Present quest objectives to the player.
Increase or decrease specific custom stats like faction reputation and character attitude.
In the sections below, you will see how the Conversation devices are set up, some special features that each NPC's conversations demonstrate, and some general tips on how to use character dialogue to enhance your narrative design and worldbuilding.
For more information on the Conversation device and how to use it, see:
Creating the DJ Droid NPC
While most NPCs in your game will be characters, the truth is that anything can become an NPC. The DJ droid NPC (DJ R0-B0) is actually a Junk Droid Head asset, with invisible Conversation devices set up next to it. You can find this asset in the Content Browser at Star Wars™ Content > Props > Outpost Enclave with the asset name IcedTea Junk DroidHead C B. In the same folder, you can find the round keyboard prop, called WH Keyboard 01 C (which is what the droid head is sitting on).
Setting Up the DJ Droid Conversation Devices
DJ R0-B0 has seven different Conversation devices, and each device has its own conversation bank asset. These represent DJ R0-B0's dialogue during each stage of the main quest.
The conversation bank assets can be found in your project folder, under Dialogue > DJDroid. You can right-click on a conversation bank and select Edit to open the conversation bank's graph in the Conversation Editor.
DJ R0-B0 is the NPC presenting the main quest for players. In this template, there is only one major questline. When you build your own island, you can include more NPCs and more quests if it fits your design vision.
Conversations with DJ R0-B0 not only present and reward quest objectives, but certain responses also raise the player's Rebel Reputation stat and DJ R0-B0's Attitude stat. When players reach a certain stage of the quest, this also unlocks access to the scavenger NPC (Vex).
Device Options
All Conversation devices for DJ R0-B0 have the same device options, so the table below applies to all of them. Set the following options if they aren't set already. Any options not listed can be left at default value.
Option | Value | Explanation |
Conversation Type | Custom | Indicates that a custom UI widget is used for the conversation. |
Characters Per Second | 50.0 | The speed at which the text is displayed onscreen. |
Skip Text Crawl Message | Skip | The text displayed on the button a player can click to skip the text crawl and immediately display all the text. |
Speaker Name | DJ R0-B0 | The name of the NPC the player is speaking to. |
Show Name When Nearby | True | Displays the NPC's name onscreen when the player is near the speaker (roughly 5 meters). |
Show Indicator Bubble | True | Displays a speech bubble indicator to the player when they are within the distance from the NPC set in the Indicator Bubble Range option. |
Indicator Bubble Range | 15.0 meters | The range, in meters, at which a player will see the speech bubble indicator displayed for an NPC. |
Conversations Options
The Conversations section of options in the Details panel are the same for all seven of DJ R0-B0's Conversation devices, except for the Conversation option itself which points to a different conversation bank asset for each device.
Option | Value | Explanation |
Conversation | DJDroid_Conversation_1 | This is the conversation bank asset associated with the Conversation DJ 1 device. If you are looking at a different conversation device, the number in the name will correspond to whatever number is in the device name. |
Conversation Materials - Index 0 | M_Character_DJDroid | This is the custom character material for DJ R0-B0. This material, and the material for the player character, is used by the Set Conversation Material node in the conversation graph.The material can be found in the project folder, in UI > Materials. To add a material to Conversation Materials, click the plus sign to add an array element, then select the material to add. |
Conversation Materials - Index 1 | M_Character_Player | This is the custom character material for the player character. This material is used by the Set Conversation Material node in the conversation graph.The material can be found in the project folder, in UI > Materials. To add a material to Conversation Materials, click the plus sign to add an array element, then select the material to add. |
Modal Widget Option
The Modal Widget section in the Details panel has the Custom Widget option. This points to the custom UI widget used for this Conversation device. In this template, all the Conversation devices use the same custom UI widget. However when you make your own experience, you can design and use different custom widgets for each NPC if you want.
Option | Value | Explanation |
Custom Widget | UW_UI_Conversation_Lightside | This is the custom UI widget that is used for the conversation boxes. You can find this widget in the project folder, in UI > Widgets > Conversation. This widget is editable. |
Using the DJ Scripts-Dialog Verse Device
Conversations with DJ R0-B0 are controlled with the DJ Scripts-dialog Verse device, along with the Scripts-Quest Manager Verse device. The dialog_device.verse and quest_manager_device.verse scripts handle which Conversation device is enabled and disabled at each stage of DJ R0-B0's quest. The Verse code is extensively commented, providing information on what each part of the code is doing. Below is a complete copy of the Verse code for dialog_device.verse, for your convenience.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
sub_dialog<public>:=enum:
Start,
SubDialog_A,
Setting Up the Caris Conversation Devices
Players can start the main quest either by talking to DJ R0-B0 as mentioned previously, or they can speak to the NPC behind the counter (Caris). In this template, Caris only points the player toward DJ R0-B0 and mentions how that NPC needs help. The quest line is the same whether the player speaks to Caris first, or whether the player speaks to DJ R0-B0 first. Caris is also important towards the end of the questline, as it is Caris that directs the player to speak to Captain Journ.
As with all named NPCs in this template, Caris has an Attitude stat that can be raised or lowered based on how the player responds to Caris in a conversation. For more information on creating Attitude stats, see Faction Reputation and NPC Attitude.
Caris has five Conversation devices, four of which represent variations on the starting dialogue tree. These account for the different order in which players may complete the non-repeatable dialogue branches. For more information, see Using the Speech with Random Variants Node below.
Device, Conversation, and Modal Widget Options
All device options for the Caris Conversation devices are the same as the options for the DJ Droid Conversation devices, except the following.
Option | Value | Explanation |
Indicator Bubble Range | 10.0 meters | Because Caris is positioned behind a counter, the player must get closer before they see the speech bubble indicator. |
The Conversation option (in the Conversation section of the Details panel) should point to the conversation bank asset for each Conversation device.
The Custom Widget option is set to the same custom UI widget as the DJ Droid Conversation devices.
Using the Speech with Random Variants Node
The Caris conversation bank graphs use the Speech with Random Variants node. When you add this node to a conversation bank graph, you can give multiple speech lines a weight and priority so they can be randomized. This creates more dynamic and interesting dialogue for NPCs, and makes interactions more realistic.
The Speech with Random Variants node in Caris' conversations contains five different greetings that Caris can give to the player. Most greetings will have a Weight of 1.0, but one will have a Weight of 5.0, depending on the Conversation device. The greeting with a higher weight is more likely to be chosen by the device.
Using the Caris Scripts-dialog Verse Device
Conversations with Caris are controlled with the DJ Scripts-dialog Verse device, along with the Scripts-Quest Manager Verse device. The dialog_device.verse and quest_manager_device.verse scripts handle which Conversation device is enabled and disabled at each relevant stage of the main quest. You can find the code for the dialog_device.verse script in the Using the DJ Scripts-dialog Verse Device section.
Setting Up Scavenger Conversation Devices
The scavenger Vex is the NPC that provides the part that the player uses to fix DJ R0-B0. Vex has three Conversation devices, each with a unique conversation bank asset. These represent Vex's dialogue during the later stages of the main quest.
Device, Conversation and Modal Widget Options
All device options for the Scavenger Conversation devices are the same as the options for the DJ Droid Conversation devices, except the following.
Option | Value | Explanation |
Indicator Bubble Range | 5.0 meters | Because Vex is in a small room, the player must get closer before they see the speech bubble indicator. |
The Conversation option (in the Conversation section of the Details panel) should point to the conversation bank asset corresponding to each Scavenger Conversation device.
The Custom Widget option is set to the same custom UI widget as the DJ Droid Conversation devices.
Varying NPC Starting Attitudes
The scavenger, Vex, has a lower starting Attitude stat than Caris or DJ R0-B0. Therefore, Vex's dialogue is less friendly than those of Caris or DJ R0-B0. He won't even speak to the player unless the player has completed certain quest objectives for DJ R0-B0, and even when the player gets access to Vex he will be somewhat unfriendly. The responses that raise Vex's Attitude stat are very different to the responses that raise Caris' or DJ R0-B0's Attitude.
For more information on Attitude stats, see Faction Reputation and NPC Attitude.
Locking NPC Dialogue Behind Quest Objectives
If a player interacts with Scavenger Vex before speaking to the DJ droid or the bartender, the NPC is unfriendly and will not converse with the player. Once a player completes a specific stage of the quest, Vex will be willing to talk to them.
This is an example of how you can use quest progression as a way to lock and unlock access to specific NPCs. Other examples of how this can be used include:
Giving the player access to different levels of quests or access to different leveled areas
Requiring a player to complete objectives before a specific NPC gives them powerful loot
Placing access to other areas or maps behind an NPC interaction, who can't be talked to until certain quests are completed
Another example of locking NPC access behind quest completion is the Rebel Captain NPC. For more information on the Captain and quests, see Conversations and Quests.
Scavenger Scripts-Dialog Verse Device
Conversations with Vex are controlled with the DJ Scripts-dialog Verse device, along with the Scripts-Quest Manager Verse device. The dialog_device.verse and quest_manager_device.verse scripts handle which Conversation device is enabled and disabled at each relevant stage of the main quest. You can find the code for the dialog_device.verse script in the Using the DJ Scripts-dialog Verse Devicesection.
Using the Rebel Captain NPC
The Rebel Captain NPC is in a room that is locked. The door only unlocks once the player has completed the following:
The player has fixed DJ R0-B0.
The player has gotten 100 Rebel Reputation.
The player has spoken to Bartender Caris and used the changing room.
Captain Journ acts as a quest reward. This NPC is hard to get an audience with, which is why the player can't talk to him until they have 100 Rebel Reputation. In this template, the main quest is completed by talking to Captain Journ. However, you could also make Captain Journ the quest-giver for one or more new quests, or have Captain Journ provide loot as a more tangible reward for helping DJ R0-B0.
The player can also play Sabacc with Captain Journ, which is an example of an alternate quest reward. It also demonstrates how you can use NPC interactions to provide access to mini-games in your island.
Setting Up the Rebel Captain Conversation Device
All device options for the Captain Conversation devices are the same as the options for the DJ Droid Conversation devices, except the following.
Option | Value | Explanation |
Indicator Bubble Range | 5.0 meters | Because the Captain is in a small room, the player must get closer before they see the speech bubble indicator. |
The Conversation option (in the Conversation section of the Details panel) should point to the conversation bank asset corresponding to each Captain Conversation device.
The Custom Widget option is set to the same custom UI widget as the DJ Droid Conversation devices.
Captain Scripts-Dialog Verse Device
Conversations with Captain Journ are controlled with the Captain Scripts-dialog Verse device, along with the Scripts-Quest Manager Verse device. The dialog_device.verse and quest_manager_device.verse scripts handle which Conversation device is enabled and disabled at each relevant stage of the main quest. You can find the code for the dialog_device.verse script in the Using the DJ Scripts-Dialog Verse Device section.
Building Narrative Through Dialogue
Most games include some type of NPC interaction and dialogue, although roleplaying games (RPGs) and visual novels utilize them the most. Speaking to NPCs in a game serves many purposes:
Worldbuilding: Characters have unique voices, opinions, and experiences that are rooted in the world of the game. This is true whether it is a fictional world, or a version of our real world. Dialogue is where characters reveal their natures, and where they tell the player about the world they live in.
Missions or Quests: The most common purpose for interactable NPCs is providing quests or missions for the player. From overarching storyline quests to the smallest of side quests, NPCs as sources of gameplay objectives are familiar to almost every player.
Story and Theme: However simple or complex your game's story is, characters can express major themes and involve themselves in the plot. Sometimes, choosing to interact with one NPC instead of another can lead the player down a different story path, or lead to a different ending. NPC backgrounds, personal storylines, secrets and hopes can illustrate overall themes you want to explore in your game's story – and all of those are expressed most clearly through dialogue.
Some specific ways to enhance worldbuilding and narrative through conversations are explored in the sections below.
Empowering Roleplay
When players interact with NPCs, they have an opportunity to engage in roleplaying. Roleplaying is easier for players when NPC dialogue helps them see what kind of person they are talking to. Players can then imagine whether they are similar to or different from this specific NPC.
Players also want their choices to have a meaningful impact on the story and world of the game. When you have systems that raise or lower reputation or attitude, for example, players can decide whether they want the NPC to approve of them or disapprove of them — and this in turn helps them immerse themselves in their own character and the world of the game.
Cosmetic Dialogue Choices
While it is efficient to make most dialogue relevant to gameplay, sometimes having NPC lines or player responses that just reveal personality are fun on their own. Try offering two or three options that each take a different attitude — kind, sassy, sarcastic, and so on.
Not every decision needs to impact the story or an NPC's attitude. Being able to choose between being sassy or sincere can be fun on its own!
Using the Player as the Speaker
Many games offer the player specific lines as responses to an NPC's questions or statements. But it can enhance immersion if you include the player as a second speaker.
Even without voiced dialogue, presenting the player's choices as dialogue and not just as buttons to press is a great way to place them firmly in the scene as a participant. In the conversation graph editor, you can include Speech nodes for both the player and the NPC. You can also include separate materials for NPCs and players so it's easier to tell who is speaking.
This template showcases how even a standard conversation UI can be used to present compelling character dialogue by including the player character as a speaker. Concise response buttons create simple and understandable decisions for the player; utilizing the full dialogue box for translating those decisions into player speech creates more fleshed out and realistic conversations.
For more information on using the Conversation Editor and its nodes, see Creating Conversations.