FANDOM


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 Commandos 2: Men of Courage.

CommentsEdit

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 valuesEdit

Number literals, string literals, arrays and structures.

NumberEdit

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

123

StringEdit

A string literal is a sequence of characters.

FOO.BAR

Compound valuesEdit

ListEdit

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
)

RecordEdit

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
]
Games
Icon bel


Icon 2mc Icon 3db