Closed midspace closed 5 years ago
Make sure that it's actually set to PUBLIC on the server. I don't know where keen forces it to PUBLIC but we miss that code somewhere and I haven't put my own in yet so it's technically possible for a server's world to be in offline mode, though it's pretty undesirable.
I cannot find any location to change it to public in the UI.
The DS code specially calls.
m_selectedSessionSettings.OnlineMode = MyOnlineModeEnum.PUBLIC;
It doesn't care what you the user thinks. It simply makes it PUBLIC.
I'm guessing the only workaround is for users to:
<OnlineMode>PUBLIC</OnlineMode>
If that isn't correct, please advise. I'll be passing this onto any server admins who are reporting issues to me.
There should be an online mode setting in the right-hand panel of the config tab. If not, what you listed is another valid way to do it.
We're using the different online modes for different things. Offline is currently a sort of admin-only maintenance mode. There's an option in the torch config to set the online mode.
As I said above. I cannot find any location to change it to public in the UI.
Can you provide another method for modders to reliability determine if the game is running offline, unconnected to a server? So that it can also run safely on Torch?
The UI option got lost at some point, and was only added back a few days ago.
As for mods, you have IMyMultiplayer.IsServer, IsDedicated, plus IMySession.OnlineMode. We don't really have anything that will tell mods explicitly that they're running on Torch, though.
Are there any other poorly documented changes to ModAPI accessible values under Torch that modders should be aware of?
No, just don't assume that an option will always have a certain value.
That statement doesn't give confidence to modders to run anything reliably under Torch (compared to Keen's own Dedicated Server).
Looks like the following changeset addresses the issues are Rexxar describes it, https://github.com/TorchAPI/Torch/commit/355375e9dbe5649c1e9e2642b26641079c6edd16
Guys, if you are checking in a change associated with a bug, you should use the hash number of the issue in the comment to automatically associate it. Like #252
.
Torch Version: 1.3.0.62 SE Version: 1.187.101
Expected Behavior
When making a request to the ModAPI from a Server or Client computer to
MyAPIGateway.Session.OnlineMode
it should be responding asMyOnlineModeEnum.PUBLIC
This is what occurs on the Keen vanilla Dedicated Server when connecting.Observed Behavior
When making a request to the ModAPI from Server or Client computer to
MyAPIGateway.Session.OnlineMode
, Torch is responding withMyOnlineModeEnum.OFFLINE
.OFFLINE
is reserved for single player instances which are not connected to a server.Steps to Reproduce
How did this issue get triggered? An issue was reported with a Coded ModAPI mod. While debugging the mod back, I found the issue was caused by an inappropriate setting for a public online game which confuses the mod. As a result, the mod cannot tell the difference between if it is running standalone offline (which makes it its own server), or connected to a torch server (which makes it a client only)
Write the steps here. Add the following mod to your server. 515710178 Start a Vanilla DS server. Check the Server log file for the following:
Connect with the game. Check the Client log file for the following:
Start a Torch server. Check the Server log file for the following:
Connect with the game. Check the Client log file for the following:
Other Information
Provide links to game logs or saves here if necessary. https://steamcommunity.com/sharedfiles/filedetails/?id=515710178