Nodes

A node is a small section of text, that represents a single conversation or interaction with an NPC. Each node has a title, which can be used to run that node in a DialogueRunner, or to jump to that node from another node.

You can think of a node as if it was a function in a regular programming language. Running a node is equivalent to calling a function, and it is not possible to start execution in the middle of a node/function. When a function becomes too large, we will usually want to split it into multiple smaller ones – the same is true for nodes, when a node becomes too long it is a good idea to split it into several smaller nodes.

Each node consists of a header and a body. The header is separated from the body with 3 (or more) dashes, and the body is terminated with 3 “=” signs:

// NODE HEADER
---
// NODE BODY
===

In addition, you can use 3 (or more) dashes to separate the header from the previous content, which means the following is also a valid node:

---------------
// NODE HEADER
---------------
// NODE BODY
===

A node is represented with a Node class in Jenny runtime.

Body

The body of a node is where the dialogue itself is located. The body is just a sequence of statements, where each statement is either a Line, an Option, or a Command. For example:

title: Gloomy_Morning
camera_zoom: 2
---
You  : Good morning!
Guard: You call this good? 'Tis as crappy as could be
You  : Why, what happened?
Guard: Don't you see the fog? Chills me through to the bones
You  : Sorry to hear that... 
You  : So, can I pass?
Guard: Can I get some exercise cutting you into pieces? Maybe that'll warm me up!
You  : Ok, I think I'll be going. Hope you feel better soon!
===