Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
2 weeks ago
Downloads
72
Size
25KB
ADDatHost Valheim hosting
30% off

Rusty Heathens ServerSync

A conservative Valheim server diagnostics and scheduling helper built for Heathens' Haven by RustyLaserGaming.

ServerSync does not replace Valheim networking. It instruments the game's existing send cycle and, when explicitly enabled on a compatible dedicated server, can allow a tightly bounded additional pass through that same native scheduler. The goal is to help diagnose and reduce backlog under some server loads without rewriting ownership, inventories, saves, or packet handling.

Important

Default mode is Observe. In Observe mode the plugin records bounded diagnostic summaries and does not add network-send work.

BoundedScheduler is an experimental dedicated-server option. It is not a guaranteed desync fix and can increase CPU/network work. The plugin automatically falls back to observation if its compatibility guards fail or a recognized overlapping network mod is detected.

Current target

  • Valheim 1.0.16
  • Network version 40
  • BepInExPack Valheim 5.4.2351 / BepInEx 5.4.23.5

The scheduling experiment is guarded by the inspected Valheim version and method fingerprints. If the game implementation changes, additional scheduling disables itself rather than forcing an unknown patch.

Features

Observe mode

  • Samples frame intervals.
  • Measures native send-cycle duration.
  • Tracks available per-peer send queue information.
  • Tracks peer visit gaps.
  • Samples Steam transport quality counters when the platform exposes them.
  • Measures SaveWorld dispatch duration.
  • Writes compact [RHSS] summaries to the normal BepInEx log.

The diagnostics emitted by this plugin do not intentionally include player names, account IDs, or IP addresses.

BoundedScheduler mode

When enabled on a compatible dedicated server, ServerSync may invoke Valheim's existing native round-robin send method one additional time in the same update when the configured guards permit it.

Default guards:

  • Maximum 2 total native calls per update (original call included).
  • 2 ms start budget for beginning another call.
  • No added work when the frame interval is above 100 ms.
  • 2 second cooldown after SaveWorld returns.
  • Additional scheduling is disabled on non-dedicated clients/hosts.
  • Additional scheduling is disabled when method fingerprints do not match.
  • Additional scheduling is disabled if another Harmony owner patches the inspected network methods or a recognized overlapping networking mod is present.

The start budget is not a hard runtime limit; a native call that has already begun cannot be interrupted.

What ServerSync does NOT do

ServerSync does not:

  • change object ownership;
  • edit player inventories;
  • modify world/save contents;
  • clean up dropped items;
  • alter packet-size limits;
  • alter Valheim's send-queue limits;
  • kick players;
  • enforce an approved-mod allowlist;
  • provide tamper-proof anti-cheat.

Mod admission is handled separately by Rusty Heathens ModGuard.

Installation

Thunderstore / r2modman

Install the package into the Valheim profile normally.

For Heathens' Haven, keep the same ServerSync version in the shared player profile and on the dedicated server. The scheduler itself only activates on a dedicated server; clients remain observation-only.

Manual

Copy:

RustyHeathensServerSync.dll

into a BepInEx plugin folder, for example:

BepInEx/plugins/RustyHeathensServerSync/

Restart Valheim or the dedicated server after changing the DLL or configuration.

Configuration

BepInEx generates the configuration file after first launch.

General

Mode = Observe

Available values:

  • Observe - diagnostics only; recommended default.
  • BoundedScheduler - experimental dedicated-server scheduling assist.

Diagnostics

Enabled = true

ReportIntervalSeconds = 10

Scheduler

MaxNativeCallsPerUpdate = 2

StartBudgetMilliseconds = 2

SkipExtraCallsAboveFrameMilliseconds = 100

PauseAfterSaveDispatchSeconds = 2

If you change scheduler settings, restart the server.

Compatibility

ServerSync conservatively disables the scheduling experiment when it detects another Harmony owner on the inspected network methods or recognized networking-overlap plugins. Diagnostics can continue where safe.

Do not force the scheduler on after a Valheim update if the version or method guard no longer matches. Update/review the mod first.

Support

When reporting an issue, include the relevant section of BepInEx/LogOutput.log, especially lines beginning with:

[RHSS]

Please include the Valheim version, BepInExPack version, ServerSync version, and whether the server was using Observe or BoundedScheduler.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.