RDMods-EWSync icon

EWSync

Lightweight Expand World client-side sync fix: custom biome music and environments for multiplayer clients (peer-hosted and dedicated).

Last updated a day ago
Total downloads 20
Total rating 0 
Categories Mods Client-side AI Generated
Dependency string RDMods-EWSync-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333
JereKuusela-Expand_World_Data-1.66.0 icon
JereKuusela-Expand_World_Data

Allows adding new biomes and changing most of the world generation.

Preferred version: 1.66.0
JereKuusela-Expand_World_Music-1.14.0 icon
JereKuusela-Expand_World_Music

Allows changing event and environment musics.

Preferred version: 1.14.0

README

EWSync

A client-side synchronization fix for custom biome music and environments, designed specifically for the Expand World mod suite.

What it fixes

When a player joins a multiplayer server (peer-to-peer or dedicated), Expand World Data syncs biome_data to their client. However, if the client receives this data before their world locations have finished loading, the mod quietly skips applying the custom biome music and environment weights.

Crucially, it never retries. The client is left hearing dead silence or Vanilla music instead of your custom music, and seeing vanilla weather instead of your custom environments. EWSync forces this data to apply correctly, verifies it, and implements a delayed safety retry when the player spawns to guarantee perfect parity between the server and the client.

Why is this needed?

Lightweight servers might never notice this issue. However, heavily modded servers (like MMOHeim) dramatically increase client load times, creating a "race condition" where the server data arrives long before the client is actually ready to process it. By default, EWD skips the application entirely if it fails the first time.

If you run a heavy modpack utilizing custom .ogg music files and custom weather environments through Expand World, this mod ensures your joining players actually experience them.

Optimization

Built with strict performance safeguards, EWSync is completely event-driven and never relies on resource-heavy per-frame polling. Once the custom data successfully synchronizes during the player's initial world load, the mod permanently goes to sleep for the rest of the session to guarantee zero impact on framerates during combat, portal jumps, or respawns.

To guarantee settings never carry over to another play session, the mod explicitly wipes its session state during logouts and main menu transitions—rather than relying solely on Valheim's native ZNet cleanup—preventing multiplayer configurations from bleeding into your solo worlds.

Installation

  • Required on all game clients: Every player joining the server must have this installed.
  • Optional on dedicated servers: It is harmless to install on the server machine, but the patches will remain dormant (headless servers do not render audio or weather).
  • Solo / Host: Patches remain inactive. The game will automatically use the vanilla Expand World Data loading path, which already works perfectly for hosts.

Console Commands

Press F5 and type ewsync_check to print an instant diagnostic report. It will verify the client's sync status, current music track, active weather, and whether the custom audio pools successfully loaded.

Configuration & Verification (Diagnostic Only)

⚠️ IMPORTANT: The core fix of this mod (forcing the biome data to apply) works automatically for ALL modpacks out of the box. You do not need to configure anything for the mod to fix your server.

By default, the rdmods.ewsync.cfg file ships with verification rules tailored for the MMOHeim modpack. If you are using a different modpack, the mod will still fix your game perfectly, but running the ewsync_check console command will show "failed" results because it is looking for MMOHeim's specific music files.

If you want to use the ewsync_check diagnostic command for your own custom modpack, you must manually replace the MMOHeim values in the config file. (You can also delete the rules entirely, and the mod will still function perfectly without them).

How to set up your own Diagnostic Rules

The Rules string in the config file tells the diagnostic tool what to look for.

  • Separate different biomes with a semicolon (;).
  • Separate conditions within a biome with a pipe (|).

Format: BiomeName|musicDay=x|musicNight=y|env=a,b|pool=p1,p2

  • BiomeName: The exact biome name from your expand_biomes.yaml (e.g., BlackForest).
  • musicDay / musicNight: The custom music ID you want to verify. Use a hyphen (-) if left blank.
  • env / pool: (Optional) Comma-separated lists of custom environments or audio pools that must be loaded.

Example for a custom pack: BlackForest|musicDay=my_custom_track|musicNight=-;Meadows|musicDay=meadows_track

General Settings

  • Enabled: Master switch to turn the mod fixes on or off.
  • EnableDiagnostics: Set to true to print apply/verify summaries directly into your LogOutput.log for troubleshooting. Otherwise keep false
  • SpawnSafetyRetry: If the initial data sync fails due to heavy load times, the mod will try exactly once more when the player spawns. (Highly recommended to leave true).
  • SpawnRetryDelaySeconds: (Default 1.5). Gives the game engine a brief moment to breathe after the player physically spawns before forcing the environment update. Adjust slightly higher if players on very slow hard drives still experience desyncs. Default delay is more then enough for 99% of the players.

Dependencies

  • Expand World Data
  • Expand World Music
  • BepInEx