Found steam sessions can not return player count or ping if not using the default online subsystem.
A game using the steam online subssytem will be unable to display the player count in the server browser.
There must be some way of solving this issue, any help is appreciated!
/Best Regards
I’ve been unable to verify yet, but it is possible this functionality was never implemented with using steam online subsystem, (just like “get ping”).
The current workaround I’ve found is to use the “Advanced Sessions” plugin and use the attachable session “extra settings” (which can be updated and retrieved) to create a custom system for keeping track of and updating the session player count that way.
It would be better to be able to retrieve the session information directly tho as I believe it would be a more stable solution.
Try getting the “Advanced Sessions” plugin, you can use “extra settings” to attach custom variables to a session which can be updated and retrieved. This would probably not work for dedicated servers tho.
/Best Regards
On this question, does anyone know how to use blueprints to update the extra settings info of a session? So that the server can update the player count? I have a blueprint only project that relies on listen server listing via steam.
For me this always returns 1 and my servers are constantly 1/max player.
I looked around and couldnt find solutions, is is possible if you can share more info about how you got the player count to work? Im using listen servers on UE 5.2 and steam subsystem. (Logic is in c++, however if you have a BP solution please also let me know of it)
Im also currently using the test 480 app id, and im testing with people from other networks so it is not LAN
I think it might be working for you because you are using a dedicated server while im using a listen server. Anyways I did figure out a way to manually do it through the gamemode using the update session function. so its all good now
There is a function called “Update Session” that you can access through the session interface that allows you to update the current session with new settings.
What you want to do is from the game mode call the update session and provide new settings. The gamemode offers 3 important things in this case
post login, abiliy to detect when player joins
logout, ability to detect when player leaves
GetNumPlayers, has an accurate number of current players.
it only runs on server so makes sense to update server from there
What i did was basically set a server key that holds my num of active players and everytime I update the session (which is when a player joins or leaves) I reset the key with the GetNumPlayers function.
If you are in blueprints I assume you can still do something similar but I dont exactly know how.
I ended up figuring this out, thank you for the response, however, on my end the server is no longer visible in the find sessions list after updating session. Any ideas as to why that is?
Are you possibly changing the server name in any way? I noticed when you update the session even if you pass in the same name again it will detect as you “changing it” which will make it not appear. if that might be your issue then update your session by getting settings then modifying only what you need modified.
something like this image where you get the already existing settings and then only modify the player count key and pass the same server name as you are not changing it.
Got it, turns out I actually reset all settings as a new settings variable but was not setting the session name so it wouldn’t appear. I implemented your GetSessionSettings() and it worked for me, thank you very much.