Integrated Dialog Editor

Hey there folks. I’d like to share something I’ve been working on for the past few months with you. Hopefully, given enough interest and a bit of time this tool will find its way to the marketplace.

Inspiration
This tool came forth from a personal gripe of mine that it is currently impossible to properly create branching dialogs in Unreal Engine. Doing it in Excel or some other “linear” editor makes it a gigantic pain when dialog choices mean that you can jump around different lines or even loop back. And let’s not mention any more complex stuff. Thus, after a lot of research, some tinkering and a lot more work, I am proud to present my Integrated Dialog Editor.

Features

Important: Before reading on I’d like to clarify that this is a system for creating dialog data only. There are no UMG components or logic to actually display this data to the player. The dialog system is used to create and “traverse” dialogs. It is the developers choice how to display and use this data in their games.

Create complex branching dialogs easily using the familiar Unreal Engine graph editor. Dynamic branching is controlled via Flags that can be driven by outside events. Special conduit nodes work in a similar fashion to Select nodes in BehaviorTrees, in that the first node whose flag is set will get executed. Flags can be set per dialog or on a global level.

Each dialog line can be fully customized with a ton of integrated data. You can associate speakers, sound cues and animations to dialog lines, as well as add any number of dialog choices. The availability of lines as well as choices in lines is dictated by the set flags. Similar to FText::Format, you can use format wildcards in dialog text and feed values in later on when you start the dialog.

Dialog speakers allow you to define all the actors of your game and associate various properties with them. You can assign a skeleton that will be used with this speaker. This will in turn be used to filter the animation list for the dialog lines that use this speaker.

Conduits can be nested to control the flow of the dialog as complexly as you need it to be.

Since these dialogs tend to loop back quite a bit, redirect nodes are fully supported.

When starting the dialog from Blueprint (or code) you can fully customize all initial parameters as well as feed in data for wildcards. All of this can be done at any point during the dialog as well of course. It is important to note that it is fully possible to retain the state of a dialog if it’s canceled before it ends. This can be useful when it’s important to save and restore a dialog state such as with visual novels or Ace Attorney-style games.

Flags can be set or unset via the API dynamically but it is also possible to associate functions with flags to have them be queried automatically when the dialog system encounters the specified flag. These functions can be as complex as you need them to be.

You can hook into all of the important events and drive any and all of the game logic you can think of based on what happens in dialogs (Camera transitions, monster spawns, level loads etc.)

Everything in the plugin is using FText and as such fully supports localization.

Incoming Features

  1. Bug fixes
  2. Improving editor tidbits
  3. CSV Import & Export
  4. (Done! See this post.)Camera Adjustment Helper Component - This is a component that will be attached to the NPC that will be starting the dialog. It will provide a way to pre-define either static camera locations and rotations to transition to via dialog events, or alternatively, play a matinee. It will support stuff like “GetRandomCameraPoint” or “GetBestCameraPoint” in case you either want the camera to hop to a random location for randomness, or find the next best spot if he target point ended up in a wall because the NPC moved. Furthermore, it would handle the camera transitions.
  5. (Done!) Pre-defined wildcards (for example the SpeakerName used in the image above could be automatically retrieved if a speaker is assigned to the dialog line)

Backlog

  1. Collapsing / expanding parts of the graph

Right now I am focused on debugging and polishing the core features; making sure everything is as user friendly as possible. If any other features come up internally or are requested I’ll attempt to work them in before moving onto the marketplace submission

If you have any questions, suggestions or comments, I’ll be more than glad to read them! Let me know in this thread!

FAQ

Q: Alright but what about Slate / UMG? What do I do with this data?
A: As I said earlier, this is data only. It handles the flow of the dialog based on flags and whatnot under the hood. It is up to the specific game to implement their UI and a way to display the data. For example, when you talk to an NPC, you’d pass his dialog object to the HUD, bind all of the events for that dialog and show your UMG widgets that display the speaker name / dialog text etc. when the dialog starts, change the text after you call MoveToNextLine and hide it all inside of OnDialogEnd.

Q: This look awesome, but how much will it cost?
A: I don’t have the slightest clue at the moment. I will update the thread after I give it some more thought. I’d very gladly hear how much you’d be willing to pay for a system like this.

Best regards,
Damir H.

sound like a very solid system to me, and i would be very interested in this.
Working on an oldschool point & click adventure this could be my choice !

but i think you should add a basic UI and a demoscene.
Otherwise many people wouldnt be able to use this or adopt it to their needs.

best regards
stucki

Hey,

Yes of course I’d ship it with example content, documentation and tutorials.

Looks very interesting. Will it be able to handle multiple languages?

Hey Ariegos,

Of course. Everything is being done via FText and is gathered by Unreal’s localisation system just like everything else.

After a bit of experimentation and several scrapped designs, I believe I have finally managed to bang together a useful, intuitive, yet flexible system for setting up camera transitions during dialogs. The system works in four steps. All of the techniques shown can be used partially, or not at all. This is completely optional.

1. Set up the type of scene for a particular dialog line

During dialogs, no matter how big or small, different characters (singular and plural) are being focused via different camera shots. These can be set per-line and can have the following variations:

  1. None - Disabled. The scene system has absolutely no performance overhead if not used.
  2. Any - Any scene that contains the current speaker and is associated with this dialog will be eligible. Picked at random.
  3. Speaker - Get the focus shot of this speaker. More on this in a minute.
  4. Player - Get the focus shot of the player character. Same as above.
  5. Matinee - Play a matinee during this line.
  6. World - Get a world shot that contains all speakers specified in a list. If there is no such shot, it will fall back to “Any”. I thought about renaming this “Group” but really, you can set it to show anything, focus on furniture or some mountains etc.
  7. Labeled - Get a specific named shot, marked by a FName label.

2. Set up speaker shot configurations
Most games that have dialogs (namely RPGs) usually have one common camera angle / position that the camera focuses on when the player talks to NPCs. To this end I’ve set up a new asset type called SpeakerCameraSettings.

This is used to define the socket and offset of where the camera will be positioned, and the socket and offset the camera will be look at. This can then be reused in all your NPCs. Note that the set up is an array. If the two trace settings are turned on, when selecting a position, the system will go sequentially through the array and select the first setting that passes the tests (or has both tests turned off). This is to be able to define several presets (like over the shoulder left, over the shoulder right etc.) and avoid the camera clipping through walls if you have wandering NPCs.

3. Mark actors in your world as speakers

To actually mark actors in your world as speaker, you attach the new SpeakerSettingsComponent to them.

This simply tells the system which speaker this actor is, and what configuration to use for this speaker.

There are BP exposed functions to change both of these at runtime. For example, you could have a telephone that you can “talk to” and it ends up being several speakers.

4. Create World shots

Last but not least, to facilitate static shots, group shots and such, you can use the new DialogSceneCameraActor.

This camera actor can be used in several dialogs and the list of speakers in it can be adjusted at runtime. Currently I am working on making it automatically check which speakers are in view of this camera, although this check might end up being expensive and is of dubious usefulness. Perhaps a more useful feature would be to have the camera rotate to focus on the current speaker.

Either way, in addition to the speakers you can also tell this particular camera to use a matinee. What happens in that case is that a matinee will be played instead of switching to this camera. However, it is of note that in your dialog lines, if the scene is set to Matinee you can also define what scene will be used AFTER the matinee, in case the player hasn’t advanced to the next line.

If this isn’t set, and the matinee finishes playing, the camera will switch to the camera actor that started the matinee.

Overall though the plugin is reaching a stage I am feeling happy with so I’ll most likely be submitting it to Epic in the coming weeks. A few more things are missing (like the possibility to stop or keep playing matinees when the line switches) but it should be wrapped up pretty soon. As for sequencer assets, the project I work on is still sitting at 4.9.2 so I haven’t had the pleasure to work with sequencer and as such couldn’t get this whole thing working with it. Once I get my hands dirty with it I’ll make sure to add in support.

This one looks very interesting!

Hey guys,

Took a while, but I squashed a good deal of bugs and improved some of the features as well. Also I’ve prepared a video demonstration of some of the basic features:

Since the unreal engine marketplace seems to still hate code plugins, chances are that this will be released on a third party site if there’s enough interest.

Best regards,
Damir H.

looks very interesting to me !
would this be easily adobtable to a point & click style of game ?

Hey stucki,

Sure would be, it’s completely game agnostic and doesn’t limit you in any way.

Also, the plugin has been released on Gumroad, since it seems the UE4 Marketplace doesn’t like C++ plugins yet.

Future updates will also be posted in that thread since it’s technically no longer a Marketplace thing.