Skip to content
EpicDraft Docs

Game Authoring

Set a script's format to Game (see Story Modes) and EpicDraft becomes a branching-narrative tool: scenes become nodes, choices connect them, and you can play the result without leaving the app.

The Game tab

On a Game-format file, the file panel gains a Game tab with three views:

  • Map — a canvas of your story's nodes and branches, so you can see the shape of the whole thing.
  • List — every node with its choices, in reading order.
  • Play — an in-app preview that runs the branching script with live variable state, so you can playtest as you write.

The panel flags structural problems as you go: dead ends, unreachable nodes, and broken targets. On a phone the same views open as their own screen from the file drawer's Game row.

A node with no choices is a dead end until you say otherwise. When the story is meant to stop there, mark the node as an ending: select its heading and tick Ending in the Game logic popover, or press Mark as ending beside the dead-end badge in the List. Endings show as endings on the Map and in Play, and the warning goes away. The mark travels with the file as a [[@data {"ending":true}]] note above the heading.

Game logic on elements

Logic lives on elements, edited through the floating toolbar's Game logic popover:

  • An If condition — the element only appears when the condition holds.
  • A Set assignment — reaching the element changes a variable.
  • Per-choice conditions — a choice only offers itself when its condition holds.

Values are validated as you type, so a typo'd variable or malformed expression is flagged immediately.

Every line that carries logic shows a small tag in the margin beside it — if has_key, set nerve+1, choice — so you can see the branching on the page without opening anything. The tags are chrome: they never print or export.

Playing your story

Play runs the branching script the way a player would see it, as script rather than paragraphs, with the live variables listed underneath:

  • Back returns to the previous node with the variables exactly as they were on entering it.
  • Restart starts over from the first node with declared variables at their starting values.
  • Jump to opens any node directly. It skips the choices that lead there, so their variable changes are not applied.
  • Hidden lists the choices the current node has that the state is hiding, each with the condition it needs. They also appear on their own when every choice is closed.
  • Save and Resume keep one playthrough per file on this device, so a long story can be tested across sittings.
  • Reveal opens the current node in the editor.
  • Tick or edit a variable at the bottom to test a gate without replaying to it.

Variables

The Game tab's Vars view lists every variable the script sets or reads, with its type, how often it is used, and a warning when a condition reads a name nothing ever sets — almost always a typo. Declaring a variable there gives it a type and a starting value: every playthrough begins from those values, and the If fields offer the declared names as you type. Anything the script assigns shows up in the table on its own; declaring is only needed when the starting value matters or you want the name on record. Declarations are saved with the file.

Choices and targets

A choice is a line that sends the player to another node. To add one, select a line and press Add choice in the floating toolbar, pick where it goes, and give it a label. You can point it at a node you haven't written yet; the Game tab flags it as missing until that heading exists. Two more routes do the same thing: type [[ and pick a scene with Option+Enter, or drag from one node to another on the Game tab's Map.

The Game logic popover shows where an existing choice goes. Picking a different destination asks you to confirm before it rewrites the link.

A choice branches to another scene — either a scene in this script, or a section of another script in the project. That second form is how a story spreads across multiple files: each chapter can be its own script, with choices jumping between them.

Script includes

You can embed another script — a sub-script page in the Library — into this one. The editor shows the included content read-only inline, and print, statistics, and export all count the expanded content. The file keeps the reference, not a copy, so editing the sub-script updates every place it's included.

Includes guard against cycles and runaway depth, and a broken include keeps its line in the script rather than vanishing — you'll see what's missing instead of losing your place.

Includes work in every format, not just Game — a documentary can embed a segment the same way.

Exporting a story graph

Save a Copy → Story graph (.game, Experimental) produces branching data suitable for a game engine. See Using Files for the other export formats.

Craft checks

Game-format files get their own entries in the Review tab's Issues list: single-choice nodes, duplicate choices, unset variables, and broken include targets. See Statistics.