Getting Started

The best way to get started with the Dialogue System is to look at the demo scenes. The following document helps to explain more in detail how to create dialogues and quests.

There are 3 things you will need to start creating dialogues:

  • The DQ Manager

  • The Actor component on your characters.

  • A Narrative Event with Dialogue Messages.

DQ Manager

Must be included once in your scene when you want to use the dialogue and quests system. It can be found in the prefabs folder. This manager runs the events and dialogues, loads the UI (DQUICanvas), and handles all user controls. Inside the DQ Manager prefab, you can change some of the default settings like the path where the data is loaded, and the default controls.

Add the DQ Manager to your scene if it is not already there.

Actor Component

You will need to add the Actor component on the characters who can talk in dialogues. This includes your player character as well as at least 1 NPC. You can add the component directly on the prefab.

Then, on the new component you will need to link the ActorData related to this character. You can dupplicate one of the data in Resources/Actors with Ctrl-D, rename it, change the ID, and then link it to your character prefab.

On the Actor Data in Resources folder, make sure that your player data is set to is_player, while the NPC actor have this toggle off.

Create your first Dialogue

In your scene, in the Hierarchy, you can right click and Create Empty to create a new GameObject.

Then, while that object is selected, in the inspector, you can add a component NarrativeEvent

Create a few child object under that event for the dialogues messages and add the DialogueMsg component to them.

On the Event, set the trigger_type to NearActor, and the trigger_actor to your NPC, and on the dialogue, set the actor to either the NPC or your player. Add some text for the dialogue.

Note that the Event trigger_limit is set to 1, which means the dialogue can only happen once, if you want it to repeat indefinitely, you can set that value to 0.

You can now test your first dialogue! Just move your character near the NPC in your scene, and it should automatically start.

Last updated