


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.
This package only does anything when both of these are true on the machine:
*GhettoNetwork*.dll is present anywhere under BepInEx/plugins/).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? https://discord.gg/H9uKGcAujs
| 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:
__instance.SomeField = … if the field doesn't exist in the loaded assembly.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.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:
SendZDOs queue cap raises its outbound ceiling during initial-sync floods.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.
The patcher scans BepInEx/plugins/ recursively for any DLL whose name matches *GhettoNetwork*.dll. If nothing matches:
TargetDLLs returns an empty list, so BepInEx never loads Cecil for Steamworks / assembly_valheim.Patch() also short-circuits if it's somehow called anyway.FiresGhettoNetworking not detected … will not patch any assemblies.This gate exists because the enum additions are inert without FGN reading them, and the queue-cap raise is small on its own — the win comes from pairing both with FGN's send-rate tiers. Shipping the patcher to a non-FGN install would be a no-op at best, so the gate keeps it from quietly altering other networking mods' headroom.
The gate is evaluated once per process and cached — one Directory.GetFiles(... AllDirectories) at startup, then nothing.
Install on every machine running FGN — the dedicated server and each client:
patchers/ folder from the zip drops into BepInEx/ so the DLL lands at BepInEx/patchers/<author>-FiresSteamworksPatcher/patchers/FiresSteamworksPatcher.dll. r2modman / Thunderstore Mod Manager handle this automatically.Preloader patchers have no config file — there's nothing to tune. Either FGN is present and the two patches land, or it isn't and the patcher idles.
| Side | Install the patcher? |
|---|---|
| Dedicated server | ✓ — sizes accept-from-peer recv buffers + raises the outbound queue cap |
| Client | ✓ — sizes the client's recv buffers to keep up with a high-throughput server |
| Listen-server host (hosting via the in-game menu) | ✓ — acts as both server and client; install it like any client |
MIT — see LICENSE.