Commandos 2/Script

Much modding is done by editing scripts, which are interpreted at runtime by the games. The following is a description of the syntax of script files in.

Comments
A comment starts anywhere with a hash (#) and all subsequent characters to the end of the line are ignored. [   # Wait 4 ticks.w    .TIMER 4.0 ]

Literal values
Number literals, string literals, arrays and structures.

Number
A number literal is a floating-point number; a sequence of digits using "." as decimal separator. Negative numbers are prefixed with a minus. 123

String
A string literal is a sequence of characters. FOO.BAR

List
A list is an ordered collection of values. They are constructed as a whitespace-delimited list of values between a pair of parentheses. (   VALUE_1    VALUE_2    #...    VALUE_N )

Record
A record is a list of properties. They are constructed as a whitespace-delimited list of field-value pairs between a pair of square brackets. [   .FIELD_X VALUE_X .FIELD_Y VALUE_Y #...   .FIELD_Z VALUE_Z ]