Download

Dialogue Nodes [Open Source, C++, 4.20-4.22]

Hello there!

I’ve been working for a few months on a new game project for which our team had to develop or use a dialogue system.
Turns out no solution satisfied us on the marketplace or elsewhere, thus here I am, making my own!

**User experience **and game-agnosticism are very important notions to me, so I designed this pure game-logic system in the most flexible and simple way I could : it is entirely made of Blueprint nodes. DOWNLOAD LINKS FOR UE4.20, UE4.21, UE4.22 BELOW
[HR][/HR] Thumbnail_MarketPlace.png
[CENTER]
[FONT=lucida sans unicode]BP Integrated   Flexible   User friendly
[/CENTER]
[HR][/HR]




[HR][/HR]
Features:

  • Blueprint integrated system

  • 5 Blueprint nodes for dialogue design

  • One single node for dialogue execution

  • Intuitive dialogue branching with pins and wires

  • Dynamic access to Blueprint elements

  • Boolean conditions for dynamic branching

  • Text variable replacements inside dialogue lines

  • Trigger Blueprint actions

  • Rich Text support

  • Live preview formatting directly in Blueprint nodes

  • User defines its own <tags></> to be displayed in-game and in-editor

  • ​​​​Metadata, Sound and Dialogue Wave assets inside every node

  • Node display depends on Project Settings and metadata

  • 24 pages documentation (link below)

  • Example project with basic UI (link below)

Important note: no UI implementation inside the plugin. UI entirely depends on your game project so it’s up to you to implement it. [HR][/HR]
Links:

[HR][/HR]As user-experience is at the core of my work, I will gladly hear about all your feedbacks and suggestions! :slight_smile:
I’ve been working on it alone for a few months now (on my free-time) and I would like to have the point of view of other designers.

I’m all ears!

Have fun with this plugin system, never stop writing! [RIGHT]- A Crafty Weazel -[/RIGHT]

Small update:

Now with an “Add out +” button to easily add outcome options :slight_smile: Not a big deal, but quite practical.

UE4_AddOutButton.PNG

User-interface update:

You can write text with tags that will automatically be detected and **formatted **in the rich text box of the node.
To do so, you will have to create a Text Style data table and select it from the plugin’s settings in Project Settings > Editor.

Thanks to that update, you can have as many text formats as you want, with all UE4’s RichTextBox possibilities (font, color, size, shadow…).

*Note: *you can’t add decorators like you would do to insert inline images or widgets (tooltips on keywords for example). I don’t think I will do it inside the editor’s UI, but it’s still possible at runtime.
Note 2: here you specify a Text Style data table for the editor display only. The text styles at runtime are specified separatedly, which allows you to have a preview set for the writing phase, and a runtime set for the real dialogue once in game.

Custom-variables update:

You can add as many custom variables as you want in your text lines and options thanks to the brackets ]. Just write your [variable name] inside brackets and press enter. Then a Text pin is added to the node where you can write a value, or link anything directly from the blueprints.
As you can see in the example, the same variable can be used multiple times and may also be placed between < > signs to make dynamic text tags! (see previous update)

This feature also comes with few options making things easier with custom variables. When you delete all occurence of a variable in the text, the pin doesn’t disappear (it might be linked to something or contain a value). You can right-click on a custom pin to make it disappear, or you can also regenerate all pins to recreate all destroyed pins that still appear in the text.

This update also comes with a few minor bug solving that I won’t detail here.

Where can I get this?

Hi, I’m glad you’re interested but it’s still a WIP though.
I can’t deliver it right now as main features need to be done.

I’m working hard to make things progress :slight_smile:

This is pretty awesome actually. I really love that you incorporated RTF/B and variables directly into the node. That would speed things up quite a bit. Keep up the great work!

A K2Node_ system like this is way better than a full custom graph :slight_smile:
Can be placed on existing Blueprints.

Very interesting!

Have you any plans to integrate your system into Behavior Trees and AnimBP?

Thanks for the feedbacks!

I quickly checked and it seems to work with AnimBP, but I need to test it further.
I don’t have any plan to directly integrate it to Behavior Trees as it is quite different from BP, but you can still make bridges from BT to BP and then use any variable/condition in the dialogue branching.

Maybe things will be clearer when I release the update for executing the dialogue. Until now, I’ve only been working on the dialogue design, which is stored in a Dialogue object. It should be out soon, but it’s quite a bit of work too.

Sidenote: as I see some great coders are here, does anyone have an idea on how to change the color of the pin connections?
I made a custom exec pin (orange one in screens) but I can’t manage to edit the connection color, as it is hard-defined in the graph settings. Any way to inject new setting?

Dialogue Execution update:

I finished the last biggest part of the system, the execution HUB. From one node, you manage all the execution of the dialogue.

It is composed of five parts. The three to the rights are ways to give information to the dialogue. The two to the left are events fired by the dialogue when necessary.

  • Launch Dialogue
    This is the pin you use to launch the dialogue. You use it only once, the dialogue cannot be launched again before it reaches an end or it is terminated.
    The Dialogue pin just below is where you select the Dialogue object you want to launch, which means you can launch dialogues from anywhere, not necessarly where you created them.
    Once the dialogue is launched, events will be fired.
  • Select Option
    You use this pin when the dialogue is waiting for an input, after a choice proposed to the player.
    The Option ID pin just below is used to tell the dialogue which option was selected by the player. An option’s id is its position in the Options array (see below).
    Even if there is no option, just a “press a button to continue” thing, you still use this pin and give any Option ID.
  • Stop Dialogue
    You use this pin to manually terminate the dialogue, like when the player decides to quit the dialogue before a branch end.
    This will tell the dialogue that it can reset and you will be able to launch it again.
    Note that it fires the Dialogue End event (see below).
  • Dialogue Line
    This event is fired each time a NPC-line is encountered in the dialogue (or a player-option directly leading to other player-options).
    The String pin carries the processed text of the line, replacing all [variables] by their current value. You should display it in a RichText UI component.
    The Options pin carries an Array of OptionStruct. Those are structs containing processed text of each option as well as their visibility and availability (only visible options are in the array).
    You should display the line and the different options when this event is fired and wait for player’s input. Then, notify the dialogue through the “Select Option” pin.
  • Dialogue End
    This event is fired when the dialogue reaches a branch end, or when it is manually terminated through the “Stop Dialogue” pin.
    You should close UI elements you want to close here and do anything relevant after the dialogue is ended.

I recommand to make a displayer class (maybe a widget blueprint) that will properly handle every dialogue execution, then pass it relevant Dialogue objects from the blueprint that need to execute a dialogue. This way, you can define your own UI design once and use it everywhere in your game, with a direct and strong link to blueprints.

General Improvements + Documentation Update:

Hi there, I made some progress since last update since January! Most of them are bug solving and optimizations, but I added few visual and practical things too.

  • Metadata parameters:
    Now, on each Line/Option node, you’ll be able to add as many metadata parameters as you want, in a Name-String map. You might want to specify the Character who is talking for example, or its mood. You could also specify which skill is required for the player to select an option.

    These metadata parameters may be declared for all nodes at the same time in the plugin’s settings. Here you can define default parameters and their default value. When you create a new node, it will use these defaults, but then you’ll be able to change the values, add/delete parameters…

*Note: *You can use [text parameters] inside metadata parameters too! This allows you to change their value dynamically depending on game.

UE4_MetadataParameters.png

  • Title parameter and colors:
    In the settings, you can specify the name of one of the metadata parameters so that the engine displays it directly into the node’s title. Then, for different values of that parameter, you can specify different colors the node might take. The change is immediate and it allows the designer to make their dialogue branching much clearer, with color codes and quick look-up.

  • Sound and Dialogue Wave:
    Just two parameters you can set for each Line/Option, if you want to play your dialogue with audio.

UE4_AudioProperties.PNG

  • Full documentation:
    I worked hard and produced a comprehending guide on how to use the whole plugin! From the simple beginnings to the technical ends, I tried to give details in an educational way. Hope this is good. The document will be shipped with the plugin as a PDF and updated with each new version of the plugin.

I think I am slowly reaching a milestone where I might be able to ship a first version of the plugin. I will let you know and as always I am fully opened to feedback!

I have to say this is looking amazing. Looking forward to get my hands on it for my game!

Hi there!

After a while (I just moved to China for work), I’ve been working again on my dialogue plugin and I’m proud to say that the first version of it is ready !
The team I’m in is going to use it on our project to get some fast feedbacks and solve the first bugs + make the first improvements. As is it an user-experience plugin in the end, I will make it evolve with user feedbacks.

However, I will soon make it purchasable on the MarketPlace for 24.99$. According to what I’ve seen and tried, I think it’s a fair price, also considering that it will evolve to follow the needs.

Small update though, since last time:

  • As I added important meta-data to nodes, like speaker’s name, and it appears in the node title, maybe changing it’s color etc., I made a small enhancement: when you create a new Line node by dragging a pin from another one, it copies its metadata. This way, when you’re creating a dialogue with a specific character, it’s pre-filling every node with this character’s name.
  • Some bug solving, tests and optimization.
  • Example project to be shipped with the plugin (4.22), with features demonstration and an example of UI implementation.
  • Plugin packaging for 4.22, on Win32, Win64, Mac, Linux, PS4, XboxOne, Switch, Android, SteamVR, GearVR (no iOS for now, I’ve got a compile issue…)

- Original post updated -

  • Demonstration screenshots
  • Feature list
  • Downloadable documentation
  • Downloadable example project (won’t work until the plugin is available on the Markeplace though)

Hey @CraftyWeazel - The PDF documentation is empty for me. I have tried to open it with a dedicated PDF reader as well as Chrome and Edge.

Same here as HeadClot. This looks like a really amazing plug-in, I’m exited to get my hands on it.

Is it currently possible to pass more with the OptionStruct than just the line, visibility, and availability? For instance, if I want to pass a montage or an image when an NPC response is sent to the dialogue widget is that possible?

Hey, I updated the documentation link in the original post. I don’t know why but the PDF wasn’t correctly imported to Google Drive the first time. It should work now :slight_smile:
Here is the link.

@TBWright With LineStruct and OptionStruct, you can pass text, sound, dialogue wave and metadata (plus the availability and visibility conditions of course). So you can make a metadata entry called “image” or “montage” and supply the name of the asset you want to use here. Then in the widget implementation, you can switch on that name and if it corresponds to anything in your database, then display it.

It would have been better to let users define their own struct to be passed with lines and options, but I didn’t find a way to do it inside the editor. Maybe in a future update though.

Looks like it works now :slight_smile: