The simple form
A.yml in Dialogs/ with everything inline. Fine for short conversations:
nodes: key if you prefer the extra structure. Both parse the same.
One file per node
For anything bigger, register the dialog in a file directly inDialogs/, then put its nodes in a subfolder named after the dialog id. A goto: greet then calls bob_talk/greet.yml like a function:
Mixing both
Inline nodes and folder files merge freely. Keep the common nodes inline and split out the long branches, or the other way around. If the same node name exists in both, the file wins and a warning is logged.A folder with no declaration
A subfolder works on its own, with no entry in anyDialogs/*.yml. The entry node is picked in this order:
- A
dialog.ymlmeta file in the folder, if it declaresstart:. - A
start.ymlnode file. - The alphabetically first file in the folder.
start.yml in it.
YAML gotcha: conditions with braces
Conditions that take attributes use braces, and braces mean something else in YAML’s inline list syntax. Write conditions as block lists:conditions: [isnight] works.
