I'm setting up invites to my game directly from steam friends list (platform layer). I decided to use steam lobbies and now I'm struggling with configuration of the lobby type / permissions.
Goal: I want to have a possibility to invite players (steam friends) to my lobby only if my user is a lobby owner, I want my lobby to be a private one to prevent other users to join the lobby w/o invite from LO.
So, from steam UI perspective: I want to be sure that option Invite to Game will be displayed only to lobby owner when he clicks on someone in his steam friends list view.
If user is already participating in any lobby but he is not a lobby owner - no invite/join -related options should be displayed within the steam UI. How can I do so using steam SDK?
Context: I'm working with Unreal Engine 5 which provides me a steam online subsystem (based on steamworks sdk). After investigation I've found out that the call to steam backend SteamMatchmaking()->SetLobbyType(SessionId, LobbyType)
affects the target context menu in friend list, but if this is the only place where it could be configured - I cannot find any perfect value of ELobbyType LobbyType
that could help me to reach my particular goal.
Here are all possible types:
// lobby type description
enum ELobbyType
{
k_ELobbyTypePrivate = 0, // only way to join the lobby is to invite to someone else
k_ELobbyTypeFriendsOnly = 1, // shows for friends or invitees, but not in lobby list
k_ELobbyTypePublic = 2, // visible for friends and in lobby list
k_ELobbyTypeInvisible = 3, // returned by search, but not visible to other friends
// useful if you want a user in two lobbies, for example matching groups together
// a user can be in only one regular lobby, and up to two invisible lobbies
k_ELobbyTypePrivateUnique = 4, // private, unique and does not delete when empty - only one of these may exist per unique keypair set
// can only create from webapi
};
As I thought, the most logical type for my case should be a k_ELobbyTypePrivate
, cause I want my lobby to be a private one and only lobby owner should be responsible for invites. But if I pass this one to SetLobbyType
, I won't have an option to invite a friend to my lobby session.
If I use k_ELobbyTypePublic
- all my friends have an ability to Join Game which is not acceptable.
For sure, I can manage this stuff within the code and decide whether to accept particular user to public lobby or decline, but I'd like to do not have a join option within this context menu at all. As I understand k_ELobbyTypeFriendsOnly
acts like public but just for friends, so its not suitable for me, as well as k_ELobbyTypeInvisible
and k_ELobbyTypePrivateUnique
according to their discriptions in comments.
Also I have a related question, why in CS:GO "Invite to Play" is displayed instead of "Invite to Game" as in my case when public lobby type is chosen? Is it configurable somewhere (e.g. on steampartner side or so), or in CS:GO its done outside of steamworks sdk layer?
Would be appreciated for any advices!