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.
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.
You can join multiple speakers nodes together, but you cannot join multiple player nodes. You have to separate them by an empty speaker node.
Now you can select the node to enter its details in the Details panel.
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.
Name | Type | Description |
---|---|---|
SelectingReplyShot | UNarrativeDialogueSequence | (NPC node only) The UNarrativeDialogueSequence that will be used while the user is selecting a player option. |
OptionText | FText | (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. |
HintText | FText | (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. |
bAutoSelect | bool | (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. |
Text | FText | The text for this dialogue node. |
Duration | ELineDuration | The duration the line should play for. |
DurationSecondsOverride | float | The overridden seconds the line should play for. |
DialogueSound | USoundBase | If a dialogue sound is selected, narrative will automatically play the sound for you in 3D space, at the location of the speaker. |
DialogueMontage | UAnimMontage | Narrative will play this montage on the first skeletal mesh component found on your speaker with the tag "Body" added to it. |
FacialAnimation | UAnimMontage | Narrative will play this montage on the first skeletal mesh component found on your speaker with the tag "Face" added to it. |
Shot | UNarrativeDialogueSequence | Shot to play for this line. Overrides speaker shot if one is set. |
AlternativeLines | TArray<FDialogueLine> | If alternative lines are added in here, narrative will randomly select either the main line or one of the alternatives. |
OnDialogueFinished | FOnDialogueNodeFinishedPlaying | Delegate that is called when the dialogue node finishes playing. |
PlayedLine | FDialogueLine f | The last line the dialogue node played. |
NPCReplies | TArray<UDialogueNode_NPC> | Array of NPC replies for debugging purposes. |
PlayerReplies | TArray<UDialogueNode_Player> | Array of player replies for debugging purposes. |
OnPlayNodeFuncName | FName | Name of custom event to call when this node is reached. |
DirectedAtSpeakerID | FName | The ID of the speaker we are saying this line to. Can be left empty. |
bIsSkippable | bool | Should pressing the enter key allow this line to be skipped? |
conditions | TArray<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. |
Events | TArray<UNarrativeEvent> | Events are functions that can run at specific states on quests & dialogue. |
To see a complete breakdown of the variables and how the nodes work, please see the node breakdown.