Working With the Graph
The only reasons you'd want to work with the dialogue graph is if you'd like change the graph itself, create your own dialogue window, or update the existing dialogue window. However, there's no simple method at the time.
Getting Nodes
To change any data in a dialogue graph, you would have to access the nodes. You can get the full list of nodes with the DialogueGraph.nodes
field.
Getting and Converting
To get a specific node by ID, you can do the following:
The QTNode class is a base class for all nodes. You will have to convert the node to a specific type before working with it.
Getting the Next Node
To follow the correct dialogue node order, you can use the GetNextNode
method. This method will start the dialogue graph at the initial node. Behind the scenes, the dialogue graph will set the returned node as the current node. So, you can get the next node through connections whenever the method is called again.
Getting the Next Node Without Setting as Current
If you'd like to get the next node without setting it as the current node, use GetNextNodeWithoutChange
.
Creating Nodes
Creating a node will differ slightly for each node type, but the pattern is the same.
Example
Here's an example of how you can create a dialogue node with a connections to other nodes.
All node fields you see in the Editor Window for each node are public. You can edit them freely.
Adding to a Graph
Removing from the Graph
Future Plans
This process will be simplified in the near future. See Procedural Generation.
Last updated