Summary
Frees most of the shared script init budget used by vanilla, so large modlists stop failing with "Too many instructions per function". No gameplay change.
Description
Big modlists can make the server (and clients) fail to start with dozens of "Too many instructions per function" errors pointing at vanilla files, then "Can't compile Game script module!".
WHY
The script compiler puts every statically initialized value of the Game module (vanilla + all mods) into one generated init function, and that function has a hard instruction limit (Bohemia Feedback Tracker T200535). Vanilla alone already uses most of it.
WHAT THIS MOD DOES
It ships 223 vanilla script files that are unchanged except for one thing: their static arrays and objects (chat filter word list, AI behavior tree port lists, script invokers, constant tables) are built the first time they are used, instead of inside that shared init function. Same values, same behaviour.
The files are generated by a tool from the installed game, not edited by hand. A declaration is only changed if no other vanilla file and no mod of our list reads that field directly.
MEASURED (game 1.8.0.13, local dedicated server, 1 unit = the cost of one "const string" declared inside a function)
- Our 112-mod Conflict PvE list: over the limit by about 74 units without this mod.
- With 1.0.0 (chat filter only): about 610 units to spare.
- With 1.1.0: about 2450 units to spare (measured: a 2400-unit probe still compiles, 2600 does not).
COMPATIBILITY
- Overrides 223 vanilla files under scripts/Game. Do not combine with a mod that overrides one of the same files, or that reads one of the changed static fields directly.
- Must be regenerated after a game update that changes one of these files. We check after every game update.
- Tested: dedicated server compile with our 112-mod list. Not tested on console.
- Server: add it to the mod list. Clients download it automatically.
Made for the SORU PVE - Modded CAG server.
License
Arma Public License (APL)