You are viewing a potentially older version of this package. View all versions.
CW_Jesse-BetterNetworking_Valheim-1.2.201 icon

BetterNetworking Valheim

If you've been experiencing lag or desync when playing with your friends, this is the solution!

Date uploaded 2 years ago
Version 1.2.201
Download link CW_Jesse-BetterNetworking_Valheim-1.2.201.zip
Downloads 14956
Dependency string CW_Jesse-BetterNetworking_Valheim-1.2.201

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

This mod greatly improves multiplayer performance. If you find this mod works as advertised, please endorse it!

For most people, the default settings should be fine.

Changing settings using the Configuration Manager (F1)

  1. If others experience lag/desync for things around you, increase your queue size.
  2. If your character is lagging for others, decrease your update rate and/or queue size.
  3. If your internet is slower, it might help to reduce the send rates until they're below your upload speed.

Things to keep in mind

  • Compression only works between computers with Better Networking.
  • Incompatible with other networking mods, including VNO and NetworkFix.
  • Compression increases your CPU usage. This can become the new bottleneck in some cases. With this mod, Valheim can max out two cores, so with 4 cores, 50% CPU usage by Valheim is maxing it out.
  • Dedicated servers will not apply changes until restarted.

Finished features

  • optionally compress network data (improves performance for everyone; requires others to have mod)
  • sending queued packages all at once instead of one at a time (improves performance for everyone, especially if you have high ping; requires others to have mod)
  • option to reduce network update speed (for computers with slow/inconsistent upload speeds)
  • change min/max send rates (higher can be better with good internet)
  • change network queue size (Valheim better prioritizes data when queue size is lower, but sends less data overall)
  • increased networking buffer size (might help)

Planned features

  • optionally require players to have certain mods to join server
  • optionally notify players if they have an older version of a mod than others
  • allow admins to change dedicated server settings within their client without having to restart server
  • option to allow players to choose who the server is
  • better data prioritization
  • improved networking regarding terrain
  • make everything automatic (fewer options)

Better Networking links

Educational links

Other networking mods

If you've benefited from this mod and want to see more features implemented, please endorse it! Or if you're feeling particularly generous, donate here or on Patreon!

CHANGELOG

2.3.2

  • compatibility with Valheim 0.217.28

2.3.1

  • compatibility with Valheim 0.216.9

2.3.0

  • allow changing player limit for dedicated servers

2.2.1

  • bugfix: more stable when some people have compression/BN disabled
  • bugfix: no longer spams log when unexpected messages received

2.2.0

  • PlayFab: fixed failing to work in some cases
  • PlayFab: better handling of disconnections
  • PlayFab: simplified compression code
  • PlayFab: fixed error in vanilla Valheim where data could be lost while connecting
  • Steamworks: fixed failing to work in some cases

2.1.3

  • reverted to 2.1.1; for now, avoid using Alt+F4 to close the game

2.1.2

  • better handling of unexpected disconnections

2.1.1

  • improved startup time
  • better config documentation

2.1.0

  • buffer new connections ("ZDO buffer")
  • better default queue size
  • better queue size options
  • PlayFab: compression ratio info messages
  • Steamworks: simplified compression code (less likely to break in future Valheim patches)
  • Steamworks: higher maximum send rate
  • force crossplay option only shows for dedicated servers
  • bugfix: queue size changes apply to PlayFab
  • bugfix: can no longer set queue size too high for Steamworks
  • bugfix: compression/update rate once again changeable without restart

2.0.4

  • lower file size
  • fixed incompatibility with mods that read/write from current directory
  • bugfix: Linux supported again

2.0.2

  • crossplay no longer forced enabled by default
  • option to force crossplay disabled
  • fixed misleading severity of some log messages

2.0.1

  • increased default queue size (might prevent desyncs)
  • increased max queue size (might induce lag - enable at own risk)

2.0.0

  • now compatible with Mistlands
  • now supports new PlayFab (crossplay) networking stack
  • improved speed and effectiveness of network compression
  • now forces PlayFab (crossplay) by default (can be disabled in config file)

1.2.2

  • bugfix: compression handshake wasn't completing properly
  • many small improvements

1.2.1

  • breaks down multiple large packages into separate messages
  • can now disable non-error/non-warning log messages
  • fewer config options (based on feedback/testing)
  • better config descriptions

1.2.0

  • compression now optional
  • defaults changed
  • better log messages
  • bugfix: certain messages could ignore increased queue size
  • bugfix: can no longer set minimum send rate to 0

1.1.3

  • increased send buffer size
  • higher default network queue size and queue size options (made reasonable by compression)
  • better default options
  • better option descriptions
  • possible fix for unusual servers