About this mod
To be used alongside CritterSpawn Congestion fix v1.54. This mod decreases the number of script calls requested by the CritterSpawn script.
- Requirements
- Permissions and credits
- Changelogs
CritterSpawn Changes
- Increases script performance by increasing the amount of time between updates for the critters to spawn.
- The script itself (by Excinerus) is fantastic, and realistically all I did was tweak an existing variable to slow down updates.
- This reduces the frequency of spawns in an area, but not the maximum. So the same number of critters will spawn, but only if you linger in the cell for a while.
- Decreases load on papyrus when transitioning between cells. Also decreases load on papyrus whilst critters are not at maximum spawn amount (10).
- May give slight increases in actual FPS, but only on heavy load orders and/or lower end PCs.
CritterFish Changes
- Inserts pauses in fish behavior to leverage a bit extra performance.
Performance Impact
- In a six-minute side-by-side test in Whiterun, the OnUpdate() function in the CritterSpawn script accounted for 8% of total script calls—over 9,000 calls! Even without collecting any critters, just standing still resulted in a massive number of script executions. Vegeta and Nappa would be shocked!
- By decreasing the number of updates, script calls were significantly reduced to around 2,900, making up only 2.7% of total script activity (out of 120,000 calls).
Data
- Default Update Speed: ≈ 26.53 script calls per second
- This mod: ≈ 8.20 script calls per second
- This mod (experimental) ≈ 3.30 script calls per second
The performance improvements near bodies of water will be even greater, with the fish modifications as well.
How Does This Affect Spawns?
Critters and fish (not fishing) will take longer to spawn than before (they spawn over time).
How Does This Affect Fish?
- Fish will no longer randomly swim or school with fish if you're not close to them.
- You might see fish not swimming when you first go near them, but they'll pretty quickly get back to it.
- Even when not swimming, fish are still animated (flipping their tail fins).
Will this increase my FPS?
In theory, with my changes, it might. With my original implementation I didn't think they would. However, if you are running a heavy modlist or a slightly older computer, you may see FPS gains (that diminish over time) when you first enter a cell. The performance gain is from less active critters in the cell. The diminishing returns over time is due to the spawns entering the cell as you remain in it. For most people, no you most likely won't see any direct FPS increase.
Papyrus will however, be less stressed from spawned critters. While I did target the critterspawn script, technically the heaviest performance impact is from the critters themselves. What this means, in simple terms, is that your performance gains from utilizing this mod (with exception to the critterfish) will eventually even out to the default performance you'd see from using CritterSpawn Congestion Fix if you remain in the cell for a period of time. As for the Critterfish changes, you'll pretty much always see the performance benefit from that, as again, by default - the fish were set to swim and school when they spawned instead of when you're close.
Experimental Version?
- This version has further increased delays on the spawn timer.
- In this version you're very unlikely to see random critters (butterflies, moths, bees, etc) than the normal version.
- I'd recommend the normal version over this one, but if you really don't care about the critters, but still want them to exist in your game, or are just looking for as much possible performance - you can download this version.
- The modifications to the fish are the same as the normal version — the difference in spawn time is the only substantial difference.
Compatibility & Load Order
- This mod does not contain any plugins.
- Load this mod after last conflict in your load order.
Compatible (Load after mods on this list)
- USMP (Includes CritterSpawn Congestion Fix)
- UOSC (Includes CritterSpawn Congestion Fix)
- USSEP
- USCCCP
- Vanilla Scripting Enhancements
- Vanilla Script (Micro)Optimizations
Incompatible:
- None—yet.
Additional Compatibility/Load Order Notes:
To be clear—you don't load this mod at the bottom, or the top, or at a lower priority than any of its conflicts. Check overwrites for CritterSpawn Congestion Fix first—allowing that mod to overwrite all of its conflicts, then load CritterSpawn Congestion Fix - Script Call Reduction after it.
Keep in mind that most large script fixes, overhauls, patches and so on will want to be loaded as early as possible—so mods that need to overwrite can. As a general rule of thumb, you will want this mod to overwrite all mods that conflict with it.
If you are utilizing USMP or UOSC, you don't need CritterSpawn Congestion Fix.
Additional Thoughts:
All scripts, regardless of what they are—can stand to be updated with the same wait functions if immediate updates are not necessary. Looking through a typical call stack in a large load order, especially those curated on Wabbajack, usually reveal many scripts that utilize an OnUpdate() or OnTrigger() function with no delays or additional checks to ensure the script is only firing occasionally or as needed. This doesn't cause a problem with the script itself, and smaller load orders will almost never be affected. But it's 2025. We've come a long way. Mods are getting more complex, load orders are getting larger and our tools are a lot better than they used to be. Let's ensure our scripts are following suit.
Credits
Excinerus for CritterSpawn Congestion Fix.
- The script incorporates the fixes introduced in USKP.