ScriptCore v2
Important v2 Features:
- Multiple Script Loading (No need to use combiners!)
To load multiple scripts into your server, all you need to do is create a new folder in your server's /script/ folder, and copy the *.pas files and Includes.txt into the that new folder. The script will then automatically load when you start the server next. Create more folders in the /scripts/ folder to load more scripts. Each loaded script will NOT be able to interact with each other's functions/variables. NOTE: You can still use the single-script engine by placing all your *.pas files directly in the /scripts/ folder. But if you have any sub-folders in that folder, the v2 engine will be loaded.
Example Directory Structure:
- /soldatserver/ | - > /scripts/ (Any *.pas files located here will not be loaded) | - > /DefaultScript/ (Core.pas/NetworkCore.pas etc will be here) | - > /Sub Admin/ (SubAdmin.pas Includes.txt etc will be here)
With this structure, "DefaultScript" and "Sub Admin" will both be loaded into the SoldatServer. Using multiple scripts will increase server CPU usage and memory usage, so please be considerate if you use a rental company. System Admin's may specify a maximum number of scripts to load using the -sl parameter when starting a SoldatServer. When releasing a script, please include it as a ZIP file and have the ZIP containt a folder named "MyScriptName" and have your files inside there. So all the user has to do is extract the sub-folder into their /scripts/ folder.
- Less wasted space in .pas files!
The new engine will no longer spit out errors when your script does not include any of the default evens such as OnJoinTeam and OnAdminConnect. You may remove any unused procedures/functions from your script and it wont cause any problems. Although I do recommend(not required) you keep the functions that give a result, such as OnPlayerDamage/OnRequestGame.