Tips for Multi-Conversation NPCs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Tips for Multi-Conversation NPCs

Post by Tony Li »

Here are some tips on setting up conversations for NPCs that have a lot of dialogue. A good example is a "quest hub" NPC that offers several quests.

Cross-Conversation Links

One approach is to write a separate conversation for each quest. Then create a starting "hub" conversation that contains cross-conversation links to the quest-specific conversations. Configure your NPC's Conversation Trigger to play this starting conversation. Configure the Conditions fields on the quest conversations to specify which cross-conversation link to follow.

Here's an example of the hub conversation:

Image

And the cross-conversation links:

Image

In the first image, I also used forward slashes ( / ) in the conversation titles to group the conversations into a submenu for the NPC. This just makes it easier to select conversations in the editor.


Group Nodes

Alternatively (or even in combination), use Group nodes. To make a dialogue entry node into a Group node, tick its Group checkbox. Group nodes will check their Conditions fields. If true, they will run their Script fields and then immediately pass through to their children without showing any subtitle text. Group nodes allow you to reduce the number of links between nodes, which may make it more manageable to keep all your content in a single conversation.

Here is an example that uses Group nodes:

Image


Multiple Conversation Triggers

Both of the examples above keep all of the branching inside the dialogue database. Another approach is to write independent conversations in the dialogue database, and branch in Unity by using multiple Conversation Triggers. Set each Conversation Trigger's Condition so only one will be true at any given time.
Post Reply