Skip to content

Getting Started

Dominik Pavlíček edited this page Apr 21, 2023 · 116 revisions

Table of contents

  1. Download the Plugin
    1. Marketplace
    2. GitHub
  2. Instal the Plugin
    1. Marketplace
    2. GitHub
      1. Game Folder
      2. Engine Folder
  3. Enable the Plugin
    1. Marketplace
    2. GitHub
  4. Open the Project
  5. Before you Start
    1. Dialogue Defaults
      1. User Interface
      2. Subtitles
      3. UI Commands
    2. Dialogue Editor Defaults
      1. Nodes Settings
      2. Decorators Settings
      3. Wiring
      4. Auto Arrange
  6. Dialogue Manager Component
    1. Add Component
    2. Setup Component
    3. Component Events
  7. Participant Component
    1. Prepare Actor
    2. Add Component
    3. Setup Component
    4. Component Events
  8. How to make Dialogue
    1. Create Dialogue Tree
    2. Graph Functions
    3. Make dialogue data
    4. Intro to Decorators
  9. Dialogue Flow
    1. Flow Graph
    2. Node Types
  10. Fix Issues

1. Download the Plugin

Marketplace

Marketplace Download sub-section

If you have already the plugin claimed, simply select the plugin and install it to the Engine version you are working with. Marketplace release always supports the last three major releases according to Epic Games policies.
If you don't see your Engine version listed on the Marketplace, you can always download the GitHub release.

GitHub release

GitHub Download sub-section

If you feel experimental or simply need an older project to work with, the GitHub release page got you covered. All releases are listed HERE.
There are always two versions:

  • MounteaDialogueSystem
  • MounteaDialogueSystem_Binaries

The Binaries version skips the code build when opening the project and is recommended for Blueprint-based projects.


2. Instal the Plugin

Marketplace

Instal from Marketplace sub-section

Epic Games Launcher does the job for you, so you can continue to another chapter.

GitHub

Instal from GitHub sub-section

With the GitHub release, there are two ways to install the plugin. Both have their advantages and disadvantages.

Game Folder

If you instal the plugin in Game Folder, this plugin will be available for this specific project only. If you are using the Blueprint project, it might require creating a dummy C++ class for packaging.
Installation to Game Folder requires you to drop the plugin into: .../ProjectFolder/Plugins
If you have no Plugins folder, simply create a new one.

Engine Folder

If you instal the plugin in Engine Folder, this plugin will be available to all projects using this Version! With Engine Folder you shouldn't need to create a dummy C++ class for packaging.
Installation to Engine Folder requires you to drop the plugin into: .../EngineFolder/EngineVersionFolder/Engine/Plugins/
Engine is usually installed in: C:/Users/{user}/UnrealEngine/{engine_version}


3. Enable the Plugin

Marketplace

Marketplace sub-section

If you are opening the project for the first time, you need to enable the plugin in Edit/Plugins/Mountea Framework

It will ask you to restart your Editor.

GitHub

GitHub sub-section

If you are using the GitHub release, the plugin should be installed by default. If not, you need to enable the plugin in Edit/Plugins/Mountea Framework
It will ask you to restart your Editor.


4. Open the Project

Open the Project section

If you are opening the project for the first time, you will be greeted by a Welcome Screen. This popup window shows:

  • If you open the project for the first time
  • If a new version is released

Welcome Screen contains useful links as well as full Changelog, so you can see what version with what features.
Welcome Screen requests those data from GitHub page, so if you have no access to the internet, this popup will not show any Changelog information ❗


5. Before you Start

Before you start creating any super complex dialogue, there are a few steps that must be done. In order to make everything work, you should set up default values and. So let's start with those annoying configurations before so we can focus on dialogues later.
Dialogue System comes with two configurations, one for Runtime (Game) and the other for Editor. We will go over both configurations in more detail in a second.

Default settings can be found here: Window/Project Settings/Mountea Framework

Dialogue Defaults

Dialogue Defaults are the Runtime (Game) default values we are using for in-game functionality. Runtime settings contain two categories, which are:

  • User Interface
  • Subtitles

User Interface

User Interface sub-section

User Interface category contains options to tweak what UI is displayed for the Dialogue. Version 1.0.0.x comes with this options:

  • Default Dialogue Widget Class
  • Input Mode

Default Dialogue Widget Class

Default Dialogue Widget Class is used to determine what User Interface class is used for Dialogue.

❗ This value is not mandatory for functionality, however, if left empty, then each Dialogue Manager must implement Dialogue UI.
❗ Default Dialogie Widget class must implement IMounteaDialogueWBPInterface in order to be displayed in the dropdown.
❗ This value is by default empty and must be populated by hand.

Input Mode

This value provides information on whether player is allowed to use just UI or Game and UI inputs during dialogues.
❗ This value is only informative and does not provide any logic by its own.

Subtitles

Subtitles sub-section

Subtitles settings provide a lot of options to tweak out various options which are then propagated to Widget Classes. Subtitle Settings can be ignored if better or different option is implemented, this serves just the safe defaults purpose.
Subtitles settings are already containing default values and those can be changed anytime. Here is a list of individual settings with their explanation.

Update Frequency

This value defines how often (per second) is UI updated when using update events. This is used for progress bars, lerping colours etc. Lower the value, the higher the performance impact. The higher the value, less smooth the output is. Generally, a good balance is 0.05s to achieve solid visual results combined with a small performance impact.

Skip Fade Duration

This value defines how quickly (in seconds) the voice will be cut off once Skip is requested. Generally, this value should not be changed, as this provides a solid balance between the audio cutting and UI timing, however, you can always try what fits you the best.

Allow Subtitles

Quite a self-explanatory option, which drives if Subtitles can even be shown.
Currently, C++ function is driven by this specific value, which means if this value is changed/saved in runtime, it must be overridden!

Subtitles Settings

Subtitles Settings are useful, a very powerful tool providing a lot of versatility to tweak out subtitles visuals.
Subtitles Settings are split into two parts:

  1. one is Subtitles Settings setting up the default subtitles
  2. another is Subtitles Settings Override settings, which give one more step to tweak out specific subtitles types

Subtitles Settings

What options do Subtitles Settings provide you with? Basically the same you know from Widget Blueprints, the ability to set:

  • Subtitles Color and Opacity
  • Subtitles Font with font size and font material
  • Shadow offset
  • Shadow Color

All those settings are useful for making a nice font, which is readable while being editable using config write in runtime.

Subtitles Settings Override

Subtitles Settings Override do nothing different than Subtitles Settings but provides the ability to specify Row ID.
But what actually is Row ID? Row ID is a unique identifier which consists of:

  • int index
  • Widget Class

This way you can specify for each Dialogue Row what unique ID it has (in the range between 0 - 255).

This is very useful to visually define story lines (let's say yellow colour) and non-story (white colour) without the need to define any new widgets or any complex logic in Blueprints.

Dialogue Widget Commands

Dialogue Widget Commands sub-section

Dialogue Widget Commands are a list of string commands that define what actions are supposed to happen. This is to simplify the code base and provide generic functionality which can be called with specific parameters, avoiding dozens of unique functions.
There are a few hard-coded values which are in use by the plugin's C++ libraries. Those values cannot be deleted from Editor and should not be deleted from the config file! Those values are:

  • CreateDialogueWidget
  • CloseDialogueWidget
  • ShowDialogueRow
  • UpdateDialogueRow
  • HideDialogueRow
  • AddDialogueOptions
  • RemoveDialogueOptions

Those values are used in this Widget Blueprint class: /MounteaDialogueSystem/WBP/WBP_Dialogue

Dialogue Editor Defaults

Same way as Runtime values have their default values saved in the Project Settings, Editor values are saved there as well. Those values are per-project, therefore once set up for one project, all other projects won't reflect those changes (unless using default config files, explained later).

Dialogue Editor Defaults are split into three main categories: * Nodes Settings * Node Wiring * Auto Arrange

Updating any value affects the Dialogue Editor in real-time.

Nodes Settings

Nodes Settings sub-section

This category is the one which is probably most important and affects most visuals. In this category, you can switch Node Themes, you can switch Node Style and even set a different colour for specific Node Classes!
In the screenshots below, you can see a difference between different settings, affecting the Nodes.

All settings in this category have just and only visual impact and have no effect on functionality whatsoever. We made those to give you more room to make the system easier to adopt and fit your style.
Node Type

Node type defines whether nodes will have Hard Corners or Soft corners.
Default: Soft Corners

Node Theme

Node theme defines whether the node foreground colour is bright or dark. This affects Node Validation too!
Default: Dark Theme

Decorators Info Style

This setting has quite a visual impact. There are two options:

  • Unified
  • Stack

Unified displays one large bubble, containing all text fields. This style comes with nice icons for Inheritance.
Stack breaks texts into individual chunks, in order:

  1. Inheritance
  2. Implementation
  3. Node name

Default: Unified

Display Automatic names

This value allows showing node class names, instead of a manual label. This is a non-destructive operation, therefore changing this from false to true and back again doesn't remove manual names.
Default: false

Override Node Background Colours

Using this map, you can select Node Class and give it a different background colour.
In the screenshot, you can see Start Node (the first one) being pink instead of green.
Some nodes are not allowed to be selected, those are not visible in the graph and serve only as base abstract classes.

Allow Native Decorator Edit

True/false value, allowing opening Decorators in IDE if those decorators are C++ based.
In the screenshot below, you can see that the last decorator doesn't have the tool icon next to it. That indicates it is native C++ decorator.
If Native Decorators Edit would be allowed, this decorator would have the tool icon next to it as well, opening the default IDE when clicked on.

Default: False

Decorators Info

Decorators Info sub-section

Decorators info is Nodes Settings sub-category and contains two options:

  1. Show Detailed Info: Number of Decorators
  2. Show Detailed Info: Does inherit Decorators

The two values define what info is visible in the Dialogue Node itself. In the screenshot below, you can the following:

  1. Yes/Yes
  2. Yes/False
  3. False/False
  4. False/Yes

Default: Yes/Yes

Wiring Settings

Wiring Settings sub-section

Wiring settings affect only the edge wire, connecting Nodes together.
In the current version, the edge is straight and goes directly from Node to Node, with no additional settings, logic or advanced visuals. For the next releases, we plan to add nicer wiring, where the edge wire would deform nicely based on tangents from point A to point B.

In this category, there are only two settings:

  1. Wire Width
  2. Arrow Type
Wire Width

Wire Width defines how thick the connecting wire is, using a range to avoid strange clipping and visual artefacts.
Range: 0.1 - 1.5
Default: 0.5

Arrow Type

Arrow Type provides a simple way to change the Wire arrow. There are the following options:

  • Simple Arrow
  • Hollow Arrow
  • Fancy Arrow
  • Bubble
  • Nothing

Default: Hollow Arrow

Auto Arrange Settings

Auto Arrange Settings sub-section

Auto arrange settings contain one main value and multiple advanced ones.
Advanced settings won't be covered in this part!

Optimal Distance

Defines how far Dialogue nodes should stay apart.
The lower the value, the closer the nodes are together. This can lead to clipping!

Default: 100


6. Dialogue Manager Component

Dialogue Manager Component is one of the major components, responsible for handling the Dialogue flow. This component implements IMounteaDialogueManagerInterface, which contains flow functions.
Dialogue Manager Component is an Actor Component, it has no transform and is attached directly to the Actor.

❗ Dialogue Manager Component should be attached to Player Controller, as the Controller is responsible for handling the dialogues.

Dialogue Manager Component is blueprintable, which means, that you can create child Blueprint classes using this class. This is useful in cases when some specific logic is not implemented or new attributes are needed to better drive the dialogue flow.
For easier implementation, there is premade one Blueprint, in folder /MounteaDialoguePlugin/Blueprints/Components.

Add Component

Add Component sub-section

To add Dialogue Manager Component to any Actor (again, best is to add it to Player Controller), all you need to do is open the Actor and use the Add Component button, then search for Mountea Dialogue Manager and use whatever fits you the best.
❗ BP version contains a predefined WBP class, otherwise has no extra settings.

This is all you need to do in order to enable the Player Controller side.

Setup Component

Setup Component sub-section

Once you add the component to your Actor, you will see settings similar to those in the picture below.
As you can see, the Dialogue sub-category is under the Mountea category. This is futureproofing, as other Mountea Framework plugins are added, they all are added to the same category and won't be scattered across the Actor's Details panel.

Dialogue Widget Class

Same as with the Defaults, this is Class picker.
❗ Either this value or Defaults value must be defined in order to make the Dialogue System work.

The same rules and limitations apply as for the Defaults:
❗ Dialogue Widget class must implement IMounteaDialogueWBPInterface in order to be displayed in the dropdown.

Any Widget Blueprint can implement this interface, so making your own Dialogue WBP is actually quite a simple task.

Default Manager State

Default Manager State defines which state will be set once this component's Begin Play is called.
❗ Active state is not allowed to be set as the Default state


All other variables in Dialogue Manager Component are read-only values shown for debugging purposes.

Events

Dialogue Manager Component Events sub-section

Dialogue Manager Component comes with a handful amount of Events, which can help either debug or tie logic to them.

Here is a list of Events with short explanations.

On Dialogue Initialized

This Event is called once Dialogue successfully initializes, which means that Participants can start a dialogue and all needs are met.
If Dialogue doesn't start, On Dialogue Failed is called instead.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Started

This Event is called once Dialogue successfully start, which means that Participants are now in dialogue with each other.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Closed

This Event is called once Dialogue is closed, no matter how this happened - either manually by ending the dialogue or by any other means.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Context Updated

This Event is called once Dialogue Context is updated, no matter what changes.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance. This data contains up-to-date values.

On Dialogue UI Changed

This Event is called once Dialogue UI has changed, either by creating a new one or closing an existing one.
This Event is called once Dialogue Starts and once Dialogue is Closed.
This Event provides Dialogue UI Class and Dialogue UI Reference pins, which contain what UI data are in use.
❗ Those pins might be Null, please validate them before using them

On Dialogue Node Selected

This Event is called once any Dialogue Node is selected, therefore becoming the Active Node.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Node Started

This Event is called once any Dialogue Node starts, indicating this is the Active Node.
This Event means that Dialogue Rows are being executed if any are attached. The same for Decorators.
If this Node has any Dialogue Rows, each will be executed, calling On Dialogue Row Started.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Node Finished

This Event is called once any Dialogue Node finishes, indicating this Node has no Dialogue Rows to be executed or any other logic.
This Event will be called after the last Row is finished, which is called from On Dialogue Row Finished.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Row Started

This Event is called for each Dialogue Row and its data to be processed.
Once Dialogue row is finished On Dialogue Row Finished is called to close this Dialogue Row.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Row Finished

This Event is called for each Dialogue Row and its data once it is processed.
Once the last Dialogue Row is finished On Dialogue Node Finished is called to close the Node itself.
This Event provides a Dialogue Context pin, which contains transient Dialogue data for this specific dialogue instance.

On Dialogue Failed

This Event is called if Dialogue fails to proceed. This could be called during initialization or during gameplay for various reasons.
The reason, why the Dialogue failed, should be described in the Error Message pin this Event provides.

On Dialogue Manager State Changed

This Event is called once Dialogue Manager State has changed in value, providing the new value as a pin.

On Dialogue Voice Start Request

This Event is called once Voice is requested to start playing.
This plugin does provide a Decorator to handle voices, however, to avoid any hardcoded logic, this could be easily updated. This Event allows to abstract the Voice calls in Events based fashion.
This Event provides the Voice Sound Base which is requested to play.

On Dialogue Voice Skip Request

In the same manner as On Dialogue Voice Start Request provides a way to start the voice, this Event is called once Skip is requested.
This Event provides the Voice Sound Base which is requested to play.


7. Dialogue Participant Component

Dialogue Participant Component is a helper Component, which identifies in-game Actors as Dialogue participants. Those Actors then can be used in Dialogues and being dialogued with.
Dialogue Participant Component implements the IMounteaDialogueParticipantInterface interface, which contains flow functions.
Dialogue Participant Component is an Actor Component, it has no transform and is attached directly to the Actor.

❗ Unless Dialogue Manager Component, Participant can be attached to any Actor. This Actor does not need any other logic.
❗ In order to make Dialogue Participant work flawlessly, Audio Component is strongly recommended to add to the parent Actor.
❗ Player Pawn must be Dialogue Participant as well, as this component does not differentiate between Player and NPC Actors.

Dialogue Participant Component is blueprintable, which means, that you can create child Blueprint classes using this class. This is useful in cases when some specific logic is not implemented or new attributes are needed to better drive the dialogue flow.
For easier implementation, there is one premade Blueprint, in folder /MounteaDialoguePlugin/Blueprints/Components.

Prepare Actor

Prepare Actor sub-section

Actor preparation for Dialogue Participant is actually simple. There are two possible use cases for this component:

  • Active Participant who can have their own dialogue
  • Active Participant who doesn't have any own dialogue

The first option is useful for NPCs that can be interacted with.
The second option works as a check so Dialogue can jump between its participants. This one is supposed to be set for the Player.

❗ In order to play voices all Actors involved in Dialogue must have Audio Component.
Dialogue won't fail without Audio Component, however, there will be no voices.

For this example, I will use Character class. Let's make a new Blueprint inheriting from Pawn and call it BP_NPC.
Once done, you will see something similar to this class.

Now, we need to assign two components:

  1. Dialogue Participant Component
  2. Audio Component

Why Audio Component?
Audio Component is a crucial component responsible for playing dialogue voices. Without an audio component, no voices can be heard, completely breaking the dialogue immersion.
If there is no dubbing, however, there is no need for an audio component.

Add Audio Component

Adding an audio component is as easy as it gets. In the same way, we are adding all components, we will add the Audio.

❗ Feel free to use any child classes of Audio Component, but the audio component must inherit from Audio Component

Once you have an audio component, there are a few steps that are necessary to perform.

  1. Give your component a name
  2. Attach it to a socket (if you have a mesh component as a parent)
  3. Add a tag
  4. Set Auto Activate to false

This is all you need to do in order to prepare your Actor's audio component to be Mountea Dialogue ready!

Add Participant Component

This part is covered here.

Add Component

Add Component sub-section

To add Dialogue Participant Component to any Actor, all you need to do is open the Actor and use the Add Component button, then search for Mountea Dialogue Participant and use whatever fits you the best.

This is all you need to do in the Class definition.
❗ We strongly recommend not defining dialogues in Class defaults, unless a very specific Actor is placed. Dialogue data should be updated on in-level instances.

Setup Component

Setup Component sub-section

Once you add the component to your Actor, you will see settings similar to those in the picture below.
As you can see, the Dialogue sub-category is under the Mountea category. This is futureproofing, as other Mountea Framework plugins are added, they all are added to the same category and won't be scattered across the Actor's Details panel.

Dialogue Graph

This is the most important single variable of this Component.
This is the Dialogue Graph selector, which defines what Dialogue Graph is this Component using.

❗ In order to make Dialogue work, this value must not be Null.

This value can be changed during gameplay, however, limitations apply:

  • Changing value is not allowed during Dialogue (state is Active)

Dialogue Graph is validated once Dialogue is requested to start.

❗ Should be updated per instance in the Level

Default Participant State

Default Participant State defines which state will be set once this component's Begin Play is called.
❗ Active state is not allowed to be set as the Default state

Audio Component ID

Either Name or Tag of the Audio Component of this Actor. This allows an easy way to pre-define relations between Participant and its Audio Component.
SetAudioComponent can be used instead.

❗ Should be updated per instance in the Level

Events

Dialogue Participant Component Events sub-section

Dialogue Participant Component comes with a handful amount of Events, which can help either debug or tie logic to them.

Here is a list of Events with short explanations.

On Dialogue Graph Changed

This Event is called once Dialogue Graph has changed and only if changed.
This Event provides a New Graph pin, which holds the reference value of the Dialogue Graph that is set as a new Graph.

On Dialogue Participant State Changed

This Event is called once Participant's State has changed and only if changed.
This Event provides a New State pin, which holds the value of the Participant State that is set as a new Participant State.

On Audio Component Changed

This Event is called once Audio Component has changed and only if changed.
This Event is called even when the value changes to Null.
This Event provides a New Component pin, which holds the reference value of the Audio Component that is set as a new Audio Component.
❗ This Event might provide a Null pin

On Starting Node Saved

This Event is called once Audio Component has changed and only if changed.
This Event provides a New Start Node pin, which holds the reference value of the Audio Component that is set as a new Audio Component.
❗ This Event might provide a Null pin

8. How to make Dialogue

Create Dialogue Tree

Create Dialogue Tree sub-section

Creating a new Dialogue Tree is easy, as all major Mountea Dialogue assets are exposed to right-click quick menu. You can see those in the screenshot below.

Once Dialogue Tree is created, you can open the asset and start editing the Dialogue! But that is just the very first step in the journey of making an dialogue.
Let's now focus on creating actually playable Dialogue Tree.

Open Dialogue Tree

Open Dialogue Tree sub-section

Once you open Dialogue Tree, you will notice that there is already one Node created, and that is a Start Node.
This is what you are greeted with upon the first arrival to the Dialogue Tree.

Start Node

Start Node sub-section

Let's now explain why is there the Start Node and what does it do.

Start Node is a special type of Node, which indicates where the Dialogue starts. It is an anchor, helping the underlying system to get idea how the Dialogue flows. This node is specific in some other aspect, too:

  • you cannot copy this node
  • you cannot paste this node
  • you cannot delete this node

Dialogue Tree Details

Dialogue Tree Details sub-section

Now, let's focus on the Details Panel. This is something you are probably familiar with from regular Blueprints, as this Details Panel is the same - a place to edit properties.

Search
Search sub-section

The search bar in the Details panel provides a handy tool when searching for:

  • Decorators
  • Tags

In the screenshot below you can see how the Search works.

Decorators
Decorators sub-section

Decorators have their own Chapter.
Each Graph can have its list of Decorators, which are actions performed upon execution of the Active Dialogue Node. This is further explained in Flow Graph.

You have those options with Decorators:

  • add a decorator to an array
  • clear decorators array

With each Decorator, you have the options:

  • delete entry
  • open the documentation page

With Blueprint Decorators you have extra options:

  • browse to the asset folder
  • open blueprint
Gameplay Tags
Gameplay Tags sub-section

To any Graph, you can add Gameplay Tags. Those have currently no additional logic.

Select Node

Select Node sub-section

Selecting any node is as easy as selecting anything in Unreal Engine. Simply left click on the Node.
All Nodes can be Selected and Hovered. You can hover over the selected Node. Hovering over any Node will show a tooltip window with a short description of the Node.

Tooltip

All tooltip Nodes consist of two parts:

  • Generic part
  • Specific part

Generic Part tells you the Name and whether this Node implements and inherits decorators.

Specific Part gives a brief explanation of the Node itself and how to use it.

Node Details

Once you select any Node, will see a Details Panel.
As you can see, the Node Details Panel is customized, showing a custom button.

❗ Each Node type has its unique Node Details. Node types are displayed in the screenshot below
❗ All Nodes have a Documentation button

In the screenshot below, you can see different Node types and their Details Panels.

Create Node

Create Node sub-section

There are two ways how to create a Node in the Graph, and those are:

  1. Right-click and select a node from Menu
  2. Select a node, drag an edge from it and upon release select a node from Menu

In the end, Node creation is the same, there are just two ways how to get to it.

Connect Nodes

Connect Nodes sub-section

Once you have at least 2 Nodes in the Graph, you can connect them. Connection is automatically created if you create Nodes using edge release.

❗ Some Nodes cannot have input connections
❗ Some Nodes cannot have output connections
❗ Some Nodes cannot be connected
❗ Infinite loops are not supported

To connect Nodes, you drag from the existing Node using the left mouse button and release the cursor above the other Node.
If the connection is allowed there will be a message. A such message will be displayed for invalid connections, too.

Valid Connection.

ValidConnection.mp4

Invalid Connection.

InvalidConnection.mp4

Make Graph

Make Graph sub-section

Let's imagine a simple scenario:

  1. Player approaches NPC
  2. NPC asks if the Player can help it
  3. Player can choose if Yes (dialogue continues) or not (dialogue ends)
  4. If the player chooses No, then the dialogue ends
  5. If the player chooses Yes, then NPC tells the Player what he needs to do
  6. After that part is done, the Player tells the NPC he is going to do what he was asked for

Now, let's make this part in the Dialogue Tree editor.

MakingOfBasicDialogue.mp4

Now, let's discuss what just happened.

  1. Lead Node was created with the title "NPC"
  2. Answer Node was created with the title "Yes"
  3. Answer Node was created with the title "No"
  4. Complete Dialogue Node was created from "No"
  5. Lead Node was created from "Yes" with the title "NPC"
  6. Complete Dialogue Node was created from "NPC"

Different Node Types are described in their own Chapter. So for this chapter let's assume the following:

  • Lead Node is NPC Node
  • Answer Node is Player Node
  • Complete Dialogue Node completes the dialogue with dialogue data

If you save your Dialogue Tree now, you will see Validation error. That's correct behaviour, don't be scared. We will get through it in a moment in the Graph Validation chapter. To skip a bit up further, we will need to Make dialogue data.

Graph Functions

There are currently two Graph functions available to buttons in the ribbon.

  1. Auto Arrange
  2. Validate Graph

Auto Arrange

Auto Arrange sub-section

Auto Arrange helps with Nodes arrangement in the Dialogue Tree, rendering all Nodes in easier to read fashion.
❗ This is currently Alpha version and may lead to crashing the Editor

AutoArrange.mp4

As you can see, all Nodes are now easier to read. This function is using settings described in Auto Arrange chapter.

Graph Validation

Graph Validation sub-section

Graph Validation is split into two parts:

  1. Asset Validation
  2. Graph Validation

Actually, both validations show the same data, those are just two ways to display whether anything is wrong with Dialogue Tree or not.

Graph Validation

GraphValidation.mp4

Asset Validation

AssetValidation.mp4

Understand Graph Validation

Understand Graph Validation sub-section

Graph Validation, either Graph or Asset Validation, have the same format:

{name}: {error message}
Attribute Explanation
name Name attribute is dynamically populated, based on which component threw the error message. It returns the displayed Name of the component (for Nodes) or a user-friendly name (for Decorators).
error message Error message attribute is populated by the component, explaining what is wrong with it

Make dialogue data

Mountea Dialogue System is a soft-reference system. What does it mean? Well, you don't type dialogue lines and data to each Node, you use centralized data source (Data Tables) in order to achieve as data-driven approach as possible.

Advantages Disadvantages
Using data-driven approach allows you to have one source truth that remains the same for everything Requires creating a lot of data
When reusing the same data for different Node, eliminates chances of human error Not as flexible as customizable containers
Add once, use everywhere -
If something changes, only one place needs to be updated -

Mountea Dialogue System is using one Data Table with two structures. The plugin comes with an empty Data Table, so an easier way to start making your data is to copy that Data Table and use that copy. But let me explain how this works before we add some data.

Data Table

Data Table sub-section

Dialogue Data Table is located here: /Plugins/MounteaDialogueSystem_Binaries/Content/Data/ and contains example data.
This Data Table is using FDialogueRow structure, which is C++ based. This structure consists of:

Attribue Type Comment
Row Type ID int32 Value between 0-255, defines a specific type of Row, eg. Open shop or Close dialogue row.
Row Optional Icon Texture Optional texture which can be associated with Dialogue Row.
Dialogue Participant Text Override name of Participant. Currently has no logic applied to it.
Row Title Text This value is displayed for the player to choose from. Short title describing the underlying dialogue.
Dialogue Row Data Set of FDialogueRowData FDialogueRowData contains the actual dialogue sounds and texts. Each FDialogueRow can have multiple of those.
Dialogue Row Additional Data DataAsset Optional Data Asset which can contain more data. This is a way to easily extend C++ based structures in Blueprints.

To make a new data table right click, select Miscellaneous and select Data Table. Then select the DialogueRow option. You can follow the video below.

MakeDialogueRowDT.mp4
Clone this wiki locally