My favorite state is the flow 🌊 . My second favorite state is walking 👟 👟 .
The options are followed by a node id to move the dialog along the defined flow.
simple (yes/no) for clarity
output example json:
{
"type": "dialog",
"id": "Dialog Line",
"text": "Hello, world!",
"yes": "Action Node",
"no": null
},
{
"type": "action",
"id": "Action Node",
"object": "Console",
"function": "activate",
"next": "Dialog Line.001"
},
{
"type": "dialog",
"id": "Dialog Line.001",
"text": "console is active, continue?",
"yes": "Dialog Line.002",
"no": "Dialog Line.003"
}
This was followed by adjustments to include a list of functions assumed to be present on objects
Pictured here is a flow with a mixture of dialog and action nodes.
This scans the scene, if an object instance "elevator" the action node assumes it has an up() and down() method we can call from the dialog tree.
Something similar is done for doors and consoles.
today's experiment
building custom node types and a dialog editing window/context to
create branching npc conversations
the nodes are walked to generate a json file used by the engine