Skip to content

Multiplayer and Dedicated Servers

TisonK edited this page Jul 1, 2026 · 4 revisions

Multiplayer and Dedicated Servers

Overview

The mod is fully multiplayer-compatible. All soil simulation runs on the server; clients receive synced field data and settings automatically.


How it works

Role What it does
Server (host or dedicated) Runs all simulation: harvest depletion, fertilizer restoration, rain effects, seasonal changes. Authoritative for all field data and settings.
Client Receives field data on join (full sync), receives per-field updates on harvest and fertilizer events. Displays HUD and soil report using synced data.

Settings in multiplayer

  • Only the server admin (master user) can change simulation settings (difficulty, nutrient cycles, rain effects, etc.)
  • Non-admin players can view settings but cannot change them
  • When an admin changes a setting, it syncs instantly to all connected clients - including the admin's own panel
  • HUD display settings (position, color theme, font size, transparency) are per-player and never synced

Joining a multiplayer session

When a client connects, the mod automatically requests a full sync from the server:

  1. Client sends a sync request after mission load
  2. Server responds with all settings + all field data (streamed in batches of 32 fields to avoid freezes on large maps)
  3. If the server's soil system is still initializing, the client retries up to 3 times (5-second intervals)

This means it is safe to join mid-game or even immediately after the server starts - the retry handler covers any race conditions.


Dedicated servers

Dedicated servers are fully supported. The entire soil simulation runs server-side without any GUI or HUD overhead:

  • No settings UI is created server-side
  • No HUD or soil report dialog is instantiated
  • The minimap heatmap layer (soil overlay on the in-game map) is client-only - it is automatically disabled on dedicated servers and does not generate any overhead or error output
  • Console commands still work for server admins (see Console Commands)
  • Soil data and settings save and reload correctly across server restarts

Changing settings on a dedicated server:

Use the developer console (~ key on the server console, if accessible):

SoilSetDifficulty 2       -- 1=Simple, 2=Realistic, 3=Hardcore
SoilSetFertility true
SoilSetSeasonalEffects false
SoilShowSettings

Changes made via console on a dedicated server broadcast to all connected clients automatically.

Alternatively, connect as an admin via a client and use the Soil Settings panel → Admin (bind Open Soil Settings in Controls → Mods, suggested Shift+O) - changes are synced to all clients including the server.


Data saved server-side only

In multiplayer, only the server writes soilData.xml. Clients do not save soil data locally - they always receive the authoritative state from the server on join.


Known limitations

  • If the server crashes mid-session and clients reconnect, the soil data reflects the last auto-save point (same behavior as any other game data)

Clone this wiki locally