Outfront script tutorial

Outfront Script (OFS) is a script language used by Outfront games, ie. Men of War. The code is similar to C++ and Java. Extracted code from the executable files confirm this, because they contain uncompiled code linking to files with a  extension (tipical for C++ projects). But as most of the uncompiled code is only used to outsource variable values, basic knowledge in C languages can be helpful, but is not presupposed. The basic code structure will be explained below.

Documentation
If you create files with a larger ammount of commands or if you declare own functions, you should create documentations between or in the end of code lines. There are two possible ways of doing that. In Outfront games, he most common one is to add any custom text after the line-finishing semicolon. All text written after this letter will be ignored by the compiling application. Make dure you do not use it elsewhere in the line where you do not want it to end.

Schematically, this would mean: ; ************************************ ; +++ THIS IS A CODE DOCUMENTATION +++ ; ************************************ Examples can be found in some code files, as for expample in the *.set -file : ; vehicle with tankmans (define "v"    ("generic_v" c(%c) sc(%sc) t(%t %s) g(%g) i(%i) b(%b) cw(%cw) cp(%cp))     {content "* ( mp/%s/tankman:%n )"} )

Inclusion
You can include other script files in this one using the  function. This decleration is done in the beginning of a script file. The syntax goes as follows,  stands for the external script file (mostly using the *.inc file extension). Include( MyScriptFile )

SDL
"SDL" (Simple DirectMedia Layer) is a cross-platform open source and free media files library which is used by many computer games because of its large compatibility and its variousity of features.

Men of War supports SDL library in some cases. If you want to use the operations available in SDL only, you have to refere to the SDL resource. This can be done by adding a single line to the beginning of a script file: ;SDL