File: steam/src/steam.cpp
Initialize Steamworks.
RETURNS
success
[Boolean
] - True if successfulmessage
[String
] - Error message if unsuccessful.
Update Steamworks. Call this from a script component.
Restart Steamworks.
PARAMS
appid
[number
] -
Finalize Steamworks.
Requests rows in the leaderboard from the full table
Requests rows in the leaderboard from rows around the user
Requests all the rows for friends of the current user
Passed as parameter to the store
Passed as parameter to the store
Passed as parameter to the store
Passed as parameter to ActivateGameOverlayToWebPage
Passed as parameter to ActivateGameOverlayToWebPage
Friend is not currently logged on
Friend is logged on
User is on, but busy
Auto-away feature
Auto-away for a long time
Online, trading
Online, wanting to play
Online, but appears offline to friends. This status is never published to clients.
File: steam/src/steam_apps.cpp
Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed.
PARAMS
app_id
[number
] -
RETURNS
installed
[bool
] -
File: steam/src/steam_friends.cpp
Interface to access information about individual users and interact with the Steam Overlay.
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.
PARAMS
CSteamID
[friendId
] -
RETURNS
String
[name
] - Name of user
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
] - Name of user
Gets the status of the current user. Returned as EPersonaState.
RETURNS
Number
[state
] - Status of user.
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.
PARAMS
steamIDFriend
[number
] - Id of friend
RETURNS
Number
[state
] - State of friend
Get friends steam level.
PARAMS
steamIDFriend
[number
] - Id of friend
RETURNS
Number
[level
] - Steam level of friend
Returns a relationship to a user.
PARAMS
steamIDFriend
[number
] - Id of friend
RETURNS
Number
[relationship
] - Relationship to the user.
Activates game overlay to store page for app.
PARAMS
app_id
[number
] -flag
[number
] - EOverlayToStoreFlag
Activates game overlay web browser directly to the specified URL. Full address with protocol type is required, e.g. http://www.steamgames.com/
PARAMS
url
[string
] -mode
[number
] - EActivateGameOverlayToWebPageMode
File: steam/src/steam_listener.cpp
Set a listener.
steam.set_listener(function(self, event, data)if event == "GameOverlayActivated_t" then
print("Overlay is active:", data.m_bActive)
end
end)
PARAMS
listener
[function
] - Listener function to call
File: steam/src/steam_user.cpp
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
id
[CSteamID
] -
Gets the Steam Level of the user, as shown on their profile.
RETURNS
level
[number
] -
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
series
[number
] -foil
[boolean
] -
Returns true if the Steam client current has a live connection to the Steam Servers.
RETURNS
logged_on
[boolean
] -
Returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam .
RETURNS
behind_nat
[boolean
] -
Gets whether the users phone number is verified.
RETURNS
verified
[boolean
] -
Gets whether the users phone number is identifying.
RETURNS
verifying
[boolean
] -
Gets whether the users phone number is awaiting (re)verification.
RETURNS
verification
[boolean
] -
Gets whether the user has two factor enabled on their account.
RETURNS
enabled
[boolean
] -
File: steam/src/steam_userstats.cpp
Provides functions for accessing and submitting stats, achievements, and Leaderboards.
Get user stat as an integer.
PARAMS
id
[string
] - Id of the stat to get
RETURNS
Boolean
[ok
] -Number
[stat
] - The stat or nil
Set user stat.
PARAMS
id
[string
] - Id of the stat to setstat
[number
] - Number to set
RETURNS
ok
[boolean
] -
Get user stat as a floating point number.
PARAMS
id
[string
] - Id of the stat to get
RETURNS
ok
[Boolean
] -stat
[Number
] - The stat
Set user stat.
PARAMS
id
[string
] - Id of the stat to setstat
[number
] - Number to set
RETURNS
ok
[Boolean
] -
Ask the server to send down this user's data and achievements for this game.
RETURNS
ok
[Boolean
] - True if successful
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.
PARAMS
history_days
[number
] -
RETURNS
ok
[Boolean
] -
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.
RETURNS
ok
[Boolean
] -
Reset stats.
PARAMS
achievements
[boolean
] - True if achievements should be reset as well.
RETURNS
ok
[Boolean
] -
Set achievement.
PARAMS
name
[string
] -
RETURNS
ok
[Boolean
] -
Get achievement.
PARAMS
name
[string
] -
RETURNS
ok
[Boolean
] -achieved
[Boolean
] -
Clear achievement.
PARAMS
name
[string
] -
RETURNS
ok
[Boolean
] -
Used for iterating achievements. In general games should not need these functions because they should have a list of existing achievements compiled into them.
RETURNS
num
[Number
] - Number of achievements.
Get achievement name iAchievement in [0,GetNumAchievements)
PARAMS
index
[number
] -
RETURNS
name
[String
] -
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)
PARAMS
name
[string
] -key
[string
] - Either "name", "desc" or "hidden"
RETURNS
attribute
[String
] -
Returns the percentage of users who have achieved the specified achievement.
RETURNS
ok
[Boolean
] -percent
[Number
] -
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
PARAMS
leaderboard
[string
] -request
[ELeaderboardDataRequest
] -start
[number
] -end
[number
] -
RETURNS
handle
[string
] -
Returns data about a single leaderboard entry
PARAMS
leaderboard
[string
] - Leaderboard handleindex
[number
] - Which entry to get
RETURNS
ok
[Boolean
] -entry
[Table
] - The requested leaderboard entry.
File: steam/src/steam_utils.cpp
Returns the appID of the current process.
RETURNS
app_id
[Number
] -
Return the number of seconds since the user.
RETURNS
seconds
[Number
] -
Returns true if currently running on the Steam Deck device.
RETURNS
running_on_steamdeck
[Boolean
] -
Get size of image
PARAMS
image
[number
] - Image handle
RETURNS
ok
[Boolean
] - True if size of image was read successfullywidth
[Number
] - Image width or nilheight
[Number
] - Image height or nil
Get image in RGBA format.
PARAMS
image
[number
] - Image handlesize
[number
] - Size of image
RETURNS
ok
[Boolean
] - True if size of image was read successfullyImage
[String
] -