Skip to main content

Dialogue Nodes

The dialogue node is the base node that contains all the details you want in the specific line and shot that is being played. Its generic and used for both the Player and NPCs lines.

dialogue-node-created.webp

Creating a new node

To create new nodes to add new lines to your dialogue, either right click in the dialogue graph and select your speaker or drag from the pin you wish to connect from.

dialogue-node-creation.webp

note

You can join multiple speakers nodes together, but you cannot join multiple player nodes. You have to separate them by an empty speaker node.

speaker-nodes-joining.webp

Now you can select the node to enter its details in the Details panel.

creation-node-details.webp

note

The default node comes with some starting text. This can work for some dialogue, but it's much more flexible to keep the first node empty, so you can use conditions later.

Node variables

Each node has many variables that make it work. They are defined below.

NameTypeDescription
SelectingReplyShotUNarrativeDialogueSequence(NPC node only) The UNarrativeDialogueSequence that will be used while the user is selecting a player option.
OptionTextFText(Player node only) The shortened text to display for dialogue option when it shows up in the list of available responses. If left empty narrative will just use the main text.
HintTextFText(Player node only) Optional hint text after the option text, ie (Lie, Persuade, Begin Quest) If left empty narrative will see if events have hint text.
bAutoSelectbool(Player node only) If true, this dialogue option will be automatically selected instead of the player having to select it from the UI as long as all conditions are met.
TextFTextThe text for this dialogue node.
DurationELineDurationThe duration the line should play for.
DurationSecondsOverridefloatThe overridden seconds the line should play for.
DialogueSoundUSoundBaseIf a dialogue sound is selected, narrative will automatically play the sound for you in 3D space, at the location of the speaker.
DialogueMontageUAnimMontageNarrative will play this montage on the first skeletal mesh component found on your speaker with the tag "Body" added to it.
FacialAnimationUAnimMontageNarrative will play this montage on the first skeletal mesh component found on your speaker with the tag "Face" added to it.
ShotUNarrativeDialogueSequenceShot to play for this line. Overrides speaker shot if one is set.
AlternativeLinesTArray<FDialogueLine>If alternative lines are added in here, narrative will randomly select either the main line or one of the alternatives.
OnDialogueFinishedFOnDialogueNodeFinishedPlayingDelegate that is called when the dialogue node finishes playing.
PlayedLineFDialogueLine fThe last line the dialogue node played.
NPCRepliesTArray<UDialogueNode_NPC>Array of NPC replies for debugging purposes.
PlayerRepliesTArray<UDialogueNode_Player>Array of player replies for debugging purposes.
OnPlayNodeFuncNameFNameName of custom event to call when this node is reached.
DirectedAtSpeakerIDFNameThe ID of the speaker we are saying this line to. Can be left empty.
bIsSkippableboolShould pressing the enter key allow this line to be skipped?
conditionsTArray<UNarrativeCondition>conditions are functions that run before this node is pending selection and contain boolean returns that allow this node to be run or ignored.
EventsTArray<UNarrativeEvent>Events are functions that can run at specific states on quests & dialogue.
note

To see a complete breakdown of the variables and how the nodes work, please see the node breakdown.

Auto-selection

Player options have an additional property to allow them to be auto-selected. This will tell Narrative to skip rendering the option and select the first Player option that is valid and can be taken. (See conditional dialogue)

This is a great option for when you want the player's character to say something but the user does not have to select it.

dialogue-note-player-autoselect.webp

Back-linking

Back linking is the ability to make circular dialogue; Going back up (across) to a node.

This is very useful for creating questions or returning to menu style dialogue.

dialogue_backlinking.webp

Colors

You can change the default colours of a bunch of different Dialogue items.

Go to Edit -> Project Settings -> Narrative Dialogues - Editor.

Here you can see all the colours that you can change.

dialogue-default-colours.webp

Duration

Dialogue has several states of logic it uses in order to calculate the duration of each node. You can overwrite at any level that you require to make the dialogue work how you need it to.

Get Line Duration

The GetLineDuration node overwrites all duration settings. You can set this and customise any return duration you want.

dialogue-getlineduration.webp

Duration

The Duration value can be set with some pre-defined values.

dialogue-duration.webp

Audio duration

The default value for the Duration Field is the audio length if audio has been provided.

dialogue-duration-audio.webp

Text length duration

If no audio has been found, Narrative will default to the length of the text multiplied by the Letters Per Second Line Duration value.

This value can be changed within Edit -> Project Settings -> Narrative Dialogues - Gameplay

dialouge-editor-timings.webp

Empty nodes

Empty nodes are power tool to keep your dialogue organised. It's often used before a list of player options, so you can connect multiple entries into a single node instead of every player option, but it can be used to also just make the dialogue more readable.

dialogue-empty-nodes.webp

Compact nodes

Sometimes empty nodes can be used to organise dialogue. You can tick a node's Compact View option in the details in order to change it into a smaller, closed version in the editor.

dialogue-compact-node.webp