-
Notifications
You must be signed in to change notification settings - Fork 21
Modding (AngelScript)
All the functionality can be extended by using additional scripts. All the scripts that will be placed in Data/Mods
folder and their extension will be *.as
will be automatically loaded on game startup. Process will not load scripts which will be placed in subfolders! I have created few example scripts in the Data/Mods
directory so it's worth checking them out! All the automatically loaded scripts should contain void Start()
method otherwise it won't be loaded and the error log message will appear. When mod is changed it will be recompiled on runtime, because of this mod should also contain void Stop()
method. This will be called when the script is about to reload or is removed from the resources dir.
Basic script(mod)
/**
* Entry function for the mod
*/
void Start()
{
log.Info("Mod was loaded succesfully");
}
/**
*
*/
void Stop()
{
log.Info("Unload everything for this mod");
}
Scripts can subscribe to all the application events, complete list of them will be added in the future so for now you will just have to dig into the C++ code.