Lobbies
Lobby chat and invites
Text chat inside a lobby, and getting friends into it.
Chat
Steam gives every lobby a text channel with no server of your own required.
To send, call Send Lobby Chat Message with the lobby and your text.
To receive, bind On Lobby Chat Message on the SteamForge Lobbies subsystem. It gives you a Steam Lobby Chat Message:
| Field | Meaning |
|---|---|
| Lobby Id | Which lobby |
| Sender | Who sent it |
| Message | The text |
A message you send comes back to you through this event as well, so you do not need to add your own line separately. Render everything from the event and it stays consistent.
To show a sender's name, match the Sender against Get Lobby Members, or call Get Friend Info on the Friends subsystem.
Inviting friends
Three ways, in order of how much work they are.
Steam's own invite dialog
The easiest, and usually the best. Call Show Invite Dialog on the SteamForge Overlay subsystem with your lobby ID.
Steam draws the friend picker, handles the sending, and delivers the invites. Anyone who accepts arrives on your side as On Lobby Join Requested.
You do not build any UI for this.
Inviting one specific friend
If you already have a friend picker of your own, call Invite Friend To Lobby on the SteamForge Lobbies subsystem with their Steam ID.
A Join Game button on your friends list entry
The most discoverable option, because it needs no action from you at all. Publish a Rich Presence connect string and Steam puts a Join Game button next to your name in every friend's list.
On the SteamForge Friends subsystem:
In a match.+connect_lobby followed by your lobby ID.Clear both with Clear Rich Presence when the player leaves.
See Friends and presence for the details.
Handling an accepted invite
Whichever route the invite took, it arrives the same way. Bind On Lobby Join Requested and call Join Lobby (Async).
This works whether the game was already running or the invite launched it. See Joining a lobby.