2021-11-17: Unsafe YSI.
YSI does a lot of checks and work at mode start to ensure many things, including:
This produces a slower startup (with good reason) and a lot of output (also with good reason, it
helps immensely with helping people).? However, some people do not like these steps and frequently
complain about them.? Previously different steps could be disabled with commands like
#define YSI_NO_OBNOXIOUS_HEADER or
#define YSI_NO_OPTIMISATION_MESSAGE, but these were poorly documented,
often missing new features that people wanted to remove, and just plastered across the top of a mode
with no thought or understanding as to why they were there in the first place (the obnoxious header
was just for fun).
So instead, I've added a new way to disable these checks and features; which involves signing a mini
"contract" in defines to state that you accept full responsibility for all errors/bugs/crashes
arising from disabling these checks.? This contract is only for people who actually know what
they're doing, and I'm not even going to put it here as a "just use this magic code" solution.? I'll
also probably randomly change it in subtle ways periodically so you need to keep it updated with YSI
changes.? Including it in a mode and releasing that will only go badly for anyone using that mode.
The change is called ENABLE_YSI_UNSAFE_STARTUP, and defining it along with its contract makes the following changes:
YSI does a lot of checks and work at mode start to ensure many things, including:
- All callbacks work.
- The correct mode type is determined (FS/GM).
- JIT and crashdetect plugins are handled well.
- Mode information is available when asking for help in forums/discord.
- Run-time generated code can be debugged.
- Client types are determined.
- Latest versions are checked.
- Reasons for slow startup (the things just mentioned) are well documented.
- And more...
This produces a slower startup (with good reason) and a lot of output (also with good reason, it
helps immensely with helping people).? However, some people do not like these steps and frequently
complain about them.? Previously different steps could be disabled with commands like
#define YSI_NO_OBNOXIOUS_HEADER or
#define YSI_NO_OPTIMISATION_MESSAGE, but these were poorly documented,
often missing new features that people wanted to remove, and just plastered across the top of a mode
with no thought or understanding as to why they were there in the first place (the obnoxious header
was just for fun).
So instead, I've added a new way to disable these checks and features; which involves signing a mini
"contract" in defines to state that you accept full responsibility for all errors/bugs/crashes
arising from disabling these checks.? This contract is only for people who actually know what
they're doing, and I'm not even going to put it here as a "just use this magic code" solution.? I'll
also probably randomly change it in subtle ways periodically so you need to keep it updated with YSI
changes.? Including it in a mode and releasing that will only go badly for anyone using that mode.
The change is called ENABLE_YSI_UNSAFE_STARTUP, and defining it along with its contract makes the following changes:
- All startup messages are disabled, except for one single line to say this mode is in
- callbackfix.amx is not loaded as a filterscript, so you need to manually ensure that OnRconCommand and OnClientCheckResponse work for your mode.
- OnScriptInit is simplified, #define FILTERSCRIPT is again required for filterscripts.
- y_master cloud mode is removed, you must specify one of the single-behaviour y_master modes.
- Disable scriptfiles YSI folder checks, just assumes they are correct.
- Ignores old (default) compiler compatibility. It might work, it might not...
- Slow function crashdetect messages are re-enabled on startup.