re-report note: I've been running with this patch on my server for the last couple of months without any issues; It would be a massive QoL improvement for dedicated servers if this patch would be accepted.
original post:
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.
The result of this patch is that the in-game World Settings Picker mod changes persist through cold starts of the server, which is to say, every time there is a hotfix, beta branch, etc. It's a *much* better experience than having to mess with worldgenoverride.lua by hand.
Try using Zark's World Settings Picker mod without this patch and notice that any settings chosen using the mod won't be applied with a full stop /startof the dst_dedicated process. Try again with this patch (and without leveldataoverride which always has precedence) and notice that settings now persist properly.
- 1
- 1
There are no comments to display.
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