You are viewing a potentially older version of this package. View all versions.
mvp-Serverside_Simulations-1.1.9 icon

Serverside Simulations

Run world and monster simulations on a dedicated server.

Date uploaded 9 months ago
Version 1.1.9
Download link mvp-Serverside_Simulations-1.1.9.zip
Downloads 3228
Dependency string mvp-Serverside_Simulations-1.1.9

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

Valheim Serverside Simulations

Build Plugin

foo

Run world and monster simulations on a dedicated server.

Updated for patch: 0.220.5

Features

  • Server simulates world and AI physics.
  • Client FPS improvements
  • Ships are simulated by the driver to improve the steering experience with high latency.

Installation

  1. Install BepInEx (optionally installing "Better Networking" on both clients and the server is recommended)
  2. Copy plugin DLL into the BepInEx/plugins/ directory on your dedicated server.
  3. You're done! No client-side changes are needed.

It's recommended to also install the mod "BetterNetworking", it works very well with Serverside Simulations.

Configuration

  • MaxObjectsPerFrame.MaxObjects can be increased to improve the loading times of areas on the server, at the expense of CPU usage.

Caveats

  • Only runs on dedicated servers.
  • The mod dramatically increases server resource usage and running it on a weak CPU may lead to a poor gameplay experience.
  • The mod should be disabled when using the "optterrain" command.
  • This mod does not prevent cheating or any kind of client manipulation.
  • While this mod is quite light on complexity, as with most mods it's possible future Valheim patches will break the mod in unexpected ways. We recommend you back up your characters and worlds and/or consider disabling this mod anytime a new game patch is released.

Why?

Ordinarily, to keep server resource usage low, the Valheim server will hand off simulation of an area to the first client that enters said area. However, if the player in charge of the area has a poor connection all other players in that area will suffer. This mod is an attempt at improving that specific situation at the cost of increased latency for the client which would ordinarily own the area.

How?

This dedicated server mod causes terrain, monsters and other objects that are normally created and owned by clients to instead be created on—and thus owned and simulated by—the server.

For mod developers - compatibility with Serverside Simulations

For mod developers interested in maintaining compatibility with Serverside Simulations:

  • If your mod makes changes relating to simulation / behaviour of the world, it will need to be able run on the dedicated server and should take these points into account:
    • Player.m_localPlayer is always null on a dedicated server; your code should check for this.
    • On a dedicated server, ZNet.instance.GetReferencePosition() returns a position outside of the world and is not related to any player position.
    • Any graphical or hud-related code should probably be behind a ZNet.instance.IsDedicated() check, if that code is expected to run on the server.

Manually compiling

To manually compile, create a file at src/Environment.props with the following content, and change the path to point at your Valheim install.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <!-- Needs to be your path to the base Valheim folder -->
    <VALHEIM_DEDI_INSTALL>E:\SteamLibrary\steamapps\common\Valheim dedicated server</VALHEIM_DEDI_INSTALL>
  </PropertyGroup>
</Project>

CHANGELOG

[1.1.9] - 2025-05-14

Fixed

  • Fix missing effects (Revert EffectList.Create patch)

[1.1.8] - 2025-04-20

Added

  • Remove AudioMan.Update, reducing future error spam

Fixed

  • Fix null references to WearNTear.m_bounds and Humanoid.m_currentAttack.m_character
  • Fix shield generators and audio log spam

[1.1.7] - 2024-11-12

Added

  • Environment.props and bepinex publicizer

Fixed

  • Update method references to static, fixing Bog Witch launch issue. Thanks to @bpage-dev

[1.1.6] - 2023-11-22

Fixed

  • Fix exception when updating ship owner in 0.217.28
  • Fix MaxObjectsPerFrame transpiler for Valheim 0.217.28

[1.1.5] - 2023-10-25

Fixed

  • Fix private method access errors in Release build

[1.1.4] - 2023-10-24

Changed

  • Mistlands update

Misc

  • Fix AssemblyPublicizer output path.
  • Update BepInEx, Harmony and MonoMod libs

[1.1.4] - 2023-10-24

Changed

  • Mistlands update

[1.1.3] - 2021-09-22

Fixed

  • Fix Valheim Plus autofuel compatibility.

[1.1.2] - 2021-09-16

Changed

  • Remove old fishing fixes (appears to have been fixed in latest Valheim patch)

[1.1.1] - 2021-05-14

Changed

  • Update to BepInEx 5.4.10

Fixed

  • Fix fishing

[1.1.0] - 2021-05-07

Added

  • Added "max objects per frame" configuration. Allowing for faster or slower area loading on the server.

[1.0.3] - 2021-04-21

Fixed

  • Fix Ship container access and improve Ship ownership transfer
  • Fix Ship taking 10 damage when owner changes to server.

[1.0.2] - 2021-04-19

Fixed

  • Fix objects not being created on the server in 0.150.3.

[1.0.1] - 2021-04-15

Fixed

  • Prevent event monsters from spawning outside of the random event area, during a random event.