Provides several new initialisation callbacks to avoid knowing what the current script type is. The full initialisation order is:
OnCodeInit
- Called first to generate code. No advanced YSI features are available here (including hooking this callback).OnJITCompile
- If this is running in the JIT.PREINIT__
- Special init functions, used for tiny setup code (more light-weight than hooks).OnScriptInit
- Called when this script starts. This is the most important callback as it is called once first, regardless of the script type, and all YSI features are now available.POSTINIT__
- Special init functions, used for tiny setup code (more light-weight than hooks).OnFilterScriptInit
- If this is a filterscript.OnGameModeInit
- Once in a gamemode, possibly multiple times in a filterscript.
The shutdown order is:
OnGameModeExit
- Once in a gamemode, possibly multiple times in a filterscript.OnFilterScriptExit
- If this is a filterscript.OnScriptExit
- Called when this script ends, regardless of the type.
For general YSI information, see the following links:
- Quick Start - One very simple example of getting started with this library.
- Features - More features and examples.
- FAQs - Frequently Asked Questions, including errors and solutions.
- API - Full list of all functions and their meaning.
- Internal - Internal developer documentation for the system.
These are links to external documentation and tutorials; both first- and third-party. Note that these may be incomplete, obsolete, or otherwise inaccurate.