PeakSafeOptimizer
Performance mod focused on 8-player lobbies. 33 of 39 patches on by default, each equivalence-proven or a vanilla crash fix, per-patch fail-closed validation, opt-in switches for the ones that trade f
模組介紹 作者原文
PeakSafeOptimizer
A performance mod for PEAK aimed at the case that actually hurts: a full lobby standing in one place.
Most of what it does is invisible. 33 of its 39 patches are equivalence-proven - they produce bit-for-bit the same result as the vanilla code, just with less work - or they repair a vanilla fault that throws an exception every frame. Anything that trades appearance, feel or animation fidelity for frames is off by default, because that trade is yours to make, not the mod's.
That default-on rule has exactly two declared exceptions, both on by default and both explained below: Experimental.ExplosionScale (fewer and, in a pile-up, smaller explosion orbs, and a correspondingly softer camera shake) and Experimental.TumbleWeedTargetScan (a tumbleweed re-picks which character it chases once every 5 physics ticks, 0.1s, instead of every tick; the force and the steering towards the character it already chose are unchanged, and tumbleweeds only exist in the desert / mesa biome).
There are no numbers to tune. Every threshold is a constant in the code, next to the reasoning that picked it.
Installation
Mod manager (recommended): click Install. BepInEx is pulled in automatically.
Manual: install BepInExPack PEAK first, then drop PeakSafeOptimizer.dll into PEAK/BepInEx/plugins.
Works in multiplayer with vanilla players and with players who do not have the mod. Nothing it does is networked - every patch acts only on your own client's workload.
What it actually does
Removes per-frame exception floods. PEAK throws a few NullReferenceExceptions every single frame in situations that are easy to hit (rope climbing with an empty segment list, an incomplete local character while the emote wheel is up, hand IK during an item swap, pocket items during the join window, two unguarded singletons while binoculars are raised). An exception per frame is not free. Seven guards cut those to zero - each one skips exactly the frame whose data is missing and defers to the untouched original otherwise, and each one mirrors the short circuits in the original so it never skips a frame vanilla would have survived. Those seven are independent switches, all in the stability lane. Measured in one session: 2315 + 1544 + 184 + 135 + 67 exceptions. Those counts predate the current guards and the emote-wheel figure in particular has not been re-measured against them, so treat them as the order of magnitude rather than the exact win. The binocular one alone was 1544 - one per frame for as long as anyone held the binoculars up, each costing a throw, a stack capture and a synchronous log write on the main thread.
Cuts redundant native calls. A large part of the per-frame cost in a multiplayer lobby is the game writing values that are already what it is about to write, or recomputing something it computed a moment ago. Examples: Bodypart.Drag multiplies two velocity vectors by exactly 1f for every bodypart of every ragdolled character, 50 times a second; Bodypart.AddMovementForce adds the zero vector for everyone who is not pressing a movement key; the LightVolume lightmap is sampled per character per frame for voice occlusion when clustered players share the same voxel. These are skipped only when the skip is provably an identity.
Replaces scans and lookups with cheaper equivalents. Squared distances instead of square roots, string Animator parameters hashed once instead of per frame, a dictionary instead of a linear search, one full player scan instead of two in the same frame.
Reduces garbage. CharacterMovement.OnCollision evaluated the allocating Collision.contacts property six times per contact; it now reads contact zero once. Optionally (see below) the engine can be told to stop allocating a Collision object plus a ContactPoint for every reported collision at all.
Scales down explosions. Vanilla spawns 10 orbs per dynamite explosion, each an animated transparent sphere roughly twelve metres across. This caps a single explosion at 5 orbs a
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: