NG Logger And Optimizations
Добавить в игру через Steam
Нажмите «Подписаться»
На странице Steam войдите в аккаунт, если потребуется.
Подписаться
О материале
«NG Logger And Optimizations» — материал мастерской Barotrauma. Моды, подлодки, предметы и новые задания для экипажа. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
A lightweight diagnostics + optimization toolkit for heavily-modded Barotrauma. It helps you find what eats your FPS and your server's bandwidth — and it fixes two of the biggest hidden performance drains in modded weapon/item packs. Works in singleplayer and multiplayer (client + server). All players should run the mod; the optimizations are behavior-preserving and MP-safe (no desync). Localized in English and Russian (auto-selected by your game language).
1. Console logger
Server-side network logger. Every few seconds it prints the health of the entity-event queue — the thing that causes progressive rubber-banding and mass rollbacks in long modded rounds:
-
queue size, span (% toward the UInt16 overflow cliff) and event rate (events/sec)
-
which client is falling behind and holding the queue back
-
the top event sources (item/character/mod) flooding the network
-
an automatic "LIKELY: …" probable-cause line so you know exactly what to fix
It prints to the dedicated-server console and to the host's in-game console when hosting "through the game". Client-side FPS profiler. Continuously samples your frame and, every 60 seconds, reports your average FPS plus the heaviest frame operations. It keeps the whole session in memory so you can build a performance "portrait" at any time.
2. Console commands
All messages start with [NG] [Logger And Optimizations]. Commands (type in the console — ngperf is the main alias, clientperf also works):
-
ngperf — session performance portrait: top-20 operations + 3 snapshots (worst / typical / best FPS window)
-
ngperf menu — open/close the in-game menu
-
ngperf now — operations for the current (not-yet-closed) window
-
ngperf items — top items/mods by total Item.Update time (run ngperf items on first)
-
ngperf items — per-component breakdown of one item (e.g. ngperf items spas-13)
-
ngperf items on | off | reset — enable / disable / clear per-item profiling
-
ngperf reset — clear session memory
-
ngperf auto — toggle the 60-second auto-summary
-
ngperf help — list the commands
3. In-game menu
Open it with ngperf menu. A clean panel with everything in one place:
-
a Benchmark button and a Copy result button
-
the FPS fixes, split into 3 tabs — Client / Server / Shared — each with on/off toggles (empty categories simply show "empty")
-
live status line and tooltips explaining each fix
The window does not pause the game, so a benchmark runs against real load while it's open.
4. Benchmarking
Press Benchmark 60s near whatever is killing your FPS (a station full of NPCs, a flooded sub, etc.). After 60 seconds you get a color-coded report:
-
Average FPS and 1% Low (measured per-frame, so it catches real stutters)
-
the state of both fixes (so you can A/B with them on/off)
-
the top 10 items and top 5 mods by Item.Update cost
-
a per-component breakdown of the 3 worst items
Then hit Copy result to put the whole report on your clipboard as plain text — perfect for sharing instead of screenshots.
5. FPS fixes
Two behavior-preserving, MP-safe optimizations (toggleable, ON by default, choice saved to a config). In a heavily-modded station scene we measured roughly 162 → 246 FPS (+50%) with both enabled — your results will vary, but the gains are very real. Container optimization. Weapons with per-round reloading (SPAS, Mosin, M1, etc. from AAAC mod) — and any container holding items with lots of "on-insert" effects — were re-processing already-spent reload effects every single frame, on every NPC and player holding them. This fix drops that dead weight (e.g. SPAS-13 from AAAC went from ~2700µs to ~8µs per update). The reload animations and everything else still work exactly as before. Nearby-item search optimization. Many modded items (PDAs, several guns and their reload effects) scan the entire world item list on a timer looking for nearby items — even when no matching item exists anywhere. This fix skips those empty world-scans using a lightweight index, finding the exact same targets without the per-frame cost. Helps client FPS and server CPU.
Requirements
-
LuaCsForBarotrauma with C# scripting (CsRunPolicy) enabled
-
Multiplayer: every player should have the mod (it's hash-checked)
Source Code: I can't attach a GitHub link here — send me a message on Steam or Discord (newgrafon) and I'll send a link to you.
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.