NetworkFix
A mod that allows users to configure network variables.
About this mod Author’s original text
A simple mod that allows you to configure the packet queue size and bandwidth. Should make multiplayer less laggy.
This mod uses a transpiler patch which allows you to modify sendQueueSize, hard-coded to 10,240. as well as a postfix patch which allows you to modify the SendRateMin and SendRateMax variables. This should allow your server to trasmit more than 150kbps, (153,600bps). I've also removed the 512kbps, (524,288bps) maximum buffer size from the socket allowing you to set it to an arbitrary limit.
These changes were first discovered to be helpful here and expanded upon in this comment chain. I only made what they were doing manually into a mod to make it easier to use. Shout out to all their great detective work. Special shout-out Patk88 for the config defaults.
If you have any issues with this mod please post them to
Changelog:
1.1.1
Adding a fix for detecting local servers.
Adding some try/catch blocks to ensure code is executed safely.
Added code to detect ZNet being destroyed. Should make things safer.
1.1.0
It is recommended you delete your config for version 1.1.0
Changed from modifying RegisterGlobalCallbacks function with a transpilier to a postfix.
Allowed setting values higher than 512kbps.
Added checks for negative config values.
Changed the config entries to the names of the variables. Should lower confusion.
Added a config to disable the mod entirely.
1.0.1
Fixed the log strings to have correct variable names.
Added Github link.
1.0.0
Initial commit.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: