Namespace: steam
Language: Lua
Type: Extension
Functions and constants for interacting with Steamworks.
Type: FUNCTION Initialize Steamworks.
Returns
boolean - True if successful
string - Error message if unsuccessful.
Type: FUNCTION Update Steamworks. Call this from a script component.
Type: FUNCTION Restart Steamworks.
Parameters
appid (number)Type: FUNCTION Finalize Steamworks.
Type: VARIABLE Enter dismisses the keyboard
Type: VARIABLE User needs to explicitly dismiss the keyboard
Type: VARIABLE Keyboard is displayed in a special mode that makes it easier to enter emails
Type: VARIABLE Numeric keypad is shown
Type: VARIABLE Normal text input
Type: VARIABLE Password text input
Type: VARIABLE Single line text
Type: VARIABLE Multi line text
Type: VARIABLE Requests rows in the leaderboard from the full table.
Type: VARIABLE Requests rows in the leaderboard from rows around the user.
Type: VARIABLE Requests all the rows for friends of the current user.
Type: VARIABLE
Type: VARIABLE Top-score is lowest number.
Type: VARIABLE Top-score is highest number.
Type: VARIABLE
Type: VARIABLE Leaderboard will keep user’s best score.
Type: VARIABLE Leaderboard will always replace score with specified.
Type: VARIABLE
Type: VARIABLE Simple numerical score.
Type: VARIABLE The score represents a time, in seconds.
Type: VARIABLE The score represents a time, in milliseconds.
Type: VARIABLE Passed as parameter to the store.
Type: VARIABLE Passed as parameter to the store.
Type: VARIABLE Passed as parameter to the store.
Type: VARIABLE Passed as parameter to ActivateGameOverlayToWebPage.
Type: VARIABLE Passed as parameter to ActivateGameOverlayToWebPage.
Type: VARIABLE Friend is not currently logged on.
Type: VARIABLE Friend is logged on.
Type: VARIABLE User is on, but busy.
Type: VARIABLE Auto-away feature.
Type: VARIABLE Auto-away for a long time.
Type: VARIABLE Online, trading.
Type: VARIABLE Online, wanting to play.
Type: VARIABLE Online, but appears offline to friends. This status is never published to clients.
Type: VARIABLE EFriendFlagNone
Type: VARIABLE EFriendFlagBlocked
Type: VARIABLE EFriendFlagFriendshipRequested
Type: VARIABLE EFriendFlagImmediate
Type: VARIABLE EFriendFlagClanMember
Type: VARIABLE EFriendFlagOnGameServer
Type: VARIABLE EFriendFlagRequestingFriendship
Type: VARIABLE EFriendFlagRequestingInfo
Type: VARIABLE EFriendFlagIgnored
Type: VARIABLE EFriendFlagIgnoredFriend
Type: VARIABLE EFriendFlagChatMember
Type: VARIABLE EFriendFlagAll
Type: VARIABLE SteamNetworkingSend_Unreliable
Type: VARIABLE SteamNetworkingSend_NoNagle
Type: VARIABLE SteamNetworkingSend_UnreliableNoNagle
Type: VARIABLE SteamNetworkingSend_NoDelay
Type: VARIABLE SteamNetworkingSend_UnreliableNoDelay
Type: VARIABLE SteamNetworkingSend_Reliable
Type: VARIABLE SteamNetworkingSend_ReliableNoNagle
Type: VARIABLE SteamNetworkingSend_UseCurrentThread
Type: VARIABLE SteamNetworkingSend_AutoRestartBrokenSession
Type: VARIABLE ESteamNetConnectionEnd_Invalid
Type: VARIABLE ESteamNetConnectionEnd_App_Generic
Type: VARIABLE ESteamNetConnectionEnd_AppException_Generic
Type: VARIABLE ESteamNetConnectionEnd_Local_OfflineMode
Type: VARIABLE ESteamNetConnectionEnd_Local_ManyRelayConnectivity
Type: VARIABLE ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay
Type: VARIABLE ESteamNetConnectionEnd_Local_NetworkConfig
Type: VARIABLE ESteamNetConnectionEnd_Local_Rights
Type: VARIABLE ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses
Type: VARIABLE ESteamNetConnectionEnd_Remote_Timeout
Type: VARIABLE ESteamNetConnectionEnd_Remote_BadCrypt
Type: VARIABLE ESteamNetConnectionEnd_Remote_BadCert
Type: VARIABLE ESteamNetConnectionEnd_Remote_BadProtocolVersion
Type: VARIABLE ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses
Type: VARIABLE ESteamNetConnectionEnd_Misc_Generic
Type: VARIABLE ESteamNetConnectionEnd_Misc_InternalError
Type: VARIABLE ESteamNetConnectionEnd_Misc_Timeout
Type: VARIABLE ESteamNetConnectionEnd_Misc_SteamConnectivity
Type: VARIABLE ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient
Type: VARIABLE ESteamNetConnectionEnd_Misc_P2P_Rendezvous
Type: VARIABLE ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall
Type: VARIABLE ESteamNetConnectionEnd_Misc_PeerSentNoConnection
Type: VARIABLE ESteamNetworkingConnectionState_None
Type: VARIABLE ESteamNetworkingConnectionState_Connecting
Type: VARIABLE ESteamNetworkingConnectionState_FindingRoute
Type: VARIABLE ESteamNetworkingConnectionState_Connected
Type: VARIABLE ESteamNetworkingConnectionState_ClosedByPeer
Type: VARIABLE ESteamNetworkingConnectionState_ProblemDetectedLocally
Type: VARIABLE ELobbyTypePrivate only way to join the lobby is to invite to someone else
Type: VARIABLE ELobbyTypeFriendsOnly shows for friends or invitees, but not in lobby list
Type: VARIABLE ELobbyTypePublic visible for friends and in lobby list
Type: VARIABLE ELobbyTypeInvisible returned by search, but not visible to other friends
Type: VARIABLE ELobbyTypePrivateUnique private, unique and does not delete when empty
Type: VARIABLE EAuthSessionResponseOK Steam has verified the user is online, the ticket is valid and ticket has not been reused.
Type: VARIABLE EAuthSessionResponseUserNotConnectedToSteam The user in question is not connected to steam.
Type: VARIABLE EAuthSessionResponseNoLicenseOrExpired The user doesn’t have a license for this App ID or the ticket has expired.
Type: VARIABLE EAuthSessionResponseVACBanned The user is VAC banned for this game.
Type: VARIABLE EAuthSessionResponseLoggedInElseWhere The user account has logged in elsewhere and the session containing the game instance has been disconnected.
Type: VARIABLE EAuthSessionResponseVACCheckTimedOut VAC has been unable to perform anti-cheat checks on this user.
Type: VARIABLE EAuthSessionResponseAuthTicketCanceled The ticket has been canceled by the issuer.
Type: VARIABLE EAuthSessionResponseAuthTicketInvalidAlreadyUsed This ticket has already been used, it is not valid.
Type: VARIABLE EAuthSessionResponseAuthTicketInvalid This ticket is not from a user instance currently connected to steam.
Type: VARIABLE EAuthSessionResponsePublisherIssuedBan The user is banned for this game. The ban came via the web api and not VAC.
Type: VARIABLE EAuthSessionResponseAuthTicketNetworkIdentityFailure The network identity in the ticket does not match the server authenticating the ticket.
Type: FUNCTION Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed.
Parameters
app_id (number)Returns
booleanType: FUNCTION Gets the current game language.
Returns
stringType: FUNCTION Returns the name of another user. Same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously.
Parameters
steamIDFriend (string)Returns
string - Name of userType: FUNCTION Returns the local players name - guaranteed to not be NULL. This is the same name as on the users community profile page. This is stored in UTF-8 format.
Returns
string - Name of userType: FUNCTION Gets the status of the current user. Returned as EPersonaState.
Returns
number - Status of user.Type: FUNCTION Friend iteration. Takes a set of EFriendFlags, and returns the number of users the client knows about who meet that criteria. Then GetFriendByIndex() can then be used to return the id’s of each of those users.
Parameters
iFriendFlags (number) - Set of friend flags to match friends against.Returns
number - Number of users matching search.Type: FUNCTION Returns the steamID of a user. The returned CSteamID can then be used by all the functions below to access details about the user.
Parameters
iFriend (number) - Is a index of range [0, GetFriendCount())
iFriendsFlags (number) - Must be the same value as used in GetFriendCount()
Returns
string - Steam id of the userType: FUNCTION Returns the current status of the specified user. This will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user.
Parameters
steamIDFriend (string) - Id of friendReturns
number - State of friendType: FUNCTION Get friends steam level.
Parameters
steamIDFriend (string) - Id of friendReturns
number - Steam level of friendType: FUNCTION Returns a relationship to a user.
Parameters
steamIDFriend (string) - Id of friendReturns
number - Relationship to the user.Type: FUNCTION Gets a handle to the small (32*32px) avatar for the specified user. This is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
Parameters
steamIDFriend (string) - Id of friendReturns
number - Image handle.Type: FUNCTION Gets a handle to the medium (64*64px) avatar for the specified user. This is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
Parameters
steamIDFriend (string) - Id of friendReturns
number - Image handle.Type: FUNCTION Gets a handle to the large (128*128px) avatar for the specified user. This is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
Parameters
steamIDFriend (string) - Id of friendReturns
number - Image handle.Type: FUNCTION Activates game overlay to store page for app.
Parameters
app_id (number)flag (number) - EOverlayToStoreFlagType: FUNCTION Activates game overlay web browser directly to the specified URL. Full address with protocol type is required, e.g. http://www.steamgames.com/
Parameters
url (string)mode (number) - EActivateGameOverlayToWebPageModeType: FUNCTION Sets a Rich Presence key/value for the current user.
Parameters
key (string)value (string)Returns
boolean - True if the rich presence was set successfully, otherwise False.Type: FUNCTION Clears all of the current user’s Rich Presence key/values.
Type: FUNCTION Invites a friend or clan member to the current game using a special invite string. If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string.
Parameters
steamIDFriend (string) - Id of friend
connect (string) - String
Returns
booleanType: FUNCTION Set a listener.
Parameters
listener (function) - Listener function to callType: FUNCTION Adds a string comparison filter to the next RequestLobbyList call.
Parameters
key (string)value (number)cmp (number)Type: FUNCTION Adds a numerical comparison filter to the next RequestLobbyList call.
Parameters
key (string)value (number)cmp (number)Type: FUNCTION Sorts the results closest to the specified value.
Parameters
key (string)value (number)Type: FUNCTION Filters to only return lobbies with the specified number of open slots. Available.
Parameters
slots (number)Type: FUNCTION Sets the physical distance for which we should search for lobbies, this is. Based on the users IP address and a IP location map on the Steam backed.
Parameters
dist (number)Type: FUNCTION Sets the maximum number of lobbies to return. The lower the count the faster. It is to download the lobby results & details to the client.
Parameters
max_count (number)Type: FUNCTION Unused - Checks the player compatibility based on the frenemy system.
Parameters
steam_id (string)Type: FUNCTION Get a filtered list of relevant lobbies. Will return results as a LobbyMatchList_t event
Returns
string - Callback idType: FUNCTION Gets the Steam ID of the lobby at the specified index. This should only be called after a LobbyMatchList_t call result is received
Parameters
index (number) - The index of the lobby to get the Steam ID of, from 0 to
LobbyMatchList_t.m_nLobbiesMatchingReturns
string - Id of lobbyType: FUNCTION Create a new matchmaking lobby. Will generate a LobbyCreated_t, LobbyEnter_t and LobbyDataUpdate_t event
Parameters
lobby_type (number) - The type and visibility of this lobby.
max_members (number) - The maximum number of players that can join this lobby.
Returns
string - Callback idType: FUNCTION Joins an existing lobby. Will generate a LobbyEnter_t event
Parameters
lobby_id (string) - The Steam ID of the lobby to join.Returns
string - Callback idType: FUNCTION Leave a lobby that the user is currently in. Leave a lobby that the user is currently in; this will take effect immediately on the client side, other users in the lobby will be notified by a LobbyChatUpdate_t callback.
Parameters
lobby_id (string) - The lobby to leaveType: FUNCTION Returns the current lobby owner. There always one lobby owner - if the current owner leaves, another user in the lobby will become the owner automatically. It is possible (but rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner. You must be a member of the lobby to access this.
Parameters
lobby_id (string) - The Steam ID of the lobby to get the owner of.Returns
string - Id of ownerType: FUNCTION Changes who the lobby owner is. This can only be set by the owner of the lobby. This will trigger a LobbyDataUpdate_t for all of the users in the lobby, each user should update their local state to reflect the new owner. This is typically accomplished by displaying a crown icon next to the owners name.
Parameters
lobby_id (string) - The Steam ID of the lobby to get the owner of.
new_owner (string) - The new owner
Type: FUNCTION Updates what type of lobby this is. This is also set when you create the lobby with CreateLobby. This can only be set by the owner of the lobby.
Parameters
lobby_id (string) - The Steam ID of the lobby
type (number) - The lobby type
Type: FUNCTION Sets whether or not a lobby is joinable by other players. This always defaults to enabled for a new lobby. If joining is disabled, then no players can join, even if they are a friend or have been invited. Lobbies with joining disabled will not be returned from a lobby search.
Parameters
lobby_id (string) - The Steam ID of the lobby
joinable (boolean) - Enable or disable allowing users to join this lobby?
Returns
boolean - SuccessType: FUNCTION Set the maximum number of players that can join the lobby. This is also set when you create the lobby with CreateLobby. This can only be set by the owner of the lobby.
Parameters
lobby_id (string) - The Steam ID of the lobby to set the member limit for.
max_members (number) - The maximum number of players allowed in this lobby. This
can not be above 250.
Returns
boolean - SuccessType: FUNCTION The current limit on the
Parameters
lobby_id (string) - The Steam ID of the lobby to get the member limit of.Returns
number - The current limitType: FUNCTION Gets the number of users in a lobby. This is used for iteration, after calling this then GetLobbyMemberByIndex can be used to get the Steam ID of each person in the lobby. Persona information for other lobby members (name, avatar, etc.) is automatically received and accessible via the ISteamFriends interface. The current user must be in the lobby to retrieve the Steam IDs of other users in that lobby.
Parameters
lobby_id (string) - The Steam ID of the lobby to get the owner of.Returns
number - Number of users in the lobbyType: FUNCTION Gets the Steam ID of the lobby member at the given index. You must call matchmaking_get_num_lobby_members before calling this. The current user must be in the lobby to retrieve the Steam IDs of other users in that lobby.
Parameters
lobby_id (string)index (number)Returns
string - Id of memberType: FUNCTION Sets a key/value pair in the lobby metadata.
Parameters
lobby_id (string)key (string)data (string)Returns
booleanType: FUNCTION Sets per-user metadata for the local user.
Parameters
lobby_id (string)key (string)data (string)Type: FUNCTION Get data associated with this lobby.
Parameters
lobby_id (string)key (string)Returns
string - DataType: FUNCTION Gets per-user metadata from another player in the specified lobby.
Parameters
lobby_id (string)user_id (string)key (string)Returns
string - DataType: FUNCTION Returns the number of metadata keys set on the specified lobby.
Parameters
lobby_id (string)Returns
number - Number of keysType: FUNCTION Returns a lobby metadata key/values pair by index.
Parameters
lobby_id (string)index (number)Returns
booleanstringstringType: FUNCTION Broadcasts a chat message to the all the users in the lobby.
Parameters
lobby_id (string)body (string)Returns
booleanType: FUNCTION Get a chat message as specified in a LobbyChatMsg_t callback.
Parameters
lobby_id (string)index (number)Returns
stringstringnumberType: FUNCTION Send message.
Parameters
identity_remote (string)data (string)send_flags (number) - A bitmask of k_nSteamNetworkingSend_xxx options
remote_channel (number) - A routing number you can use to help route message to different systemsType: FUNCTION Receive message.
Parameters
localChannel (number)Returns
tableType: FUNCTION Accept session. Call this in response to a SteamNetworkingMessagesSessionRequest_t callback.
Parameters
identity_remote (string)Returns
boolean - Returns false if there is no session with the user
pending or otherwise. If there is an existing active session, this function
will return true, even if it is not pending.Type: FUNCTION Close sesssion. Call this when you’re done talking to a user to immediately free up resources under-the-hood
Parameters
identity_remote (string)Returns
booleanType: FUNCTION Close channel. Call this when you’re done talking to a user on a specific channel.
Parameters
identity_remote (string)local_channel (number)Returns
booleanType: FUNCTION Get connection info. Returns information about the latest state of a connection, if any, with the given peer.
Parameters
identity_remote (string)Returns
table - Connection info (state, info, status)Type: FUNCTION Share a file.
Parameters
filename (string) - Name of file to shareReturns
stringType: FUNCTION Get number of uploaded files.
Returns
number - File countType: FUNCTION Get file information.
Returns
number - File countType: FUNCTION Get storage quota.
Returns
number - Available bytes
number - Total bytes
Type: FUNCTION Creates a new file, writes the bytes to the file, and then closes the file. If the target file already exists, it is overwritten.
Parameters
filename (string) - The name of the file to write to.
data (string)
Returns
boolean - SuccessType: FUNCTION Opens a binary file, reads the contents of the file into a byte array,. And then closes the file.
Parameters
filename (string) - Name of the file to read fromReturns
stringType: FUNCTION Returns the CSteamID of the account currently logged into the Steam client. A CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API.
Returns
stringType: FUNCTION Gets the Steam Level of the user, as shown on their profile.
Returns
numberType: FUNCTION Trading Card badges data access. If you only have one set of cards, the series will be 1. The user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1).
Returns
numberbooleanType: FUNCTION Returns true if the Steam client current has a live connection to the Steam. Servers.
Returns
booleanType: FUNCTION Returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam .
Returns
booleanType: FUNCTION Gets whether the users phone number is verified.
Returns
booleanType: FUNCTION Gets whether the users phone number is identifying.
Returns
booleanType: FUNCTION Gets whether the users phone number is awaiting (re)verification.
Returns
booleanType: FUNCTION Gets whether the user has two factor enabled on their account.
Returns
booleanType: FUNCTION Get an authentication ticket. Retrieve an authentication ticket to be sent to the entity who wishes to authenticate you.
Returns
string - Auth ticket or null
number - Ticket handle or null
string - Error message or null
Type: FUNCTION Validate an authentication ticket. Authenticate the ticket from the entity Steam ID to be sure it is valid and isn’t reused. Note that identity is not confirmed until the callback ValidateAuthTicketResponse_t is received and the return value in that callback is checked for success.
Parameters
ticket (string) - The auth ticket to validate
steamId (string) - The entity’s Steam ID that sent this ticket.
Returns
numberType: FUNCTION Cancels an auth ticket. Cancels an auth ticket received from GetAuthSessionTicket or GetAuthTicketForWebApi. This should be called when no longer playing with the specified entity.
Parameters
ticket (number) - The active auth ticket to cancel.Type: FUNCTION Ends an auth session. Ends an auth session that was started with BeginAuthSession. This should be called when no longer playing with the specified entity.
Parameters
steamId (string) - The entity to end the active auth session with.Type: FUNCTION Get an authentication ticket for web API. Request an authentication ticket suitable to authenticated in a web backend. Will trigger a GetTicketForWebApiResponse_t callback when the ticket is ready.
Parameters
identity (string) - Optional identity string to associate with the ticketReturns
number - The handle of the requested ticket
string - Error message or null
Type: FUNCTION Get user stat as an integer. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetStat
Parameters
id (string) - Id of the stat to getReturns
booleannumber - The stat or nilType: FUNCTION Set user stat. Https://partner.steamgames.com/doc/api/ISteamUserStats#SetStat
Parameters
id (string) - Id of the stat to set
stat (number) - Number to set
Returns
booleanType: FUNCTION Get user stat as a floating point number. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetStat
Parameters
id (string) - Id of the stat to getReturns
booleannumber - The statType: FUNCTION Set user stat. Https://partner.steamgames.com/doc/api/ISteamUserStats#SetStat
Parameters
id (string) - Id of the stat to set
stat (number) - Number to set
Returns
booleanType: FUNCTION Requests global stats data, which is available for stats marked as “aggregated”. This call is asynchronous, with the results returned in GlobalStatsReceived_t. nHistoryDays specifies how many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60. https://partner.steamgames.com/doc/api/ISteamUserStats#RequestGlobalStats
Parameters
history_days (number)Returns
booleanType: FUNCTION Store the current data on the server. Will get a callback when set and one callback for every new achievement If the callback has a result of k_EResultInvalidParam, one or more stats uploaded has been rejected, either because they broke constraints or were out of date. In this case the server sends back updated values. The stats should be re-iterated to keep in sync. https://partner.steamgames.com/doc/api/ISteamUserStats#StoreStats
Returns
booleanType: FUNCTION Reset stats. Https://partner.steamgames.com/doc/api/ISteamUserStats#ResetAllStats
Parameters
achievements (boolean) - True if achievements should be reset as well.Returns
booleanType: FUNCTION Set achievement. Https://partner.steamgames.com/doc/api/ISteamUserStats#SetAchievement
Parameters
name (string)Returns
booleanType: FUNCTION Get achievement. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetAchievement
Parameters
name (string)Returns
booleanbooleanType: FUNCTION Clear achievement. Https://partner.steamgames.com/doc/api/ISteamUserStats#ClearAchievement
Parameters
name (string)Returns
booleanType: FUNCTION Used for iterating achievements. In general games should not need these functions because they should have a list of existing achievements compiled into them. https://partner.steamgames.com/doc/api/ISteamUserStats#GetNumAchievements
Returns
number - Number of achievements.Type: FUNCTION Get achievement name iAchievement in [0,GetNumAchievements). Https://partner.steamgames.com/doc/api/ISteamUserStats#GetAchievementName
Parameters
index (number)Returns
stringType: FUNCTION Get general attributes for an achievement. Accepts the following keys * “name” and “desc” for retrieving the localized achievement name and description (returned in UTF8) * “hidden” for retrieving if an achievement is hidden (returns “0” when not hidden, “1” when hidden) https://partner.steamgames.com/doc/api/ISteamUserStats#GetAchievementDisplayAttribute
Parameters
name (string)key (string) - Either “name”, “desc” or “hidden”Returns
stringType: FUNCTION Returns the percentage of users who have achieved the specified achievement. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetAchievementAchievedPercent
Returns
booleannumberType: FUNCTION Find a leaderboard. Will return leaderboard asynchronously. https://partner.steamgames.com/doc/api/ISteamUserStats#FindLeaderboard
Parameters
name (string)Type: FUNCTION Gets a leaderboard by name, it will create it if it’s not yet created. This call is asynchronous, with the result returned in a listener callback with event set to LeaderboardFindResult_t. https://partner.steamgames.com/doc/api/ISteamUserStats#FindOrCreateLeaderboard
Parameters
leaderboard_name (string) - The name of the leaderboard to find or create.
eLeaderboardSortMethod (ELeaderboardSortMethod) - The sort order of the new leaderboard if it’s created.
eLeaderboardDisplayType (ELeaderboardDisplayType) - The display type (used by the Steam Community web site) of the new leaderboard if it’s created.
Type: FUNCTION Get the name of a leaderboard. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetLeaderboardName
Parameters
leaderboard (string)Returns
stringType: FUNCTION Get the total number of entries in a leaderboard, as of the last request. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetLeaderboardEntryCount
Parameters
leaderboard (string)Returns
numberType: FUNCTION Returns the sort method of the leaderboard. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetLeaderboardSortMethod
Parameters
leaderboard (string)Returns
numberType: FUNCTION Returns the display type of a leaderboard handle. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetLeaderboardDisplayType
Parameters
leaderboard (string)Returns
numberType: FUNCTION Asks the Steam back-end for a set of rows in the leaderboard. This call is asynchronous, with the result returned in a listener callback with event set to LeaderboardScoresDownloaded_t. LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries(). You can ask for more entries than exist, and it will return as many as do exist. * k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries] * k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after * k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user https://partner.steamgames.com/doc/api/ISteamUserStats#DownloadLeaderboardEntries
Parameters
leaderboard (string)request (ELeaderboardDataRequest)start (number)end (number)Type: FUNCTION Returns data about a single leaderboard entry. Https://partner.steamgames.com/doc/api/ISteamUserStats#GetDownloadedLeaderboardEntry
Parameters
hSteamLeaderboardEntries (string) - Leaderboard entries handle
index (number) - Which entry to get
Returns
booleantable - The requested leaderboard entry.Type: FUNCTION Uploads a user score to a specified leaderboard. This call is asynchronous, with the result returned in a listener callback with event set to LeaderboardScoreUploaded_t. https://partner.steamgames.com/doc/api/ISteamUserStats#UploadLeaderboardScore
Parameters
leaderboard (string)eLeaderboardUploadScoreMethod (ELeaderboardUploadScoreMethod)nScore (number)Type: FUNCTION Attaches a piece of user generated content the current user’s entry on a. Leaderboard. https://partner.steamgames.com/doc/api/ISteamUserStats#AttachLeaderboardUGC
Parameters
leaderboard (string)ugc_handle (string)Returns
string - API call idType: FUNCTION Returns the appID of the current process.
Returns
numberType: FUNCTION Return the number of seconds since the user.
Returns
numberType: FUNCTION Returns true if currently running on the Steam Deck device.
Returns
booleanType: FUNCTION Returns true if the Steam Overlay is running and the user can access it.
Returns
booleanType: FUNCTION Get size of image.
Parameters
image (number) - Image handleReturns
boolean - True if size of image was read successfully
number - Image width or nil
number - Image height or nil
Type: FUNCTION Get image in RGBA format.
Parameters
image (number) - Image handle
size (number) - Size of image
Returns
boolean - True if size of image was read successfully
string
Type: FUNCTION Returns the Steam server time in Unix epoch format. (Number of seconds since Jan 1, 1970 UTC).
Returns
number - TimeType: FUNCTION Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
Parameters
mode (number) - EFloatingGamepadTextInputMode
x (number) - Text field x position
y (number) - Text field y position
width (number) - Text field width
height (number) - Text field height
Returns
boolean - True if the floating keyboard was shown, otherwise, false.Type: FUNCTION Activates the Big Picture text input dialog which only supports gamepad input.
Parameters
input_mode (number) - EGamepadTextInputMode
line_input_mode (number) - EGamepadTextInputLineMode
description (string) - Sets the description that should inform the user what the input dialog is for
existing_text (string) - Sets the preexisting text which the user can edit.
Returns
boolean - True if the big picture overlay is running; otherwise, false