WhySoLaggy

版本 v1.0.5·更新於 2026-09-21

Diagnose lag and unusual network activity with mod profilers, RPC monitoring, CSV/JSONL logs, and Harmony patch diagnostics.

模組介紹 作者原文

WhySoLaggy

Find out which mod is making your game lag, and who is bombing — or sneakily feeding — your room.

1.0.5 retains the focus on quiet-by-default, structured data and targeted diagnostics: profilers are off until you need them, while the network and RPC monitors preserve bounded, recent evidence for post-session analysis.

What's new in 1.0.5

  • Updated ModConfig support for the current settings menu, section names, and dropdown labels.
  • Fixed settings text not following game language changes.
  • Restricted translations to WhySoLaggy's own settings to avoid changing other mods' labels.
  • Fixed inherited-method patch warnings during ModConfig integration and improved menu refresh cleanup.
  • Kept ModConfig optional and preserved existing configuration values and diagnostic features.

Built against PEAK 2.4.b. PEAKLib.ModConfig remains optional. Final in-game language-switching and host/client checks are still pending; the 1.0.4 measurements and testing notes below are historical.

Quick start

  • Install BepInExPack PEAK.
  • Drop WhySoLaggy.dll into PEAK/BepInEx/plugins.
  • Launch the game, play normally, then exit.
  • Open PEAK/BepInEx/ and look at:
  • WhySoLaggy.log — performance data (quiet by default, see Log Verbosity)
  • WhySoLaggy_Abuse.log — abuse alerts + RPC reports + feeding-chain traces
  • whysolaggy_data.csv — every event in 87 fixed columns
  • whysolaggy_events.jsonl — every event as JSON (one per line)
  • harmony_patches.csv — every Harmony patch in the process (written once at startup)

Zero extra setup needed. All advanced features are opt-in.

Features

Each feature has a default state. Features marked opt-in cost zero when disabled.

  • FPS Monitor — always on
  • Tracks frame time every frame; any frame exceeding SpikeThresholdMs (default 50ms) is logged as a spike and written as a SpikeFrame event.
  • Every ReportIntervalSeconds (default 10s) emits an FpsReport event with average/p95/p99 frame ms, window average, and (if memory monitor is on) AllocRateKBps.
  • Overhead: one Time.unscaledDeltaTime read per frame. Negligible.
  • Plugin Profiler — opt-in (default off in 1.0.4)
  • When EnablePluginProfiling=true, Harmony-patches Update/LateUpdate/FixedUpdate on every BepInEx plugin's MonoBehaviours and records their per-frame cost.
  • Periodic report lists the slowest plugins by average ms, plus total calls.
  • Use IgnorePluginGuids (comma-separated) to permanently mute noisy plugins. Example:

IgnorePluginGuids = com.example.ui-mod,com.example.minimap

  • Why off by default: instrumenting every mod's Update adds measurable self-overhead. Turn on only when diagnosing.
  • Patch Profiler — opt-in (default off in 1.0.4)
  • When EnablePatchProfiling=true, wraps every Harmony-patched target method with prefix/postfix timing.
  • Throttling: after a method has been sampled >20 times and its average sits below MinReportMs (default 0.1ms), only every 10th call is recorded afterwards. Cuts self-overhead by ~70–90% in busy scenes.
  • IgnorePatchMethods lets you skip known noisy methods:

IgnorePatchMethods = Player.Update,Camera.LateUpdate

  • Null-safe: a null __originalMethod is logged as "(unknown)" instead of throwing inside Harmony.
  • Room-Bombing Detection — always on
  • Monitors three per-second rates: Instantiate, Destroy, RPC. Also tracks absolute scene object count for spike detection.
  • When any rate exceeds its threshold, an ⚠ ABUSE ALERT is written to WhySoLaggy_Abuse.log together with the offending player's nickname + ActorNumber and the current top-5 RPC method names for context.
  • A red on-screen banner shows the alert for 12s (auto-fades). Language follows system locale (中/EN).
  • Observation only — never kicks, blocks or interferes.
  • 1.0.4 — two extra alarms layered on top (see also the Master-side diagnostics section):
  • ActorMethodHotspot — the same actor sent the same RPC ≥ ActorMethodRateThreshold times in one check window (default 20/s). Pinpoints which client is flooding which method, not just the

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_PEAK

檔案與校驗

檔案名稱
WhySoLaggy-1.0.5.zip
檔案大小
136.6 KiB