Main Page
Definitely out of date, pending rewrite.

Stage

Stage is the system itself, the stage processes "scenes" in a "play".

Scene

Scene is what the stage processes, a scene consists of the following special characters.
] - Output, prints text following the character until a newline.
> - Action, prints a link that when clicked runs the preceding subscene, if no subscene is present will stop processing the current subscene (blocking action).
? - Evaluate, evaluates expressions following the character runs the preceding subscene if unconsumed subscene exists, otherwise stores the result in status.
! - Execute, executes expressions following the character, does not store result.
: - Check, compares value following the character with status and runs the preceding subscene if value and status are equal.
@ - Marker, pushes its position to return stack.
{ - Subscene begin, start of subscene.
} - Subscene end, ends subscene.
. - End, ends processing of current (sub)scene.
/ - Comment, ends at newline, for multiline comment use /* ends at */.

Expressions

Expressions are functions calls taking the form (func x y) or func(x y) which can be ran by ? and !
The characters # and ' are special, the first creating a list #(x y z) and second wrapping next value in a (sym) call '(clear) -> (sym (clear)).
Unset variables always read as 0.
(+ x y...) - Addition, returns the value of x + y, takes any number of arguments (adding all arguments together).
(- x y...) - Subtraction, returns the value of x - y, takes any number of arguments (subtracting rest of arguments from first).
(* x y...) - Multiplication, returns the value of x * y, takes any number of arguments (multiplies all arguments together).
(/ x y...) - Division, returns x / y, takes any number of arguments.
(> x y) - Greater than, returns the result of the comparison x > y.
(< x y) - Lesser than, returns the result of the comparison x < y.
(= x y) - Equals, returns the result of the comparison x == y.
(get var/ref) - Get, returns the stored value of var/ref.
(set var/ref x) - Set, sets var/ref to x.
(do x...) - Do, reads values of arguments, does lists recursively, returns nothing.
(not x) - NOT, returns the negation of x.
(and x y...) - AND, returns the logical AND of x and y, takes any number of arguments.
(or x y...) - OR, returns the logical OR of x and y, takes any number of arguments.
(+1 var) - Increment, increments var by one.
(-1 var) - Decrement, decrements var by one.
(if cond x y) - If, if cond is true returns x else returns y.
(rand min max) - Random, returns random integer between min and max (inclusive).
(rand lst) - Random, returns reference to random entry in a list.
(print x...) - Print, prints x like output in scene, takes any number of arguments (concatenates arguments).
(sym x) - Symbol, returns argument as is (without getting variable value).
(list x...) - List, returns a list containing all arguments.
(push lst x...) - Push list, adds arguments x to list lst.
(pop lst) - Pop list, removes last entry from list lst and returns it.
(first lst) - First in list, returns reference to first entry in list lst.
(last lst) - Last in list, returns reference to last entry in list lst.
(rest lst) - Rest of list, returns a copy of the list without the first entry.
(index lst num) - Index in list, returns reference to entry at index (0 indexed) in list lst.
(length lst/str) - Length, returns length of list lst/string str.
(reset) - Reset, restarts the play from start.
(return) - Return, returns to the beginning of current scene.
(back num) - Back, moves scene processing back in return stack (actions and markers push to return stack) by x (if omitted defaults to 1).
(stop) - Stop, stops the scene (actions and scene change allow continuation).
(clear) - Clear, clears the screen.
(scene-push scn) - Scene push, changes scene to scn.
(scene-pop) - Scene pop, returns to previous scene.
(scene-jump scn) - Scene jump, jumps to scn and returns after finishing.
(scene-change scn) - Scene change, changes scene to scn and clears scene stack.

Play

A play is a collection of scenes, the beginning of each scene is marked with START name and each scene must end with a .
If the scene isn't ended the next one will be read as well.
A scene named "start" is used as the starting scene, if no such scene is present the file starts from beginning.

Examples

Try these here!

Basic

Logic

Play