Here is a list of the commands used by the game engine. The game is structured like this. The GAME is top level object with a collection of PAGEs and VARIABLEs under that. A PAGE is made up of TEXT, OPTION, LINKs, etc. Things described in <> brackets are optional.
GAME VARIABLE PAGE TEXT CONDITION OPTION CONDITION LINK EXPRESSION PRE POST
GAME::The Dungeon|Can you survive a day in the dungeon?|Shaun Pryszlak|1.0
This describes the game as a whole. It contains the name of the game, a brief description of it, the author and its version number.
This describes one page in the game. The first parameter is the page number and the rest are optional. There are Lose and Win flags to indicate the user has either won or lost. The “bypass” page number make the game go directly to that page without the user selecting anything. Finally there is a custom prompt. This can be tailored to the options (how big, which direction, who to talk to).
TEXT::You see a big box
This is a piece of text to display on the screen. All text for a page can be considered as a single paragraph to begin with. A sentence could be made up of three separate TEXT blocks. Paragraphs are added later with the *NL* token during formatting. Same with colour, etc.
OPTION::Light your torch|1
One of the users choices. It contains the text to display and the page to go to.
LINK::1|the body|It looks like he has been dead a while.
If the text has hyperlinks in it then this is the collection of links. The numeric id is used to identify the link and the first bit of text is what is displayed on the page. The second bit of text is either a description that is displayed in response to the click or a hyperlink. You can attach an EXPRESSION to a LINK so clicking it affects the state of the game. It is included in the text version of the game but makes more sense in a mobile or web version.
VARIABLES are bits of data that store the state of the game. They are either FLAG (true/false), STRING, (whole) NUMBER or DECIMAL (number). The name of the VARIABLE is followed by the type and its initial value. You can’t mix variables and values and a STRING should only ever contain things like “Bruce” or “The River”.
CONDITIONs can be attached to TEXT and OPTIONs to show or hide them. They consist of an expression made up of VARIABLEs and numbers that evaluates to a true or false value. I think where CONDITIONS are used, you can have more than one and their results are all ANDed together.
EXPRESSION, PRE and POST
These are three commands that are used to change the values of VARIABLES. The three are all the same and are just used in different places. EXPRESSIONs are attached to LINKs while PRE and POST are attached to PAGEs. PRE is evaluated before a pages text is generated while POST is evaluated after the text is done. You can usually just get away with using PRE. The first parameter is the VARIABLE you want to affect while the second part is its new value. The above example increments a VARIABLE by 10.