How to use the Dialogue Editor plugin

Hey, Devs! I thought it’d be prudent to provide a tutorial on how to use the new Dialogue Editor plugin, found here: https://www.roblox.com/catalog/847896485/Roblox-Dialogue-Editor

Buttons

Let’s start with first things first: what do the buttons do? Well, there are three buttons:

image

Dialogue Editor

This is the main method of interaction within the plugin. When you click the button, it will attempt to load the selected RobloxDialogue object. If you’re not selecting one, it’ll try to find it recursively down the hierarchy of the object you selected. If it doesn’t find one, it’ll warn you appropriately.

Create Dialogue

This button creates a nearly-empty RobloxDialogue in the selected object. Keep in mind that a dialogue can be properly parented to three places (technically, they can be parented anywhere, but the default interface expects them in these types of locations):

  • A part
  • A model with a “Head” object
  • Any model with a PrimaryPart

Once you create the dialogue, you will be prompted to begin editing it.

Reinstall Scripts

The Dialogue Editor plugin puts three objects in three locations:

  • RobloxDialogueServerScript in ServerScriptService
  • RobloxDialogueClientScript in StarterPlayer.StarterPlayerScripts
  • RobloxDialogue in ReplicatedStorage

If somehow you accidentally delete, move, or edit these things, pressing this button will reinstall them all. This is also the easiest way to update these scripts. Let’s talk about what’s legally change-able in the hierarchy of the RobloxDialogue folder:

image

The following objects in this hierarchy can be changed, and ReinstallScripts will not edit or replace them unless they do not exist:

  • Guis
  • Interfaces
  • ClientInterface
  • DynamicTextFunctions

Thusly, any changes made to Remotes or Class (and its children) will be overwritten every time you press this or any other button on the plugin. Do not make changes to these!

The Editor Itself

Here’s what the editor looks like immediately after opening a brand new dialogue:

If you’re the explorer type, hovering over any of the UI elements on this screen will give you a helpful context hint, describing what you can do. Let’s first go through each of the buttons on the top left.

The Buttons

Add Prompt

Adds a Prompt to the dialogue at the center. A Prompt is what the NPC says to the player. Prompts can have a special form called “InitialPrompt.” An InitialPrompt is one of the Prompts that can start a conversation (that is to say, this is the first thing that a NPC says to you at the beginning of the conversation). There can be multiple InitialPrompts, and we’ll talk about that later.

Add Response

Similar to Add Prompt, this button adds a Response to the dialogue at the center. A Response is what the player says to the NPC. Responses have no special forms. We’ll talk about them more in detail later.

Center View

In case you get lost on the screen, you can re-center your camera on the first InitialPrompt. This would be a good time to mention that holding middle mouse button on the background and moving your mouse will cause the Camera to pan, allowing you to have a dialogue tree of virtually infinite size.

Dynamic Text Functions

Any dialogue text surrounded by the angle brackets (’<’ and ‘>’) will attempt to call a Dynamic Text Function. These functions are global to your entire place. If you click this button, you will be shown the table of Dynamic Text Functions. There is one by default for an example: PlayerName. If, for example, you set the InitialPrompt’s text to “Hello, !” then it would (in my case) be shown to me as “Hello, Davidii!” These functions are very useful.

Conversation Data

This allows you to store arbitrary data at the conversation level. When I write a tutorial documenting custom interfaces, we’ll talk about it more. For now, know that, when using the default interface, a key of “Title” will set the title of a conversation, and a key of “PortraitImage” will set the portrait image in a conversation. Note that individual dialogue nodes also have their own data that will overwrite conversation-level data. This allows you to be as specific as you want to be without being burdensome.

Save & Exit

This is pretty self explanatory. It saves the changes you’ve made to the conversation and exits the editor.

Trigger Distance

Sets the distance at which this conversation will be automatically triggered for an approaching player. If zero, it won’t automatically trigger at all.

Conversation Distance

Sets the range at which this conversation can be had. If a player walks farther than this far away from the NPC, then the conversation will end.

Dialogue Nodes and You

This dialogue system has 2 (sort of 3) types of dialogue nodes:

  • Prompts
  • InitialPrompts
  • Responses

They have some shared features. We’ll discuss them here:

Features all Nodes Share

  • Line: the Line is the text within the node. Basically, it’s either what the NPC says to you or what you say to the NPC. It can contain dynamic text, which is explained above in “Dynamic Text Functions.” Clicking in the large text area of the node will expand it and let you edit the Line of the node.

  • Condition: a Condition is an arbitrary Lua function that returns a boolean. It determines whether or not this node is available. For example:
    image
    The first response does not have a Condition, so it will always show up as an option when the NPC says “Hello, world!” at the beginning of a conversation. The second response, however, does have a Condition, so it will only show up if the Condition returns true. Conditions can also be applied to Prompts, but they act a little differently, so we’ll talk about that later. Clicking the question mark button on a node will allow you to create and edit a condition. If you want to remove it, you can hold left shift and click the ‘X’ button that appears above the question mark button.

  • Action: similar to the Condition, an Action is an arbitrary Lua function. However, its return type is irrelevant (as it isn’t used). This is merely a place for you to run code whenever the node is encountered. A Response will run its action when it is clicked by the player, and a Prompt will run its action when shown to the player. You can create and edit the Action by clicking the exclamation point button. If you want to get rid of it, then hold left shift and click the ‘X’ button that appears above it.

  • Data: the arbitrary data for nodes is more important when you make your own custom interface, so suffice it to say that this is just a container for data. I’ll talk about it more when I make a tutorial on making your own custom interface. If you want to edit it, just click the “Edit Data” button.

  • Delete Button: click this ‘X’ button in the top-right of the node in order to delete it. You’ll be prompted first, so don’t worry about doing this accidentally.

  • Add Connection Button: this '+" button allows you to drag and drop a connection onto another node. Prompts can link to Prompts and Responses, but Responses can only link to Prompts. In addition, if you hold left control before clicking and dragging on this button, releasing will, instead of adding a connection, will create a new, connected node at that location. This is handy shortcut for making quick back-and-forth conversations. This quick-create method will create Prompts from Responses and Responses from Prompts.

  • Break Parent Connections Button: This is only visible while holding left shift. This ‘X’ button on the far left edge of the node allows you to delete all connections between it and its parents.

  • Break Child Connections Button: This is only visible while holding left shift. This ‘X’ button that appears over the normal ‘+’ button of the Add Connection Button allows you to delete all connections between this node and its children.

Responses

To re-iterate, a Response is what the player says to the NPC. They’re the simplest kind of node, and their only unique property is Order. Order determines, well, the order in which they show up in your interface. It’s in ascending order, so the highest Order Response will show up last.

Prompts

Prompts are where this dialogue system really shines. Prompts have a number of unique features, which we’ll talk about here:

  • Priority and Conditions: take a look at this example dialogue graph:


    Here we have not one, not, two, not even three InitialPrompts, but four. How in the world does the system decide which one to use? Well, notice that each of them has a Priority, and all but one of them has a Condition. In order to decide which prompt to use, the system traverses them in descending order of their Priority and uses the first whose Condition returns true. In this way, you can have the NPC greet and respond to the player in different ways depending on conditions in game. In this graph, the NPC has a greeting for:

    • Having never met you
    • Having met you, but you not having accepted his quest
    • You having accepted his quest, but not completing it
    • You having completed the quest

    The conditions of each of those four InitialPrompts lines up with these heuristics, allowing a conversation with this NPC to be a living, breathing, changing conversation that changes based on how the player acts. Also notice in this graph the clever reuse of old responses and prompts to save on time. Try following all of the possible conversation paths as an exercise.

  • InitialPrompt or Nah: Prompts have a special Star button that allows you to toggle their state as an InitialPrompt or not.

Other Features

Camera Panning

You can move the camera in any direction by holding down middle mouse button on the background and moving the mouse. I mentioned this before, but here it is again, in case you missed it.

Multi-select

You may have noticed that clicking the top bar of any node selects it. Holding left control allows you to select more than one (and reselecting a selected node while holding left control will deselect it from the group). In addition, you can left click and drag on the background to box select multiple nodes.

Thanks!

I’m really looking forward to seeing what you all can make with this system. Please share below, and also ask any questions you have that I haven’t answered in this tutorial and I can certainly edit the answers in.

83 Likes

Thank you very much for writing this! Will this just be a plugin and a model to take or will it soon be implemented into Studio?

This is very useful but sadly I still find it hard to follow right now, probably a video with a practical example would make this make much more sense.

2 Likes

Pretty sure its only a tutorial specific to this plugin and not an official Studio item. I’m under the impression that it is made for developers to be able to create dialogues more easily and be able to visualize how they interact.

Right now, you have to insert many DialogChoice objects as well as manage and keep track of all outcomes and responses yourself; sometimes you get lost when you have to do that.

EDIT: Not exactly sure how this works yet since I haven’t tried it myself, but I believe its for custom dialogues and not the one given by ROBLOX, so what I said in the second “paragraph” is probably irrelevant.

I second this. I’m more of a visual learner and it would probably help.

1 Like

On the main thread David said once it’s out of Beta it will likely become the main dialogue system.

1 Like

Thanks for the feedback! I’ll see about making a video tutorial soon.

Yes, I’m aware of how the current dialog system works. I was just wondering if this was going to replace the current one because he was tasked to fix the dialog system while he was interning at Roblox. I’m under the impression that they might replace the current system with this one, similar to how they replaced the core chat system with a Lua based one not too long ago.

1 Like

Old dialog system won’t be “completely” removed, but may be hidden in studio. Goal of this project make that happen!

1 Like

Video tutorial coming soon.

5 Likes

A post was merged into an existing topic: Off-topic and bump posts

Whenever I try to edit my dialog it just freezes and says roblox studio needs to quit.

The resource in this tutorial is not being actively maintained.

See this topic for more info: Official Roblox Dialogue System and Dialogue Editor Beta - #79 by sasial

1 Like

This is a fixed version of the plugin: https://www.roblox.com/library/2921269188/Glossys-Dialog-Editor-Fork

2 Likes

It was working fine before but now I can’t make an action the script doesn’t save for some reason, also the game is in team create idk if that would have anything to do with it.

If you use the draft feature or whatever its called, make sure to save the draft

When I go to the view tab draft isn’t there for some reason.

Weird, I believe the draft window shows up when you have edits to a script. Also drafts are only in team create, probably should have sent it in the original post

The draft window doesn’t show up at all, And the game is in team create.

1 Like

When I make an action script it’s called “[DELETED] Action” for some reason.
image

1 Like