-
Notifications
You must be signed in to change notification settings - Fork 12
Multiplayer and Dedicated Servers
The mod is fully multiplayer-compatible. All soil simulation runs on the server; clients receive synced field data and settings automatically.
| 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. |
- 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
When a client connects, the mod automatically requests a full sync from the server:
- Client sends a sync request after mission load
- Server responds with all settings + all field data (streamed in batches of 32 fields to avoid freezes on large maps)
- 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 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.
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.
- 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)