Associated function (on the preceding object or location).
{+name
Global function.
{*name
Explicitly named function (no auto-suffix).
{a : b : c
Multiple names for the same function.
}
Closes a function.
execute fn<arg0<arg1…
Run a function with arguments. Available inside as arg[n] (integer) and string_arg[n] (string).
call fn
Like execute, but does not error if the function is missing.
return [value]
Exit the function. Default return is true.
@fn
Call-count of fn. Bare @ is the running function's own count.
Data Definitions
object Label : Name1 Name2…
plural PluralName1…
has Attribute1 Attribute2…
short Article Description
definite DefiniteArticle
long Description | function
parent ItemLabel
mass N | heavy | scenery
capacity N
player
static
location Label : Name1 Name2…
<direction> DestLabel
short Article Description
has Attribute1…
Where the player is moving to (set before +movement).
Flow Control
if e1 [: e2…]
True if any expression is true.
ifall e1 [: e2…]
True if all are true.
ifstring e1 [: e2…]
String version of if.
ifexecute fn
True if fn exists and returns true.
else / endif
Branch / close.
endall
Close every open if/ifall at once.
loop [var] … endloop
Iterate every defined object.
select obj … endselect
Iterate the children of an object.
repeat … until e
Loop while e is false.
while e … endwhile
Loop while e is true.
iterate csv … enditerate
Walk a CSV file row by row.
update csv … endupdate
Walk a CSV file with write-back.
break
Exit the innermost loop.
return [v]
Exit the function.
Operators
= == != <>
Integer equality / inequality.
> < >= <=
Numeric comparison.
has / hasnt
Attribute is / isn't set on an object.
is / isnt
Object is / isn't in a scope (*held, *here, etc.).
grandof / !grandof
Tests deep parent relationships.
locationof / !locationof
Left is the enclosing location of right.
childof / !childof
Left is a direct child of right.
Common Verb Functions
Define {verb_label for an object-specific response, or {+default_verb for a global override. See Appendix B of the Author's Guide for the full list of 216 verb functions.