Skip to main content

The First Node

To start writing your story, open your project in the web editor.

Setting Up the Start Node​

Your project already has a Start chapter β€” this is the entry point. We'll use it to declare variables and jump to the first story node.

Create a new chapter by clicking the + button in the sidebar and name it escape.

Tip

Type \\ in the editor to quickly insert commands like <<jump>>, <<declare>>, and others.

title: escape
checkpoint_name: "Escape"
---

===

This is our starting node. We added the checkpoint_name parameter so the player's progress will be saved here.

Linking to the Start Node​

Go back to the Start chapter. We'll declare variables here and link to our escape node:

title: Start
is_entry_point: true
---
// Game vars

// Jump to your start node
<<jump escape>>
===
Tip

Keeping the Start node for variable declarations is a good practice. It keeps your story nodes clean and focused on the narrative.

Writing the Story​

Switch to the escape chapter and write the first dialogue. In this node, the agent reports that they've been exposed, and the player will need to make a choice to help them escape.

title: escape
checkpoint_name: "Escape"
---
Urgent! I've been exposed. I need to get out of here fast.
-> What happened?
-> How can I help?

No time to explain, just help me get out of here!
-> Where are you now?

I'm in Lab #15, but they've already found me. I need an escape plan.
===

As you can see, we give the player a choice of responses, but these replies don't affect the progression of the story. This allows the player to feel part of the story.

However, we can't do this for too long, as the player will get bored. Let's add a real choice that will impact the storyline.

Tip

Break up messages with blank lines to make the text more readable. Press Enter twice in the editor to start a new message.

...

I'm in Lab #15, but they've already found me. I need an escape plan.
-> Use the ventilation
<<jump escape_ventilation>>
-> There are scaffolding outside the window; you can climb down them
<<jump escape_scaffolding>>
===

First Choice​

We added two options, each directing the player to a different node. Create two new chapters for them by clicking + in the sidebar:

Chapter: escape_ventilation

title: escape_ventilation
---
===

Chapter: escape_scaffolding

title: escape_scaffolding
---
===

Let's remember the player's choice for future reference. Go back to the Start chapter and declare the variable:

title: Start
is_entry_point: true
---
// Game vars
<<declare $escape_choice = ''>>

// Jump to your start node
<<jump escape>>
===

Now set the variable in each choice chapter:

escape_ventilation:

title: escape_ventilation
---
<<set $escape_choice = 'ventilation'>>
===

escape_scaffolding:

title: escape_scaffolding
---
<<set $escape_choice = 'scaffolding'>>
===

The story can get more complex. For instance, let's say the agent gets injured on the scaffolding, and we want to decrease their health. Add a $health variable in the Start chapter:

title: Start
is_entry_point: true
---
// Game vars
<<declare $escape_choice = ''>>
<<declare $health = 100>>

<<jump escape>>
===

And in escape_scaffolding:

title: escape_scaffolding
---
<<set $escape_choice = 'scaffolding'>>

Alright, I'm climbing down the scaffolding.

<<wait 5>>
<<set $health = $health - 10>>
I've been shot! Damn, that was close. I need to move faster.
-> Go back to the lab, we'll try the ventilation
<<jump escape_ventilation>>
-> Keep climbing down

...
===

We added <<set $health = $health - 10>>, which reduces the health variable by 10. The <<wait 5>> command adds a delay before the next message, simulating the time needed to climb down.

Testing

Use the debugger (β–Ά) to test your story. You can modify variables on the fly in the Variables panel to test different branches without replaying the entire story.