SC3 Config File

From Soldat Community Wiki
Revision as of 23:41, 28 July 2013 by Falcon (talk | contribs)
Jump to: navigation, search

Config file is divded into three sections: Config, SearchPaths and Defines. First one defines all the basic properties, 2nd paths in which to search all the unit/include files and 3rd pre-defines come preprocessor defines.

Config

Key Description Type Required Default value
Name The name of the script. Appears everywhere in console output that is related to that script (compile messages, exceptions) String Yes none
MainFile The name of entry file for the script. String No main.pas
Debug Whenever script should run in debug mode or not. In debug mode, debug symbols are also compiled and used during runtime. This allows displaying line and unit name in case of exception. Boolean (1 or 0) No 0
Sandboxed Sandbox level for the script. possible values:
  • 0: access to entire harddrive
  • 1: access to entire soldatserver/ folder
  • 2: access restricted to script's data folder (soldatserver/scripts/<script name>/data

This value can be constrained by server.ini file.

Integer No 2
AllowDlls Whenever the script is allowed to load external dlls. This value can be constrained by server.ini file. Boolean (1 or 0) No 0
AllowIniEdit Used only if Sandboxed is set to 1. Determinates whenever script is allowed to read/write soldat.ini and server.ini Boolean (1 or 0) No 0
Gamemod Whenever the script is a gamemod. Gamemod script mark server as gamemod server and thus make it displayed as such in the lobby Boolean (1 or 0) No 0
Legacy Whenever the script should run in legacy mode or not. Legacy mode adds all interface and events known from ScriptCore2. Usfeul for migrating the scripts. Boolean (1 or 0) No 0

SearchPaths

[SearchPaths] section defines all the folders that should be scanned for unit files. Paths should be delimited by enter, each path in new line. Paths can contain "../" which allows to make script use some "shared" units folder. Example:

 [SearchPaths]
 /players
 /players/tasks
 /game/
 ../shared

Defines

[Defines] section defines preprocessor constants that should be exported to the script. Besides those defined here, script will also recieve WINDOWS/UNIX constant depending on operating system it runs on. Defines should be enter delimited, each define in new line. Example

 TEST
 DEBUG
 FANCY
 lowercasedarealsook