How to do config for per-player server-honored options
I think I understand the high-level difference between using Mod Configs and Mod Savegame Settings / Session Settings but I have a case that doesn't seem to fit either exactly right.
I'm making the player's use distance and build gun range configurable and it seems pretty easy to do that in single player and not too bad to get global config using Mod Configs. But I'm pretty sure the actual distances/hit results are handled server-side which means, in a multiplayer scenario, either the server needs to have one TRUE config and it will ignore client settings (not only bad UX, but I don't see a clear way to edit Mod Configs on a dedicated server, at least not through the UI) or each client setting needs to get replicated to the server and honored individually. Is my only option to somehow replicate the client-side settings to the server?
I think I could create a remote call object (RCO) that sent them to the server on config changes and then honor them there, but I want to be sure that's the right path.
I notice the wiki says Savegame Settings are replicated but I don't want players to have to configure their distances separately in each save/world they join. Could it be simpler to use the Mod Configs on the client and seamlessly write them to Savegame Settings in the background that then get replicated to the server and honored? That seems like it's getting convoluted and would likely would result in two different config UIs, one of which is ignored.
Solution:Jump to solution
So, yes, that solution worked - I created an RCO to send updates to the server, subscribed to the OnPropertyValueChanged of each config value, and then sent updates via the RCO. It turns out it seems like not everything needed to be sent to the server but I still mirrored both config values locally and on the server to minimize risk of bugs. The GameWorldModule is a tiny bit funky and self-referential because I just didn't want to deal with adding more layers. But the mod itself is pretty simple so most of the code is scaffolding to get the config to work in almost pure C++.
It's now open source if anybody wants an example: https://github.com/Epp-s-Satisfactory-Mods/LongReach...
GitHub
GitHub - Epp-s-Satisfactory-Mods/LongReach: Satisfactory QoL mod to...
Satisfactory QoL mod to extend your reach! Contribute to Epp-s-Satisfactory-Mods/LongReach development by creating an account on GitHub.
4 Replies
eventually the session settings system will support per-player options but that isn't quite ready yet. mircea can answer that in more detail
for now I suggest using mod config options and then a system for the client to tell the server what their desired values are via and RCO yeah
there is not currently a UI for editing mod configs server side
I would suggest using mod options as well, even if you need to make clients tell the values to the server
Ok, I’m gonna leave this open while I play with an RCO solution and will update when I figure it out
Solution
So, yes, that solution worked - I created an RCO to send updates to the server, subscribed to the OnPropertyValueChanged of each config value, and then sent updates via the RCO. It turns out it seems like not everything needed to be sent to the server but I still mirrored both config values locally and on the server to minimize risk of bugs. The GameWorldModule is a tiny bit funky and self-referential because I just didn't want to deal with adding more layers. But the mod itself is pretty simple so most of the code is scaffolding to get the config to work in almost pure C++.
It's now open source if anybody wants an example: https://github.com/Epp-s-Satisfactory-Mods/LongReach
GitHub
GitHub - Epp-s-Satisfactory-Mods/LongReach: Satisfactory QoL mod to...
Satisfactory QoL mod to extend your reach! Contribute to Epp-s-Satisfactory-Mods/LongReach development by creating an account on GitHub.