FiresSteamworksPatcher

版本 v1.1.2·更新於 2026-09-30

BepInEx preloader patcher for FiresGhettoNetworking: adds the missing Steamworks recv-buffer enum members and raises the ZDOMan.SendZDOs queue cap so FGN's tuning reaches its full ceiling. Runs on ser

模組介紹 作者原文

FiresSteamworksPatcher

Updated for Valheim 1.0.

BepInEx preloader patcher that makes two surgical changes to Valheim's bundled assemblies, so FiresGhettoNetworking can use the Steam networking knobs and ZDO queue sizes it ships configs for. Install it wherever FGN runs — the dedicated server and every client.

FiresGhettoNetworking is required, but not listed as a dependency. Earlier versions of this package listed

FGN as a dependency, which pinned a specific FGN version: every FGN update meant a new patcher release, and an

outdated pin could pull in an old FGN that no longer works on the current game. The dependency was removed so the

patcher never has to change when FGN does. You still need FGN installed for this patcher to do anything -

without it the patcher writes one log line and patches nothing.

This package only does anything when both of these are true on the machine:

  • FiresGhettoNetworking is installed (a GhettoNetwork.dll is present anywhere under BepInEx/plugins).
  • BepInEx loads the patcher at preload (i.e. the DLL is in BepInEx/patchers).

If FGN isn't present, the patcher writes a single log line and touches nothing — it has no effect of its own and no config file to tune.

Need help, found a bug, want a feature?

What it patches

| Target | What it does |

|--------|--------------|

| Steamworks.ESteamNetworkingConfigValue (in com.rlabrecque.steamworks.net.dll) | Adds four missing enum literals — k_ESteamNetworkingConfig_RecvBufferSize (47), RecvBufferMessages (48), RecvMaxMessageSize (49), RecvMaxSegmentsPerPacket (50). Valheim ships an older Steamworks SDK that doesn't expose these; without them, FGN's recv-buffer config knobs would throw MissingFieldException when it looks them up via reflection. |

| ZDOMan.SendZDOs (in assembly_valheim.dll) | Locates the outbound send-queue cap constant (10240 bytes in vanilla) near a GetSendQueueSize call and rewrites it to 102400 (10×). FGN's per-peer send-rate tiers can configure Steam to push far past vanilla rates; the 10 KB queue caps that ceiling regardless of what Steam will accept. This bump lets the queue actually hold a frame of high-tier traffic. |

Both edits are done via Cecil at preload time — BEFORE Harmony exists, BEFORE any plugin Awakes. There's no Harmony-equivalent for either patch:

  • The Steamworks enum members are missing from the types Valheim ships, so no Harmony patch could surface them — you can't __instance.SomeField = … if the field doesn't exist in the loaded assembly.
  • The ZDO queue cap is a const-int load (ldc.i4) inside an IL branch. Harmony can transpile that, but the transpiler IL search and re-emit is heavier than rewriting one constant at preload.

Where it helps — server and client

Earlier builds gated this patcher to dedicated servers only. As of 1.1.0 it runs anywhere FGN is installed, because both edits pull their weight on the client too:

  • Dedicated server — the heavy outbound sender: it pushes ZDO updates to every peer each tick and configures a Steam socket per connection. The recv-buffer enums size its accept-from-peer receive buffers, and the SendZDOs queue cap raises its outbound ceiling during initial-sync floods.
  • Client — a client receiving a high-throughput server (FGN's HyperBoost or high AutoTune tiers push well past vanilla rates) needs matching receive headroom or it bottlenecks on ingest. The recv-buffer enums are what let FGN enlarge the client's receive buffers to keep up. The SendZDOs queue cap is a smaller win client-side — a client sends comparatively little — but it's harmless and applies in the cases where a client does own and push more.

Without this patcher, FGN still runs: its recv-buffer settings simply cap at Steam's defaults instead of erroring. The patcher is what unlocks the full receive ceiling on both ends.

FGN gate

The patcher scans BepInEx/plugins/ recursively for any DLL whose name matches GhettoNetwork.dll. If nothing matches:

  • TargetDLLs returns an empty

安裝與使用 安裝:BepInEx 外掛

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

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
FiresSteamworksPatcher-1.1.2.zip
檔案大小
117.0 KiB