LethalWringer
LethalSponge but on steroids. Frees unused assets from memory on a timer during your run, not just once a day, so RAM stops creeping up. Standalone.
模組介紹 作者原文
LethalWringer
LethalSponge, but on steroids.
To be fair to Sponge: this doesn't do everything Sponge does. It takes the one thing that kept your RAM in check - the UnloadUnusedAssets sweep Sponge runs once per in-game day - and runs it more often and at smarter moments, so memory stops creeping upward over a session instead of only getting wrung out at day rollover.
Inspired by LethalSponge. Fully standalone and clientside - it does not require Sponge, and works with or without it.
What it does
It calls Unity's Resources.UnloadUnusedAssets() - the same engine call Sponge uses - to reclaim memory from assets nothing references anymore (a moon you left, a dungeon that unloaded, dead enemies). Unity doesn't reclaim that memory on its own until something asks, so LethalWringer asks at the two moments it matters most:
- The moment you return to orbit after leaving a moon. The whole moon just became unreferenced, so this is the single biggest chunk of memory to reclaim - and a frame hitch up in orbit, with nobody in danger, costs you nothing. This is the important one.
- On a timer while you're on a moon. A safety net for long single-moon runs where RAM climbs without you ever going back to orbit.
The tradeoff
UnloadUnusedAssets causes a brief frame hitch each time it runs (that's why Sponge only does it on day rollover). The orbit sweep is effectively free because you're safe on the ship. The periodic on-moon one can hitch mid-gameplay, so its interval is a knob: more frequent means tighter RAM but more hitches.
Config
- Enabled - master switch.
- SweepOnReturnToOrbit - run one cleanup each time you get back to orbit from a moon. The big, cheap one. Default on.
- IntervalMinutes - how often the periodic on-moon cleanup runs (default 10, range 2-60).
- PeriodicAlsoRunsInOrbit - let the periodic timer also tick in orbit. Usually unnecessary with the orbit sweep on. Default off.
- AlsoCollectGarbage - also force a managed GC after unloading. A little more RAM freed, a bigger hitch. Default off.
- LogEachRun - print a line each cleanup showing the heap before/after.
Credits
Made by Pierre (Discord: samedude67). Inspired by LethalSponge by Scoops. Uses only Unity's built-in memory API, so it does not require Sponge.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: