Studio

FolioTier 1

end

Terminate the playthrough.

Use end to close the playthrough at any point in your script. When the engine reaches it, the session stops and control returns to whatever the host application shows after a finished story - a credits screen, a chapter select, or simply the title. It is the narrative full stop: place it wherever the story is genuinely over for the player on that branch.

Every branch that does not loop or hand off to another scene needs to reach an end, or the engine will run out of instructions and halt with an error. If you have multiple endings, each one gets its own end - there is no limit on how many times it appears across a script, only the rule that each reachable path must eventually arrive at one. Do not confuse it with scene transitions: moving to another scene continues the playthrough, while end terminates it entirely.

Parameters

This construct takes no arguments.

Canonical example

Folio
narrate "And that was the last she ever saw of him."
end
Ren'Py
"And that was the last she ever saw of him."
return

end terminates the playthrough - the player sees the credits / end screen / next-episode CTA depending on the project's configuration. Reaching end from inside a called scene still terminates: the call stack is discarded.

Notes

Folio splits the responsibility Ren'Py overloads onto return. In Ren'Py, return at the top level of start ends the game; inside a called label it pops the stack. Folio names the two cases separately - end for "the playthrough is over", return for "the called scene is finished, resume the caller". The disambiguation makes the creator's intent visible in the Story Map (an end node has no outgoing edges; a return node draws an edge back to its callers).

The importer translates Ren'Py's terminating return to end when it's at the top level of start (or any label that's only ever entered as the entry point), and to return when it's inside a called label. This relies on call-graph analysis the importer runs during the deterministic pass.

A project can have multiple end lines - one per ending. The "which ending did the player reach?" record is part of the save state, used by the gallery and replay surfaces.

Authoring surface

end is a first-class entry in the Forge timeline's insert palette (category Flow). The inline composer takes a single optional "Only if" guard expression - blank emits a bare end. The inspector form preserves the guard on round-trip so end if game-over survives edits.

See also

  • return - return from a called scene without ending the playthrough
  • scene-flow - full routing vocabulary