Skip to content

Friends

Access information about individual users and interact with theĀ Steam Overlay.

Only available in the main GodotSteam branches

Functions

activateGameOverlay

activateGameOverlay( string type )

Activates the overlay with optional dialog to open the following:

  • "Friends"
  • "Community"
  • "Players"
  • "Settings"
  • "OfficialGameGroup"
  • "Stats"
  • "Achievements"
  • "LobbyInvite"

Returns: void


Read more in the official Steamworks SDK documentation

activateGameOverlayInviteDialog

activateGameOverlayInviteDialog( uint64_t steam_id )

Activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.

Returns: void


Read more in the official Steamworks SDK documentation

activateGameOverlayInviteDialogConnectString

activateGameOverlayInviteDialogConnectString( string connect_string )

Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends.

Returns: void

activateGameOverlayToStore

activateGameOverlayToStore( uint32_t app_id =0 )

Activates the overlay with the application/game Steam store page.

Returns: void


Read more in the official Steamworks SDK documentation

activateGameOverlayToUser

activateGameOverlayToUser( string type, uint64_t steam_id )

Activates the overlay to the following:

  • "steamid"
  • "chat"
  • "jointrade"
  • "stats"
  • "achievements"
  • "friendadd"
  • "friendremove"
  • "friendrequestaccept"
  • "friendrequestignore"

Returns: void


Read more in the official Steamworks SDK documentation

activateGameOverlayToWebPage

activateGameOverlayToWebPage( string url )

Activates the overlay with specified web address.

Returns: void


Read more in the official Steamworks SDK documentation

clearRichPresence

clearRichPresence()

Clear the game information in Steam; used in 'View Game Info' section of Friends list.

Returns: void


Read more in the official Steamworks SDK documentation

closeClanChatWindowInSteam

closeClanChatWindowInSteam( uint64_t chat_id )

Closes the specified Steam group chat room in the Steam UI.

Returns: bool


Read more in the official Steamworks SDK documentation

downloadClanActivityCounts

downloadClanActivityCounts( uint64_t clan_id, int clans_to_request )

Refresh the Steam Group activity data or get the data from groups other than one that the current user is a member. After receiving the callback you can then use getClanActivityCounts to get the up to date user counts.

Triggers a clan_activity_downloaded callback.

Returns: void


Read more in the official Steamworks SDK documentation

enumerateFollowingList

enumerateFollowingList( uint32 start_index )

Gets the list of users that the current user is following. You can be following people that are not your friends. Following allows you to receive updates when the person does things like post a new piece of content to the Steam Workshop.

Triggers a enumerate_following_list callback.

Returns: void

Note: This returns up to k_cEnumerateFollowersMax users at once. If the current user is following more than that, you will need to call this repeatedly, with unStartIndex set to the total number of followers that you have received so far. I.E. If you have received 50 followers, and the user is following 105, you will need to call this again with unStartIndex = 50 to get the next 50, and then again with unStartIndex = 100 to get the remaining 5 users.


Read more in the official Steamworks SDK documentation

getChatMemberByIndex

getChatMemberByIndex( uint64_t clan_id, int user )

Gets the Steam ID at the given index in a Steam group chat.

Returns: uint64_t

Note: You must call getClanChatMemberCount before calling this.


Read more in the official Steamworks SDK documentation

getClanActivityCounts

getClanActivityCounts( uint64_t clan_id )

Gets the most recent information we have about what the users in a Steam Group are doing. This can only retrieve data that the local client knows about. To refresh the data or get data from a group other than one that the current user is a member of you must call downloadClanActivityCounts.

Returns: dictionary

Contains the following keys:

  • clan (uint64_t)
  • online (int)
  • ingame (int)
  • chatting (int)

Read more in the official Steamworks SDK documentation

getClanByIndex

getClanByIndex( int clan )

Gets the Steam group's Steam ID at the given index.

Returns: uint64_t

Note: You must call getClanCount before calling this.


Read more in the official Steamworks SDK documentation

getClanChatMemberCount

getClanChatMemberCount( uint64_t clan_id )

Get the number of users in a Steam group chat.

Returns: int

Note: Large steam groups cannot be iterated by the local user.

Note: The current user must be in a lobby to retrieve the Steam IDs of other users in that lobby. This is used for iteration, after calling this then getChatMemberByIndex can be used to get the Steam ID of each person in the chat.


Read more in the official Steamworks SDK documentation

getClanChatMessage

getClanChatMessage( uint64_t chat_id, int message )

Gets the data from a Steam group chat room message. This should only ever be called in response to a connected_clan_chat_message callback.

Returns: dictionary

Contains the following keys:

  • ret (bool)
  • text (string)
  • type (int)
  • chatter (uint64_t) as a Steam ID

Read more in the official Steamworks SDK documentation

getClanCount

getClanCount()

Gets the number of Steam groups that the current user is a member of. This is used for iteration, after calling this then getClanByIndex can be used to get the Steam ID of each Steam group.

Returns: int


Read more in the official Steamworks SDK documentation

getClanName

getClanName( uint64_t clan_id )

Gets the display name for the specified Steam group; if the local client knows about it.

Returns: string


Read more in the official Steamworks SDK documentation

getClanOfficerByIndex

getClanOfficerByIndex( uint64_t clan_id, int officer )

Gets the Steam ID of the officer at the given index in a Steam group.

Returns: uint64_t

Note: You must call getClanOfficerCount before calling this.


Read more in the official Steamworks SDK documentation

getClanOfficerCount

getClanOfficerCount( uint64_t clan_id )

Gets the number of officers (administrators and moderators) in a specified Steam group. This also includes the owner of the Steam group. This is used for iteration, after calling this then getClanOfficerByIndex can be used to get the Steam ID of each officer.

Returns: int

Note: You must call requestClanOfficerList before this to get the required data.


Read more in the official Steamworks SDK documentation

getClanOwner

getClanOwner( uint64_t clan_id )

Get the steam ID of the clan owner.

Returns: uint64_t


Read more in the official Steamworks SDK documentation

getClanTag

getClanTag( uint64_t clan_id )

Gets the unique tag (abbreviation) for the specified Steam group; If the local client knows about it. The Steam group abbreviation is a unique way for people to identify the group and is limited to 12 characters. In some games this will appear next to the name of group members.

Returns: string


Read more in the official Steamworks SDK documentation

getCoplayFriend

getCoplayFriend( int friend_number )

Gets the Steam ID of the recently played with user at the given index.

Returns: uint64_t


Read more in the official Steamworks SDK documentation

getCoplayFriendCount

getCoplayFriendCount()

Gets the number of players that the current users has recently played with, across all games. This is used for iteration, after calling this then getCoplayFriend can be used to get the Steam ID of each player. These players are have been set with previous calls to setPlayedWith.

Returns: int


Read more in the official Steamworks SDK documentation

getFollowerCount

getFollowerCount( uint64_t steam_id )

Gets the number of users following the specified user.

Triggers a get_follower_count callback.

Returns: void


Read more in the official Steamworks SDK documentation

getFriendByIndex

getFriendByIndex( int friend_number, int friend_flags )

Gets the Steam ID of the user at the given index.

See the FriendFlags enum for possible values to pass in.

Returns: int

Note: You must call getFriendCount, passing in the same friend_flags value, before calling this.


Read more in the official Steamworks SDK documentation

getFriendCoplayGame

getFriendCoplayGame( uint64_t friend_id )

Gets the app ID of the game that user played with someone on their recently-played-with list.

Returns: uint32_t


Read more in the official Steamworks SDK documentation

getFriendCoplayTime

getFriendCoplayTime( uint64_t friend_id )

Gets the timestamp of when the user played with someone on their recently-played-with list. The time is provided in Unix epoch format (seconds since Jan 1st 1970).

Returns: int


Read more in the official Steamworks SDK documentation

getFriendCount

getFriendCount( int friend_flags )

Gets the number of users the client knows about who meet a specified criteria. (Friends, blocked, users on the same server, etc). This can be used to iterate over all of the users by calling getFriendByIndex to get the Steam IDs of each user.

See the FriendFlags enum for possible values to pass in.

Returns: int

Note: Returns -1 if the current user is not logged on.


Read more in the official Steamworks SDK documentation

getFriendCountFromSource

getFriendCountFromSource( uint64_t source_id )

Get the number of users in a source (Steam group, chat room, lobby, or game server). This is used for iteration, after calling this then getFriendFromSourceByIndex can be used to get the Steam ID of each person in the source.

Returns: int

Note: Large Steam groups cannot be iterated by the local user.

Note: If you're getting the number of lobby members then you should use getNumLobbyMembers instead.


Read more in the official Steamworks SDK documentation

getFriendFromSourceByIndex

getFriendFromSourceByIndex( uint64_t source_id, int friend_number )

Gets the Steam ID at the given index from a source (Steam group, chat room, lobby, or game server).

Returns: uint64_t

Note: You must call getFriendCountFromSource before calling this.


Read more in the official Steamworks SDK documentation

getFriendGamePlayed

getFriendGamePlayed( uint64_t steam_id )

Checks if the specified friend is in a game, and gets info about the game if they are.

Returns: dictionary

Contains the following keys:

  • game_port (uint16)
  • id (int) as App ID
  • ip (string)
  • lobby (uint64_t or String)
    • If the friend is in a lobby visible to the user, it will be an int of the Lobby ID
    • Otherwise, it will be a String equal to: "No valid lobby"
  • query_port (uint16)

Note: The dictionary will be empty if the friend is offline or not playing a game.


Read more in the official Steamworks SDK documentation

getFriendMessage

getFriendMessage( uint64_t friend_id, int message )

Gets the data from a Steam friends message. This should only ever be called in response to a connected_friend_chat_message callback.

Returns: dictionary

Contains the following keys:

  • ret (int)
  • text (string)

Read more in the official Steamworks SDK documentation

getFriendPersonaName

getFriendPersonaName( uint64_t steam_id )

Gets the specified user's persona (display) name. This will only be known to the current user if the other user is in their friends list, on the same game server, in a chat room or lobby, or in a small Steam group with the local user. To get the persona name of the current user use getPersonaName.

Returns: string

Note: Upon on first joining a lobby, chat room, or game server the current user will not known the name of the other users automatically; that information will arrive asynchronously via persona_state_change callbacks.


Read more in the official Steamworks SDK documentation

getFriendPersonaNameHistory

getFriendPersonaNameHistory( uint64_t steam_id, int name_history )

Gets one of the previous display names for the specified user. This only works for display names that the current user has seen on the local computer.

Returns: string


Read more in the official Steamworks SDK documentation

getFriendPersonaState

getFriendPersonaState()

Gets the current status of the specified user. This will only be known to the current user if the other user is in their friends list, on the same game server, in a chat room or lobby, or in a small Steam group with the local user. To get the state of the current user use getPersonaState.

Returns: int

Should be one of the following:

  • 0 - Offline
  • 1 - Online
  • 2 - Busy
  • 3 - Away
  • 4 - Snooze
  • 5 - Looking For Trade
  • 6 - Looking for Play

Read more in the official Steamworks SDK documentation

getFriendRelationship

getFriendRelationship( uint64_t steam_id )

Gets a relationship to a specified user.

Returns: int

Should be one of the following:

  • 0 - None
  • 1 - Blocked
  • 2 - Request Recipient
  • 3 - Friend
  • 4 - Request Initiator
  • 5 - Ignored
  • 6 - Ignored Friend
  • 7 - Suggested
  • 8 - Max

Read more in the official Steamworks SDK documentation

getFriendRichPresence

getFriendRichPresence( uint64_t friend_id, string key )

Get a Rich Presence value from a specified friend (typically only used for debugging).

Returns: string


Read more in the official Steamworks SDK documentation

getFriendRichPresenceKeyCount

getFriendRichPresenceKeyCount( uint64_t friend_id )

Gets the number of Rich Presence keys that are set on the specified user. This is used for iteration, after calling this then getFriendRichPresenceKeyByIndex to get the rich presence keys. This is typically only ever used for debugging purposes.

Returns: int


Read more in the official Steamworks SDK documentation

getFriendRichPresenceKeyByIndex

getFriendRichPresenceKeyByIndex( uint64_t friend_id, int key )

Returns an empty string ("") if the index is invalid or the specified user has no Rich Presence data available.

Returns: string


Read more in the official Steamworks SDK documentation

getFriendsGroupCount

getFriendsGroupCount()

Gets the number of friends groups (tags) the user has created. This is used for iteration, after calling this then getFriendsGroupIDByIndex can be used to get the ID of each friend group. This is not to be confused with Steam groups. Those can be obtained with getClanCount.

Returns: int


Read more in the official Steamworks SDK documentation

getFriendsGroupIDByIndex

int16 getFriendsGroupIDByIndex( int16 friend_group )

Gets the friends group ID for the given index.

Returns: int16

Note: You must call getFriendsGroupCount before calling this.


Read more in the official Steamworks SDK documentation

getFriendsGroupMembersCount

getFriendsGroupMembersCount( int16 friend_group )

Gets the number of friends in a given friends group. This should be called before getting the list of friends with getFriendsGroupMembersList.

Returns: int


Read more in the official Steamworks SDK documentation

getFriendsGroupMembersList

array getFriendsGroupMembersList( int16 friend_group, int member_count )

Gets the number of friends in the given friends group. If fewer friends exist than requested those positions' Steam IDs will be invalid. You must call getFriendsGroupMembersCount before calling this to set up the member_count argument with an appropriate size!

Returns: array

Contains a list of:

  • friend Steam IDs (uint64_t)

Read more in the official Steamworks SDK documentation

getFriendsGroupName

getFriendsGroupName( int16 friend_group )

Gets the name for the given friends group.

Returns: string


Read more in the official Steamworks SDK documentation

getFriendSteamLevel

getFriendSteamLevel( uint64_t steam_id )

Gets the Steam level of the specified user. You can use the local users Steam ID to get their level.

Returns: int


Read more in the official Steamworks SDK documentation

getLargeFriendAvatar

getLargeFriendAvatar( uint64_t steam_id )

Note: Consider using getPlayerAvatar instead because it simplifies the process of getting avatar data.

Gets a handle to the large (128x128px) avatar for the specified user. You can pass in getSteamID to get the current user's avatar.

Note: It is possible for the size to be larger than 128x128 if the user uploaded a larger image to their profile.

Returns: int

A Steam image handle which is used with getImageSize and getImageRGBA.

Note: This only works for users that the local user knows about. They will automatically know about their friends, people on leaderboards they've requested, or people in the same source as them (Steam group, chat room, lobby, or game server). If they don't know about them then you must call requestUserInformation to cache the avatar locally.


Read more in the official Steamworks SDK documentation

getMediumFriendAvatar

getMediumFriendAvatar( uint64_t steam_id )

Note: Consider using getPlayerAvatar instead because it simplifies the process of getting avatar data.

Gets a handle to the medium (64x64px) avatar for the specified user. You can pass in getSteamID to get the current user's avatar.

Returns: int

A Steam image handle which is used with getImageSize and getImageRGBA.

Note: This only works for users that the local user knows about. They will automatically know about their friends, people on leaderboards they've requested, or people in the same source as them (Steam group, chat room, lobby, or game server). If they don't know about them then you must call requestUserInformation to cache the avatar locally.


Read more in the official Steamworks SDK documentation

getPersonaName

getPersonaName()

Gets the current user's persona (display) name. This is the same name that is displayed the users community profile page. To get the persona name of other users use getFriendPersonaName.

Returns: string


Read more in the official Steamworks SDK documentation

getPersonaState

getPersonaState()

Gets the friend status of the current user. To get the state of other users use getFriendPersonaState.

Returns: int

Should be one of the following:

  • 0 - Offline
  • 1 - Online
  • 2 - Busy
  • 3 - Away
  • 4 - Snooze
  • 5 - Looking For Trade
  • 6 - Looking for Play

Read more in the official Steamworks SDK documentation

getPlayerAvatar

getPlayerAvatar( int size = 2, uint64_t steam_id = 0 )

Get a player's avatar. This is the preferred method of getting avatars as it shortcuts the various avatar functions in Steamworks to reduce the number of steps required.

Size can be passed as the AvatarSizes enum or an integer:

  • 1 (small)
  • 2 (medium)
  • 3 (large)

If no steam_id is passed in, it will get the current user's avatar.

Triggers an avatar_loaded callback.

Returns: void

Note: This is a unique function to GodotSteam. See the Avatars tutorial for more information.

getPlayerNickname

getPlayerNickname( uint64_t steam_id )

Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.

Returns: string


Read more in the official Steamworks SDK documentation

getProfileItemPropertyString

getProfileItemPropertyString( uint64_t steam_id, int item_type, int item_property )

Returns a string property for a user's equipped profile item.

Returns: string


Read more in the official Steamworks SDK documentation

getProfileItemPropertyInt

getProfileItemPropertyInt( uint64_t steam_id, int item_type, int item_property )

Returns an unsigned integer property for a user's equipped profile item.

Returns: uint32


Read more in the official Steamworks SDK documentation

getRecentPlayers

getRecentPlayers()

Get list of players user has recently played game with.

Returns: array

Contains a list of:

  • player (dictionary)

Contains the following keys:

  • id (uint64_t) as friend Steam ID.
  • name (string)
  • time (int)
  • status (int)

Note: This is a unique function to GodotSteam.

getSmallFriendAvatar

getSmallFriendAvatar( uint64_t steam_id )

Note: Consider using getPlayerAvatar instead because it simplifies the process of getting avatar data.

Gets a handle to the small (32x32px) avatar for the specified user. You can pass in getSteamID to get the current user's avatar.

Returns: int

A Steam image handle which is used with getImageSize and getImageRGBA.

Note: This only works for users that the local user knows about. They will automatically know about their friends, people on leaderboards they've requested, or people in the same source as them (Steam group, chat room, lobby, or game server). If they don't know about them then you must call requestUserInformation to cache the avatar locally.


Read more in the official Steamworks SDK documentation

getUserFriendsGroups

getUserFriendsGroups()

Get list of friends groups (tags) the user has created. This is not to be confused with Steam groups.

Returns: array

Contains a list of:

  • tags (dictionary)

Contains the following keys:

  • id (int16) as friend group ID
  • name (string)
  • members (int)

getUserRestrictions

getUserRestrictions()

If current user is chat restricted, they can't send or receive any text or voice chat messages. The user can't see custom avatars. But the user can be online and send or receive game invites. A chat restricted user cannot add friends or join any groups. Restricted users can still be online and send/receive game invites.

Returns: uint32

It should be one of the following:

  • 0 - None
  • 1 - Unknown
  • 2 - Any Chat
  • 4 - Voice Chat
  • 8 - Group Chat
  • 16 - Rating
  • 32 - Game Invites
  • 64 - Trading

Read more in the official Steamworks SDK documentation

getUserSteamFriends

getUserSteamFriends()

Get a list of user's Steam friends; a mix of different Steamworks API friend functions.

Returns: array

Contains a list of:

  • friends (dictionary)

Contains the following keys:

  • id (uint64_t) as friend Steam ID
  • name (string)
  • status (int)

Note: This is a unique function to GodotSteam.

getUserSteamGroups

array getUserSteamGroups()

Get list of user's Steam groups; a mix of different Steamworks API group functions.

Returns: array

Contains groups (dictionary) that contains the following keys:

  • id (uint64_t) as group ID
  • name (string)
  • tag (string)

Note: This is a unique function to GodotSteam.

hasEquippedProfileItem

hasEquippedProfileItem( uint64_t steam_id, int item_type )

After calling requestEquippedProfileItems, you can use this function to check if the user has a type of profile item equipped or not.

Returns: void

Notes: Triggers a equipped_profile_items callback.


Read more in the official Steamworks SDK documentation

hasFriend

hasFriend( uint64_t steam_id, int friend_flags )

Returns true if the specified user meets any of the criteria specified in friend_flags:

  • 0x00 - None
  • 0x01 - Blocked
  • 0x02 - Friendship Requested
  • 0x04 - Immediate
  • 0x08 - Clan Member
  • 0x10 - On Game Server
  • 0x80 - Requesting Friendship
  • 0x100 - Requesting Info
  • 0x200 - Ignored
  • 0x400 - Ignored Friend
  • 0x0000 - Chat Member
  • 0xFFFF - All

Returns: bool


Read more in the official Steamworks SDK documentation

inviteUserToGame

inviteUserToGame( uint64_t friend_id, string connect_string )

Invites a friend or clan member to the current game using a special invite string. If the target user accepts the invite then the pchConnectString gets added to the command-line when launching the game. If the game is already running for that user, then they will receive a join_game_requested callback with the connect string.

Returns: bool


Read more in the official Steamworks SDK documentation

isClanChatAdmin

isClanChatAdmin( uint64_t chat_id, uint64_t steam_id )

Checks if a user in the Steam group chat room is an admin.

Returns: bool


Read more in the official Steamworks SDK documentation

isClanPublic

isClanPublic( uint64_t clan_id )

Checks if the Steam group is public.

Returns: bool


Read more in the official Steamworks SDK documentation

isClanOfficialGameGroup

isClanOfficialGameGroup( uint64_t clan_id )

Checks if the Steam group is an official game group/community hub.

Returns: bool


Read more in the official Steamworks SDK documentation

isClanChatWindowOpenInSteam

isClanChatWindowOpenInSteam( uint64_t chat_id )

Checks if the Steam Group chat room is open in the Steam UI.

Returns: bool


Read more in the official Steamworks SDK documentation

isFollowing

isFollowing( uint64_t steam_id )

Checks if the current user is following the specified user.

Triggers a is_following callback.

Returns: void


Read more in the official Steamworks SDK documentation

isUserInSource

isUserInSource( uint64_t steam_id, uint64_t source_id )

Checks if a specified user is in a source (Steam group, chat room, lobby, or game server).

Returns: bool


Read more in the official Steamworks SDK documentation

joinClanChatRoom

joinClanChatRoom( uint64_t clan_id )

Allows the user to join Steam group (clan) chats right within the game. The behavior is somewhat complicated, because the user may or may not be already in the group chat from outside the game or in the overlay. You can use activateGameOverlayToUser to open the in-game overlay version of the chat.

Triggers a join_clan_chat_complete callback.

May additionally trigger the following callbacks:

Returns: void


Read more in the official Steamworks SDK documentation

leaveClanChatRoom

leaveClanChatRoom( uint64_t clan_id )

Leaves a Steam group chat that the user has previously entered with joinClanChatRoom.

Returns: bool


Read more in the official Steamworks SDK documentation

openClanChatWindowInSteam

openClanChatWindowInSteam( uint64_t chat_id )

Opens the specified Steam group chat room in the Steam UI.

Returns: bool


Read more in the official Steamworks SDK documentation

registerProtocolInOverlayBrowser

registerProtocolInOverlayBrowser( string protocol )

Call this before calling activateGameOverlayToWebPage to have the Steam Overlay Browser block navigations to your specified protocol (scheme) uris and instead dispatch a overlay_browser_protocol callback to your game. activateGameOverlayToWebPage must have been called with 1.

Returns: bool

Note: While this function is in the SDK, it is not listed in the Steamworks docs.

replyToFriendMessage

replyToFriendMessage( uint64_t steam_id, string message )

Sends a message to a Steam friend.

Returns: bool


Read more in the official Steamworks SDK documentation

requestClanOfficerList

requestClanOfficerList( uint64_t clan_id )

Requests information about a Steam group officers (administrators and moderators).

Triggers a request_clan_officer_list callback.

Returns: void

Note: You can only ask about Steam groups that a user is a member of.

Note: This won't download avatars for the officers automatically. If no avatar image is available for an officer, then call requestUserInformation to download the avatar.


Read more in the official Steamworks SDK documentation

requestFriendRichPresence

requestFriendRichPresence( uint64_t friend_id )

Requests Rich Presence data from a specific user. This is used to get the Rich Presence information from a user that is not a friend of the current user, like someone in the same lobby or game server. This function is rate limited, if you call this too frequently for a particular user then it will just immediately post a callback without requesting new data from the server.

Triggers a friend_rich_presence_update callback.

Returns: void


Read more in the official Steamworks SDK documentation

requestUserInformation

requestUserInformation( uint64_t steam_id, bool require_name_only )

Requests the persona name and the avatar of a specified user.

NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, set require_name_only to true.

Returns: bool


Read more in the official Steamworks SDK documentation

sendClanChatMessage

sendClanChatMessage( uint64_t chat_id, string text )

Sends a message to a Steam group chat room.

Returns: bool


Read more in the official Steamworks SDK documentation

setInGameVoiceSpeaking

setInGameVoiceSpeaking( uint64_t steam_id, bool speaking )

User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI).

Let Steam know that the user is currently using voice chat in game. This will suppress the microphone for all voice communication in the Steam UI.

Returns: void


Read more in the official Steamworks SDK documentation

setListenForFriendsMessages

setListenForFriendsMessages( bool intercept )

Listens for Steam friends chat messages. You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2. After enabling this you will receive connected_friend_chat_message callbacks when ever the user receives a chat message. You can get the actual message data from this callback with getFriendMessage. You can send messages with replyToFriendMessage.

Triggers a connected_friend_chat_message callback.

Returns: bool


Read more in the official Steamworks SDK documentation

setPersonaName

setPersonaName( string name )

Sets the current user's persona name, stores it on the server and publishes the changes to all friends who are online. Changes take place locally immediately, and a persona_state_change callback is posted, presuming success. If the name change fails to happen on the server, then an additional persona_state_change callback will be posted to change the name back, in addition to the final result available in the call result.

Triggers a name_changed callback.

Returns: void


Read more in the official Steamworks SDK documentation

setPlayedWith

setPlayedWith( uint64_t steam_id )

Set player as 'Played With' for game.

Returns: void

Note: The current user must be in game with the other player for the association to work.


Read more in the official Steamworks SDK documentation

setRichPresence

setRichPresence( string key, string value )

Sets a Rich Presence key/value for the current user that is automatically shared to all friends playing the same game. Each user can have up to 20 keys set as defined by k_cchMaxRichPresenceKeys. There are two special keys used for viewing/joining games:

status - A UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list.

connect - A UTF-8 string that contains the command-line for how a friend can connect to a game. This enables the 'join game' button in the 'view game info' dialog, in the steam friends list right click menu, and on the players Steam community profile. Be sure your app implements getLaunchCommandLine so you can disable the popup warning when launched via a command line.

There are three additional special keys used by the new Steam Chat:

steam_display - Names a rich presence localization token that will be displayed in the viewing user's selected language in the Steam client UI. See Rich Presence Localization for more info, including a link to a page for testing this rich presence data. If steam_display is not set to a valid localization tag, then rich presence will not be displayed in the Steam client.

steam_player_group - When set, indicates to the Steam client that the player is a member of a particular group. Players in the same group may be organized together in various places in the Steam UI. This string could identify a party, a server, or whatever grouping is relevant for your game. The string itself is not displayed to users.

steam_player_group_size - When set, indicates the total number of players in the steam_player_group. The Steam client may use this number to display additional information about a group when all of the members are not part of a user's friends list. (For example, "Bob, Pete, and 4 more".)

You can clear all of the keys for the current user with clearRichPresence. To get rich presence keys for friends use getFriendRichPresence.

Returns: bool


Read more in the official Steamworks SDK documentation

Signals

These callbacks require you to run Steam.run_callbacks() in your _process() function to receive them.

avatar_loaded

avatar_loaded

Called when a large avatar is loaded if you have tried requesting it when it was unavailable.

Emits signal in response to function getLargeFriendAvatar, getMediumFriendAvatar, or getSmallFriendAvatar.

Returns:

  • avatar_id (uint64_t)
  • width (int)
  • data (PoolByteArray)

Read more in the official Steamworks SDK documentation

avatar_image_loaded

avatar_image_loaded

Called when an avatar is requested; sends back the raw Steamworks callback data compared to avatar_loaded.

Emits signal in response to function getLargeFriendAvatar, getMediumFriendAvatar, or getSmallFriendAvatar.

Returns:

  • avatar_id (uint64_t)
  • avatar_handle (uint32_t)
  • width (uint32_t)
  • height (uint32_t)

Read more in the official Steamworks SDK documentation

change_server_requested

change_server_requested

This callback is made when joining a game. If the user is attempting to join a lobby, then the callback [join_requested] will be made.

Returns:

  • server (string)
  • password (string)

Read more in the official Steamworks SDK documentation

clan_activity_downloaded

clan_activity_downloaded

Called when a Steam group activity has received.

Emits signal in response to function downloadClanActivityCounts.

Returns:

  • online (int)
  • in_game (int)
  • chatting (int)

Read more in the official Steamworks SDK documentation

connected_chat_join

connected_chat_join

Called when a user has joined a Steam group chat that the we are in.

Returns:

  • chat_id (uint64_t)
  • steam_id (uint64_t)

Read more in the official Steamworks SDK documentation

connected_chat_leave

connected_chat_leave

Called when a user has left a Steam group chat that the we are in.

Returns:

  • chat_id (uint64_t)
  • steam_id (uint64_t)
  • kicked (bool)
  • dropped (bool)

Read more in the official Steamworks SDK documentation

connected_clan_chat_message

connected_clan_chat_message

Called when a chat message has been received in a Steam group chat that we are in.

Returns:

  • chat (dictionary):
    • ret (int)
    • text (string)
    • type (string)
    • chatter (uint64_t)

Read more in the official Steamworks SDK documentation

connected_friend_chat_message

connected_friend_chat_message

Called when chat message has been received from a friend.

Returns:

  • chat (dictionary):
    • ret (int)
    • text (string)

Read more in the official Steamworks SDK documentation

enumerate_following_list

enumerate_following_list

Returns the result of enumerateFollowingList.

Returns:

  • message (string)
  • following (array)
    • follow (dictionary)
      • num (int)
      • id (uint64_t)

Read more in the official Steamworks SDK documentation

equipped_profile_items

equipped_profile_items

Call result from requestEquippedProfileItems. Also sent as a callback.

Returns:

  • result (int)
  • steam_id (uint64_t)
  • profile_data (dictionary)
    • avatar_animated (bool)
    • avatar_frame (bool)
    • profile_modifier (bool)
    • profile_background (bool)
    • profile_mini_background (bool)

Read more in the official Steamworks SDK documentation

equipped_profile_items_changed

equipped_profile_items_changed

Callback for when a user's equipped Steam Commuity profile items have changed. This can be for the current user or their friends.

Returns:

  • steam_id (uint64_t)

Note: GodotSteam is using the callback version.


Read more in the official Steamworks SDK documentation

friend_rich_presence_update

friend_rich_presence_update

Called when rich presence data has been updated for a user, this can happen automatically when friends in the same game update their rich presence, or after a call to requestFriendRichPresence.

Returns:

  • steam_id (uint64_t)
  • app_id (uint32)

Read more in the official Steamworks SDK documentation

get_follower_count

get_follower_count

Returns the result of getFollowerCount.

Returns:

  • result (int)
  • steam_id (uint64_t)
  • count (int)

Read more in the official Steamworks SDK documentation

is_following

is_following

Returns the result of isFollowing.

Returns:

  • result (int)
  • steam_id (uint64_t)
  • following (bool)

Read more in the official Steamworks SDK documentation

join_clan_chat_complete

join_clan_chat_complete

Posted when the user has attempted to join a Steam group chat via joinClanChatRoom.

Returns:

  • chat_id (uint64_t)
  • response (int)

Read more in the official Steamworks SDK documentation

join_game_requested

join_game_requested

Called when the user tries to join a game from their friends list or after a user accepts an invite by a friend with inviteUserToGame.

Emits signal in response to receiving a Steam invite.

Returns:

  • user (uint64_t)
  • connect (string)

Read more in the official Steamworks SDK documentation

join_requested

join_requested

Called when the user tries to join a lobby from their friends list or after a user accepts an invite by a friend with inviteUserToGame.

Emits signal in response to receiving a Steam invite.

Returns:

  • lobby (uint64_t)
  • steam_id (uint64_t)

Read more in the official Steamworks SDK documentation

name_changed

name_changed

Reports the result of an attempt to change the current user's persona name.

Emits signal in response to function setPersonaName.

Returns:

  • success (bool)
  • local_success (bool)
  • result (int)

Read more in the official Steamworks SDK documentation

overlay_browser_protocol

overlay_browser_protocol

Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by registerProtocolInOverlayBrowser.

Returns:

  • uri (string)

overlay_toggled

overlay_toggled

Posted when the Steam Overlay activates or deactivates. The game can use this to be pause or resume single player games.

Returns:

  • toggled (bool)
  • user_initiated (bool)
  • app_id (int)

Read more in the official Steamworks SDK documentation

persona_state_change

persona_state_change

This is called when a user has some kind of change.

Returns:

  • steam_id (uint64_t)
  • flags (int)

Read more in the official Steamworks SDK documentation

request_clan_officer_list

request_clan_officer_list

Marks the return of a request officer list call.

Emits signal in response to function requestClanOfficerList.

Returns:

  • message (string)
  • officers_list (array)
    • officer (dictionary)
      • id (uint64_t)
      • name (string)

Read more in the official Steamworks SDK documentation

unread_chat_messages_changed

unread_chat_messages_changed

Invoked when the status of unread messages changes

Returns: nothing

Enums

AvatarSizes

Enumerator Value
AVATAR_SMALL 1
AVATAR_MEDIUM 2
AVATAR_LARGE 3

CommunityProfileItemType

Enumerator Value
PROFILE_ITEM_TYPE_ANIMATED_AVATAR 0
PROFILE_ITEM_TYPE_AVATAR_FRAME 1
PROFILE_ITEM_TYPE_PROFILE_MODIFIER 2
PROFILE_ITEM_TYPE_PROFILE_BACKGROUND 3
PROFILE_ITEM_TYPE_MINI_PROFILE_BACKGROUND 4

CommunityProfileItemProperty

Enumerator Value
PROFILE_ITEM_PROPERTY_IMAGE_SMALL 0
PROFILE_ITEM_PROPERTY_IMAGE_LARGE 1
PROFILE_ITEM_PROPERTY_INTERNAL_NAME 2
PROFILE_ITEM_PROPERTY_TITLE 3
PROFILE_ITEM_PROPERTY_DESCRIPTION 4
PROFILE_ITEM_PROPERTY_APP_ID 5
PROFILE_ITEM_PROPERTY_TYPE_ID 6
PROFILE_ITEM_PROPERTY_CLASS 7
PROFILE_ITEM_PROPERTY_MOVIE_WEBM 8
PROFILE_ITEM_PROPERTY_MOVIE_MP4 9
PROFILE_ITEM_PROPERTY_MOVIE_WEBM_SMALL 10
PROFILE_ITEM_PROPERTY_MOVIE_MP4_SMALL 11

FriendFlags

Enumerator Value
FRIEND_FLAG_NONE 0X00
FRIEND_FLAG_BLOCKED 0X01
FRIEND_FLAG_FRIENDSHIP_REQUESTED 0X02
FRIEND_FLAG_IMMEDIATE 0X04
FRIEND_FLAG_CLAN_MEMBER 0X08
FRIEND_FLAG_ON_GAME_SERVER 0X10
FRIEND_FLAG_REQUESTING_FRIENDSHIP 0X80
FRIEND_FLAG_REQUESTING_INFO 0X100
FRIEND_FLAG_IGNORED 0X200
FRIEND_FLAG_IGNORED_FRIEND 0X400
FRIEND_FLAG_CHAT_MEMBER 0X1000
FRIEND_FLAG_ALL 0XFFFF

FriendRelationship

Enumerator Value
FRIEND_RELATION_NONE 0
FRIEND_RELATION_BLOCKED 1
FRIEND_RELATION_REQUEST_RECIPIENT 2
FRIEND_RELATION_FRIEND 3
FRIEND_RELATION_REQUEST_INITIATOR 4
FRIEND_RELATION_IGNORED 5
FRIEND_RELATION_IGNORED_FRIEND 6
FRIEND_RELATION_SUGGESTED 7
FRIEND_RELATION_MAX 8

OverlayToStoreFlag

Enumerator Value
OVERLAY_TO_STORE_FLAG_NONE 0
OVERLAY_TO_STORE_FLAG_ADD_TO_CART 1
OVERLAY_TO_STORE_FLAG_AND_TO_CART_AND_SHOW 2

OverlayToWebPageMode

Enumerator Value
OVERLAY_TO_WEB_PAGE_MODE_DEFAULT 0
OVERLAY_TO_WEB_PAGE_MODE_MODAL 1

PersonaChange

Enumerator Value
PERSONA_CHANGE_NAME 0X0001
PERSONA_CHANGE_STATUS 0X0002
PERSONA_CHANGE_COME_ONLINE 0X0004
PERSONA_CHANGE_GONE_OFFLINE 0X0008
PERSONA_CHANGE_GAME_PLAYED 0X0010
PERSONA_CHANGE_GAME_SERVER 0X0020
PERSONA_CHANGE_AVATAR 0X0040
PERSONA_CHANGE_JOINED_SOURCE 0X0080
PERSONA_CHANGE_LEFT_SOURCE 0X0100
PERSONA_CHANGE_RELATIONSHIP_CHANGED 0X0200
PERSONA_CHANGE_NAME_FIRST_SET 0X0400
PERSONA_CHANGE_FACEBOOK_INFO 0X0800
PERSONA_CHANGE_NICKNAME 0X1000
PERSONA_CHANGE_STEAM_LEVEL 0X2000

PersonaState

Enumerator Value
PERSONA_STATE_OFFLINE 0
PERSONA_STATE_ONLINE 1
PERSONA_STATE_BUSY 2
PERSONA_STATE_AWAY 3
PERSONA_STATE_SNOOZE 4
PERSONA_STATE_LOOKING_TO_TRADE 5
PERSONA_STATE_LOOKING_TO_PLAY 6
PERSONA_STATE_MAX 7

UserRestriction

Enumerator Value
USER_RESTRICTION_NONE 0
USER_RESTRICTION_UNKNOWN 1
USER_RESTRICTION_ANY_CHAT 2
USER_RESTRICTION_VOICE_CHAT 4
USER_RESTRICTION_GROUP_CHAT 8
USER_RESTRICTION_RATING 16
USER_RESTRICTION_GAME_INVITES 32
USER_RESTRICTION_TRADING 64