Node (Dialogue entry) template feature?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Node (Dialogue entry) template feature?

Post by joeylu »

Hi Tony
Often when I'm editing conversations, adding all kinds dialogue entries, I have found a need that if I could define some node templates.
For instance, There are 3 response menu (nodes) and I use a script to control them to show/hide based on runtime logics. And when all these 3 entries are set to hide (false in condition), I need to turn the forth node to show (by default it is set to false in condition).
I use the technic by adding a field in that default node, with a constant title "DEFUALT" so my script can rigorize it.

Everything works fine, the only thing is that such "DEFAULT" nodes, or other similar like "IGNORE, SWITCH, etc" are used all over the place across conversations, if would be nice if there's a template for different kind preset nodes, even better if I can differ them with an icon or background colors

Not sure if this is in your plan :)
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Node (Dialogue entry) template feature?

Post by Tony Li »

You can add this functionality with a bit of scripting. See Customizing the Dialogue Editor.

Assign your own methods to the static C# events DialogueEditorWindow.customDrawDialogueEntryInspector and DialogueEditorWindow.customDrawDialogueEntryNode.

In your DialogueEditorWindow.customDrawDialogueEntryInspector method, you could add buttons or a dropdown to automatically set the Title to DEFAULT, IGNORE, etc.

In your DialogueEditorWindow.customDrawDialogueEntryNode method, check the node's Title and draw something additional on the node to let you know that it's a DEFAULT node, etc.
Post Reply