I posted a thread in the Dedicated Server Forum a couple of days ago highlighting some issues with managing world settings in a dedicated server. Ultimately I found that the `save/shardindex` data is ignored for dedicated servers, yet that is one of the primary ways to tweak settings in a dedicated server thanks to Zark's World Settings Picker mod.
I put together a small patch which I've been running since then which seems to fully resolve the issue.
diff --git a/scripts/networking.lua b/scripts/networking.lua
index 1aacbab..f15ee3c 100644
--- a/scripts/networking.lua
+++ b/scripts/networking.lua
@@ -873,7 +873,7 @@ function StartDedicatedServer()
end
serverdata.use_legacy_session_path = slot_server_data.use_legacy_session_path
end
- ShardGameIndex:SetServerShardData(nil, serverdata, onsaved)
+ ShardGameIndex:SetServerShardData(ShardGameIndex:GetGenOptions(), serverdata, onsaved)
end
end
end
Server admins would still have to remove the leveldataoverride.lua for that to have any effect. If leveldataoverride is somehow useful for dedicated servers beyond the first start, perhaps a more nuanced change which prioritizes the shardindex data over leveldataoverride data in SetServerShardData would be warranted.
Start a dedicated server with default settings
Use Zark's World Settings Picker mod on the client to change a setting.
Restart the dedicated process (not just c_reset()) and observe the change has been overwritten.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now