[Bug Report] Steam Server Settings always exceed k_cbMaxGameServerTags

Hello Epic,

I was stepping through the code for OnlineSessionAsyncServerSteam.cpp today, suspecting issues with my server on steam. I was getting the same warning every time I started my server, and didn’t know why. After a little bit of time I believe I have an understanding of what is going on, and I am going to try and explain it here. Bear with me.
“Server setting %s overflows Steam SetGameTags call”
k_cbMaxGameServerTags is set at 128, and from what I can tell we as developers should not increase that amount. However, this limit is being surpassed every time I make a server on steam, due to what appears to be no fault of my own.

43374-break8.png

As you can see this is alot of repeated text, the OWNINGID, OWNINGNAME, and P2PADDR, which are all generated by the engine are all firstly, equal to the same value and probably don’t need to be, and also are a length of characters that will quickly push us over the limit of our 128. You might think here that all of these values should be fine though, as they do not yet add up to anything close enough to 128 to be a concern.
The string they are being added to, however, is initialized with the value: BUILDID:955982468 and then appended to. So what is getting cut off of our GameTagsString value anyway? The last value in the list. The session flags.
Is there a workaround for this issue? I feel like these session flags may be of some importance in finding servers on steam, and would like to rule it out as a possible issue in our current build.
Thank you!

We have the exact same issue. Please update this post if you find a solution. Are you using dedicated servers on Linux as well?
http://puu.sh/i3ukf/9664db56af.png
Also, it seems like the SetGameData is successful since it’s 2048 in size. But the GameData is never returned http://puu.sh/i3uqB/99eb6cf368.png . We haven’t found a workaround for this yet, other than direct connecting with the console. Have you tried out the matchmaking interface to see if it can find the server?

I managed to set up a hacky workaround, but I have successfully found and connected to my server now.
In the function:

void GetServerKeyValuePairsFromSession(const FOnlineSession* Session, SteamSessionKeyValuePairs& KeyValuePairs)
We now have this

KeyValuePairs.Add(STEAMKEY_OWNINGUSERNAME, TEXT(“bob”));// Session->OwningUserName);

As you can see I just edited the one value in the engine code to be something ridiculous and easily findable later. I don’t know if this is the solution you were looking for, but it is the one that currently works for us.

Thank you, we’ll copy paste bob into our engine as well :slight_smile: I’ll pipe up if I find some other way to fix this. All the best!

Hello. Sorry for the inconvenience here. You can shorten all the “key names” by following the STEAMKEY_ to the #define and just keep them unique but smaller.

The ownername, id, and p2paddress are all the same right now. At least the name should really be the “server description”. The id is the user id of the server, which when using steam sockets is the same as the p2p address.

Under the old way, Valve really limits the strings. There is the one GameDataString that is 2048, if I recall right. The game tags are much smaller (128 as you mention). The former isn’t replicated down to the searching clients, but the latter is AFTER the initial matchmaking query. The first is used for master server side filtering, the latter for client side filtering.

The API Valve has for searching this data is really antiquated and to make it worse, the “advanced” search values that I have in that function aren’t even available to your game via the SDK unless you contact Valve and ask them to turn it on. That is why I have that code disabled by default, I was never able to get them to turn it on for my test app and its barely documented.

The new lobby APIs are much cleaner/better but unfortunately standalone dedicated servers don’t work with that API. So to really get the best of both worlds, you should do “complicated” matching between players via the Lobby API and then designate one of those found players to do a much simpler search for a dedicated server via the older API.

So just to recap; a client should essentially host a lobby, let other clients search/matchmake for his lobby, then search for dedicated servers from that lobby?

No. Shortening the #define STEAMKEY_… in the C++ code does nothing. The #define is only in C++ and is not the label name used in the packet.

No, he means you should shorten the string, not the define.