About VScripts Library of Utils [Fixed]
From Steam WorkshopThe great senzawa has returned from the great beyond with more weird script mods (jk jk). This time it's a fix of someone else's stuff, so all rights belong to the original author; will take this…
The great senzawa has returned from the great beyond with more weird script mods (jk jk). This time it's a fix of someone else's stuff, so all rights belong to the original author; will take this down if asked to, etc. the normal shebang The following is a huge rant, but tl;dr this library is absurdly badly optimized and has probably been secretly tanking your performance into the ground; this fixes that, and as a bonus, is a drop-in replacement for anything depending on it.
Anyway, I have been running the Dynamic Lights mod for years and did not have a problem, but after recently picking up L4D2 again after a hiatus, it had extremely serious freezing problems, like, for seconds at a time. I checked everything, removed d3d9 (Vulkan patch), verified game files, removed high-poly playermodels, none of them worked. After some time, I checked the console printout to see if a script was hanging the entire thing, and HOLY MFING HELL WHY IS A PER-TICK FUNCTION SPENDING 142.7ms (it's the function that calls each registered per-tick callback, which, as we'll see below, invokes the problem function dozens of times per tick) Y E A H, turns out this library for some reason uses "compilestring" (which, for those not in the know, spends about as much resources as loading an entire new script mod) EVERY TIME a registered function runs (via the classic antipattern compilestring("return "+name)()), which, for per-tick functions, can be a total of thousands of times per second. Ngl, after I realized the bug, I am more surprised that the thing doesn't lag to hell for more people. I fixed the compilestring runs on the hot path, and, since I was changing the implementations anyway, optimized the timer resolver to be O(n) instead of O(n^2) while I was at it. The end result is that frequent hangs of ~multiple seconds are reduced to minor stutters of a few frames every few minutes (and even that might be because I was deliberately loading my PC's memory to test if the fix worked).
The code has some... weird design choices, but I decided against changing it so that anyone using the current VScripts Library of Utils (most likely, after experiencing severe lag with Dynamic Light as I did) can seamlessly replace this one for (hopefully) observable performance gains.
Cheers senzawa
PS: Also uploaded a fixed ver. of Dynamic Light here for any of you who don't want to screw with dependency.
------
Credits:
Original Mod: VScript Library of Utils by Sw1ft Bug-fixing/Optimizing, Repacking: senzawa
Highlights
From source dataFootprint
Rated a light load on a server.
Last update
Its author last shipped an update 21d ago.
VScripts Library of Utils [Fixed] on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Left 4 Dead 2 servers. We download it from Steam Workshop, place it, and restart the server.
- Server load
- light
- Latest build
- 2026-10-14, released 2026-10-14
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Workshop |
From 3 recorded builds of VScripts Library of Utils [Fixed].
Recent builds
| Build | Released | Game versions | Loaders |
|---|---|---|---|
| 2026-10-14 | 2026-10-14 | n/a | Workshop |
| 2026-10-12 | 2026-10-12 | n/a | Workshop |
| 2026-10-09 | 2026-10-09 | n/a | Workshop |
What kind of mod it is
From the catalogLibraries & compatibility
Foundations and fixes other mods build on. Usually installed because something else needs it.
Compatibility
- Game
- Left 4 Dead 2
Verified at the source
- ✓Steam WorkshopOfficial listing, checked 2026-10-17Open ↗
- ✓Authorsenzawa, as published on Steam Workshop
- ✓LicenseNot published by the sourceFree
