The reason I ask is that I'm working on a scripting project that I suspect is becoming rather large and complex for a mod, weighing in @ ~5000 lines of code over ~60 scripts, only four of which are not function scripts. I want to understand the constraints I'm working under and at what point I can expect things to start to break down. Considering how hobbled vanilla scripting is to begin with and what that implies about the game engine, I'm a little worried about my project eventually blowing up in my face if I keep adding to it.
Some things I'd like to know, specifically:
- Is OBSE able to arrange loading/unloading of function script assemblies (or whatever I should call them)? To all appearances the game engine loads everything in when a game is loaded or started and keeps it all in memory until the player exits.
- Is there a cap I should be aware of on how many scripts can be loaded in (across all mods) regardless of their collective memory load, and how do function scripts figure into it?
Function scripts seem like a great way to streamline your overhead since they appear to be completely temporary, but that's probably only going to be true for memory load if there are some runtime optimizations being made in the background. Frankly, I'm a novice at this despite having programming skills. I have ZERO experience with game engine architecture so I can only guess at what goes on under the hood.