ISteamUserStats - adambiser/agk-steam-plugin GitHub Wiki
AttachLeaderboardUGC
AttachLeaderboardUGC(hLeaderboard as integer, hUGC as integer) as integer
- hLeaderboard - A leaderboard handle.
- hUGC - Handle to a piece of user generated content that was shared using CloudFileShare or CreateUGCItem.
Attaches a piece of user generated content the current user's entry on a leaderboard.
Use GetCallResultCode to determine whether this call was successful.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetAttachLeaderboardUGCLeaderboard
Reference:
ISteamUserStats#AttachLeaderboardUGC
ISteamUserStats#LeaderboardUGCSet_t
GetAttachLeaderboardUGCLeaderboard
GetAttachLeaderboardUGCLeaderboard(hCallResult as integer) as integer
- hCallResult - An AttachLeaderboardUGC call result handle.
Returns the leaderboard handle for the AttachLeaderboardUGC call result.
This method should only be used when the call result returned by AttachLeaderboardUGC has reported a GetCallResultCode of 1.
Returns: A leaderboard handle.
Reference:
ISteamUserStats#AttachLeaderboardUGC
ISteamUserStats#LeaderboardUGCSet_t
ClearAchievement
ClearAchievement(name as string) as integer
- name - The 'API Name' of the achievement.
Removes an achievement from the user. Call StoreStats afterward to upload the stats to the server.
This method is generally just for testing purposes.
Returns: int: 1 when the call succeeds; otherwise 0.
Reference:
ISteamUserStats#ClearAchievement
DownloadLeaderboardEntries
DownloadLeaderboardEntries(hLeaderboard as integer, eLeaderboardDataRequest as integer, rangeStart as integer, rangeEnd as integer) as integer
- hLeaderboard - A leaderboard handle.
- eLeaderboardDataRequest - The type of data request to make.
- rangeStart - The index to start downloading entries relative to eLeaderboardDataRequest.
- rangeEnd - The last index to retrieve entries for relative to eLeaderboardDataRequest.
Downloads entries from a leaderboard.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetDownloadLeaderboardHandle
GetDownloadLeaderboardEntryCount
GetDownloadLeaderboardEntryUser
GetDownloadLeaderboardEntryGlobalRank
GetDownloadLeaderboardEntryScore
GetDownloadLeaderboardEntryDetails
GetDownloadLeaderboardEntryUGC
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
AddDownloadLeaderboardEntriesUser
AddDownloadLeaderboardEntriesUser(hSteamIDUser as integer)
- hSteamIDUser - A user Steam ID handle.
Adds a user to be retrieved in the next DownloadLeaderboardEntriesForUsers call.
Reference:
ISteamUserStats#DownloadLeaderboardEntriesForUsers
DownloadLeaderboardEntriesForUsers
DownloadLeaderboardEntriesForUsers(hLeaderboard as integer) as integer
- hLeaderboard - A leaderboard handle.
Fetches leaderboard entries for an arbitrary set of users on a specified leaderboard.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetDownloadLeaderboardHandle
GetDownloadLeaderboardEntryCount
GetDownloadLeaderboardEntryUser
GetDownloadLeaderboardEntryGlobalRank
GetDownloadLeaderboardEntryScore
GetDownloadLeaderboardEntryDetails
GetDownloadLeaderboardEntryUGC
Reference:
ISteamUserStats#DownloadLeaderboardEntriesForUsers
ISteamUserStats#LeaderboardScoresDownloaded_t
GetDownloadLeaderboardHandle
GetDownloadLeaderboardHandle(hCallResult as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
Returns the handle to the leaderboard for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryCount
GetDownloadLeaderboardEntryCount(hCallResult as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
Returns the entry count for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: The number of entries.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryUser
GetDownloadLeaderboardEntryUser(hCallResult as integer, index as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
- index - The entry index.
Returns the handle of the user of an entry for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryGlobalRank
GetDownloadLeaderboardEntryGlobalRank(hCallResult as integer, index as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
- index - The entry index.
Returns the global rank of an entry for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryScore
GetDownloadLeaderboardEntryScore(hCallResult as integer, index as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
- index - The entry index.
Returns the score of an entry for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: An integer
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryDetails
GetDownloadLeaderboardEntryDetails(hCallResult as integer, index as integer) as string
- hCallResult - A DownloadLeaderboardEntries call result handle.
- index - The entry index.
Returns a JSON array of integers for the details of an entry for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: A JSON array of integers.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
GetDownloadLeaderboardEntryUGC
GetDownloadLeaderboardEntryUGC(hCallResult as integer, index as integer) as integer
- hCallResult - A DownloadLeaderboardEntries call result handle.
- index - The entry index.
Returns the UGC handle for the details of an entry for the DownloadLeaderboardEntries call.
This method should only be used when the call result returned by DownloadLeaderboardEntries or DownloadLeaderboardEntriesForUsers has reported a GetCallResultCode of 1.
Returns: A UGC handle or 0.
Reference:
ISteamUserStats#DownloadLeaderboardEntries
ISteamUserStats#LeaderboardScoresDownloaded_t
ISteamUserStats#DownloadLeaderboardEntriesForUsers
FindLeaderboard
FindLeaderboard(leaderboardName as string) as integer
- leaderboardName - The name of the leaderboard to find.
Sends a request to find the handle for a leaderboard.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetFindLeaderboardFound
GetFindLeaderboardHandle
Reference:
ISteamUserStats#FindLeaderboard
FindOrCreateLeaderboard
FindOrCreateLeaderboard(leaderboardName as string, eLeaderboardSortMethod as integer, eLeaderboardDisplayType as integer) as integer
- leaderboardName - The name of the leaderboard to find.
- eLeaderboardSortMethod - The sort order of the new leaderboard if it's created.
- eLeaderboardDisplayType - The display type (used by the Steam Community web site) of the new leaderboard if it's created.
Gets a leaderboard by name, it will create it if it's not yet created. Leaderboards created with this function will not automatically show up in the Steam Community. You must manually set the Community Name field in the App Admin panel of the Steamworks website.
_Note: If either eLeaderboardSortMethod OR eLeaderboardDisplayType are 0 (none), an error is raised.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetFindLeaderboardFound
GetFindLeaderboardHandle
Reference:
ISteamUserStats#FindOrCreateLeaderboard
GetFindLeaderboardFound
GetFindLeaderboardFound(hCallResult as integer) as integer
- hCallResult - A FindLeaderboard call result handle.
Returns whether the leaderboard was found for the FindLeaderboard call.
This method should only be used when the call result returned by FindLeaderboard or FindOrCreateLeaderboard has reported a GetCallResultCode of 1.
Returns: 1 if found; otherwise 0.
Reference:
ISteamUserStats#LeaderboardFindResult_t
ISteamUserStats#FindLeaderboard
ISteamUserStats#FindOrCreateLeaderboard
GetFindLeaderboardHandle
GetFindLeaderboardHandle(hCallResult as integer) as integer
- hCallResult - A FindLeaderboard call result handle.
Returns the found leaderboard for the FindLeaderboard call.
This method should only be used when the call result returned by FindLeaderboard or FindOrCreateLeaderboard has reported a GetCallResultCode of 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#LeaderboardFindResult_t
ISteamUserStats#FindLeaderboard
ISteamUserStats#FindOrCreateLeaderboard
GetAchievement
GetAchievement(name as string) as integer
- name - The 'API Name' of the achievement.
Gets whether the user has achieved this achievement.
Returns: 1 when the user has achieved this achievement; otherwise 0.
Reference:
ISteamUserStats#GetAchievement
GetAchievementAchievedPercent
GetAchievementAchievedPercent(name as string) as float
- name - The 'API Name' of the achievement.
Returns the percentage of users who have unlocked the specified achievement.
You must have called RequestGlobalAchievementPercentages and it needs to return successfully via its callback prior to calling this.
If RequestGlobalAchievementPercentages has not been called or if the specified 'API Name' does not exist in the global achievement percentages, an error will be raised.
Returns: The percentage of people that have unlocked this achievement from 0 to 100 or -1 if there is an error.
Reference:
ISteamUserStats#GetAchievementAchievedPercent
GetAchievementUnlockTime
GetAchievementUnlockTime(name as string) as integer
- name - The 'API Name' of the achievement.
Gets the time at which an achievement was unlocked, if ever.
Returns: The unload time in Unix time.
Reference:
ISteamUserStats#GetAchievementAndUnlockTime
GetAchievementDisplayName
GetAchievementDisplayName(name as string) as string
- name - The 'API Name' of the achievement.
Gets the localized achievement name.
Returns: The localized achievement name.
Reference:
ISteamUserStats#GetAchievementDisplayAttribute
GetAchievementDisplayDesc
GetAchievementDisplayDesc(name as string) as string
- name - The 'API Name' of the achievement.
Gets the localized achievement description.
Returns: The localized achievement description.
Reference:
ISteamUserStats#GetAchievementDisplayAttribute
GetAchievementDisplayHidden
GetAchievementDisplayHidden(name as string) as integer
- name - The 'API Name' of the achievement.
Gets whether an achievement is hidden.
Returns: 1 when the achievement is hidden, 0 when it is not hidden.
Reference:
ISteamUserStats#GetAchievementDisplayAttribute
GetAchievementIcon
GetAchievementIcon(name as string) as integer
- name - The 'API Name' of the achievement.
Gets the achievement icon for the current user's current achievement state.
Returns: 0 when no icon is set, -1 when the icon needs to download via callback, or an image handle. Similar to how avatars work.
Reference:
ISteamUserStats#GetAchievementIcon
GetAchievementAPIName
GetAchievementAPIName(index as integer) as string
- index - Index of the achievement.
Gets the achievement ID for the achievement index.
This method is generally just for testing purposes since the app should already know the achievement IDs.
Returns: Gets the 'API name' for an achievement index between 0 and GetNumAchievements.
Reference:
ISteamUserStats#GetAchievementName
GetGlobalStatInt64AsString
GetGlobalStatInt64AsString(name as string) as string
- name - The 'API Name' of the stat.
Gets the lifetime totals for an aggregated integer stat.
You must have called RequestGlobalStats and it needs to return successfully via its callback prior to calling this.
Note: Since AppGameKit is limited to 32-bit integers, this value is returned as a string.
If there is a problem getting the value, an error is raised.
Returns: The lifetime totals for a stat.
Reference:
ISteamUserStats#GetGlobalStat
GetGlobalStatDoubleAsString
GetGlobalStatDoubleAsString(name as string, precision as integer) as string
- name - The 'API Name' of the stat.
- precision - The precision of the returned string.
Gets the lifetime totals for an aggregated float stat.
You must have called RequestGlobalStats and it needs to return successfully via its callback prior to calling this.
Note: Since AppGameKit is limited to floats, this value is returned as a string.
If there is a problem getting the value, an error is raised.
Returns: The lifetime totals for a stat.
Reference:
ISteamUserStats#GetGlobalStat
GetGlobalStatHistoryInt64JSON
GetGlobalStatHistoryInt64JSON(name as string) as string
- name - The 'API Name' of the stat.
Gets the daily history for an aggregated int stat.
Returned as a JSON array of strings, starting with today's value.
Returns: A JSON array of int64 values as strings.
Reference:
ISteamUserStats#GetGlobalStatHistory
GetGlobalStatHistoryDoubleJSON
GetGlobalStatHistoryDoubleJSON(name as string, precision as integer) as string
- name - The 'API Name' of the stat.
- precision - The precision of the returned string.
Gets the daily history for an aggregated floar stat.
Returned as a JSON array of strings, starting with today's value.
Returns: A JSON array of double values as strings.
Reference:
ISteamUserStats#GetGlobalStatHistory
GetLeaderboardDisplayType
GetLeaderboardDisplayType(hLeaderboard as integer) as integer
- hLeaderboard - A leaderboard handle.
Returns the display type of a leaderboard.
Returns: An ELeaderboardDisplayType value.
Reference:
ISteamUserStats#GetLeaderboardDisplayType
ISteamUserStats#ELeaderboardDisplayType
GetLeaderboardEntryCount
GetLeaderboardEntryCount(hLeaderboard as integer) as integer
- hLeaderboard - A leaderboard handle.
Returns the total number of entries in a leaderboard.
Returns: The number of entries in the leaderboard.
Reference:
ISteamUserStats#GetLeaderboardEntryCount
GetLeaderboardName
GetLeaderboardName(hLeaderboard as integer) as string
- hLeaderboard - A leaderboard handle.
Returns the leaderboard name.
Returns: The leaderboard name.
Reference:
ISteamUserStats#GetLeaderboardName
GetLeaderboardSortMethod
GetLeaderboardSortMethod(hLeaderboard as integer) as integer
- hLeaderboard - A leaderboard handle.
Returns the sort order of a leaderboard.
Returns: ELeaderboardSortMethod value.
Reference:
ISteamUserStats#GetLeaderboardSortMethod
ISteamUserStats#ELeaderboardSortMethod
GetMostAchievedAchievementInfo
GetMostAchievedAchievementInfo() as integer
Gets the info on the most achieved achievement for the game. Use GetMostAchievedAchievementInfoName, GetMostAchievedAchievementInfoPercent, and GetMostAchievedAchievementInfoAchieved to get this info.
You must have called RequestGlobalAchievementPercentages and it needs to return successfully via its callback prior to calling this.
Note: The plugin keeps track of the iterator mentioned in the Steamworks documentation._
Usage:
if Steam.GetMostAchievedAchievementInfo()
repeat
Log("Name: " + Steam.GetMostAchievedAchievementInfoName() + ", percent: " + str(Steam.GetMostAchievedAchievementInfoPercent()) + ", unlocked: " + str(Steam.GetMostAchievedAchievementInfoUnlocked()))
until not Steam.GetNextMostAchievedAchievementInfo()
endif
Returns: 1 If achievement info was loaded; otherwise 0.
Reference:
ISteamUserStats#GetMostAchievedAchievementInfo
GetNextMostAchievedAchievementInfo
GetNextMostAchievedAchievementInfo() as integer
Gets the info on the next most achieved achievement for the game. Use GetMostAchievedAchievementInfoName, GetMostAchievedAchievementInfoPercent, and GetMostAchievedAchievementInfoAchieved to get this info.
You must have called RequestGlobalAchievementPercentages and it needs to return successfully via its callback prior to calling this.
Note: The plugin keeps track of the iterator mentioned in the Steamworks documentation._
Usage:
if Steam.GetMostAchievedAchievementInfo()
repeat
Log("Name: " + Steam.GetMostAchievedAchievementInfoName() + ", percent: " + str(Steam.GetMostAchievedAchievementInfoPercent()) + ", unlocked: " + str(Steam.GetMostAchievedAchievementInfoUnlocked()))
until not Steam.GetNextMostAchievedAchievementInfo()
endif
Returns: 1 If achievement info was loaded; otherwise 0.
Reference:
ISteamUserStats#GetNextMostAchievedAchievementInfo
GetMostAchievedAchievementInfoName
GetMostAchievedAchievementInfoName() as string
Returns the 'API Name' of the achievement as loaded by GetMostAchievedAchievementInfo or GetNextMostAchievedAchievementInfo.
Returns: 'API Name' of an achievement or an empty string.
Reference:
ISteamUserStats#GetMostAchievedAchievementInfo
ISteamUserStats#GetNextMostAchievedAchievementInfo
GetMostAchievedAchievementInfoPercent
GetMostAchievedAchievementInfoPercent() as float
Returns the percentage of people that have unlocked this achievement from 0 to 100 as loaded by GetMostAchievedAchievementInfo or GetNextMostAchievedAchievementInfo.
Returns: A float.
Reference:
ISteamUserStats#GetMostAchievedAchievementInfo
ISteamUserStats#GetNextMostAchievedAchievementInfo
GetMostAchievedAchievementInfoUnlocked
GetMostAchievedAchievementInfoUnlocked() as integer
Returns an integer indicating whether the current user has unlocked this achievement as loaded by GetMostAchievedAchievementInfo or GetNextMostAchievedAchievementInfo.
Returns: 1 if the current user has unlocked this achievement; otherwise 0;
Reference:
ISteamUserStats#GetMostAchievedAchievementInfo
ISteamUserStats#GetNextMostAchievedAchievementInfo
GetNumAchievements
GetNumAchievements() as integer
Gets the number of achievements for the app.
This method is generally just for testing purposes since the app should already know what the achievements are.
Returns: The number of achievements.
Reference:
ISteamUserStats#GetNumAchievements
GetNumberOfCurrentPlayers
GetNumberOfCurrentPlayers() as integer
Asynchronously retrieves the total number of players currently playing the current game. Both online and in offline mode.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetNumberOfCurrentPlayersResult
Reference:
ISteamUserStats#GetNumberOfCurrentPlayers
ISteamUserStats#NumberOfCurrentPlayers_t
GetNumberOfCurrentPlayersResult
GetNumberOfCurrentPlayersResult(hCallResult as integer) as integer
- hCallResult - A GetNumberOfCurrentPlayers call result.
Returns the number of current players returned by the GetNumberOfCurrentPlayers call.
This method should only be used when the call result returned by GetNumberOfCurrentPlayers has reported a GetCallResultCode of 1.
Returns: An integer.
Reference:
ISteamUserStats#GetNumberOfCurrentPlayers
ISteamUserStats#NumberOfCurrentPlayers_t
GetStatInt
GetStatInt(name as string) as integer
- name - The 'API Name' of the stat.
Gets the current value of an integer stat for the current user. If the stat is not defined as an integer, an error will be raised.
Returns: The value of the stat.
Reference:
ISteamUserStats#GetStat
GetStatFloat
GetStatFloat(name as string) as float
- name - The 'API Name' of the stat.
Gets the current value of a float stat for the current user. If the stat is not defined as a float, an error will be raised.
Returns: The value of the stat.
Reference:
ISteamUserStats#GetStat
GetUserAchievement
GetUserAchievement(hSteamID as integer, name as string) as integer
- hSteamID - The Steam ID handle of the user.
- name - The 'API Name' of the achievement.
Gets whether the specified user has achieved this achievement.
Returns: 1 when the user has achieved this achievement; otherwise 0.
Reference:
ISteamUserStats#GetUserAchievement
GetUserAchievementUnlockTime
GetUserAchievementUnlockTime(hSteamID as integer, name as string) as integer
- hSteamID - The Steam ID handle of the user.
- name - The 'API Name' of the achievement.
Gets the time at which an achievement was unlocked, if ever.
Returns: The unload time in Unix time.
Reference:
ISteamUserStats#GetUserAchievementAndUnlockTime
GetUserStatInt
GetUserStatInt(hSteamID as integer, name as string) as integer
- hSteamID - The Steam ID handle of the user.
- name - The 'API Name' of the stat.
Gets the current value of an integer stat for the specified user. If the stat is not defined as an integer, an error will be raised.
Returns: The value of the stat.
Reference:
ISteamUserStats#GetUserStat
GetUserStatFloat
GetUserStatFloat(hSteamID as integer, name as string) as float
- hSteamID - The Steam ID handle of the user.
- name - The 'API Name' of the stat.
Gets the current value of a float stat for the specified user. If the stat is not defined as a float, an error will be raised.
Returns: The value of the stat.
Reference:
ISteamUserStats#GetUserStat
IndicateAchievementProgress
IndicateAchievementProgress(name as string, curProgress as integer, maxProgress as integer) as integer
- name - The 'API Name' of the achievement.
- curProgress - The current progress.
- maxProgress - The progress required to unlock the achievement.
Raises a notification about achievemnt progress for progress stat achievements. The notification only shows when current progress is less than the max.
SetStat still needs to be used to set the progress stat value.
Steamworks documentation suggests only using this at intervals in the progression rather than every step of the way. ie: Every 25 wins out of 100.
Returns: 1 when the call succeeds; otherwise 0.
Reference:
ISteamUserStats#IndicateAchievementProgress
RequestCurrentStats
RequestCurrentStats() as integer
This command is initiates a callback.
Sends a request for current user's stats to Steam.
This command is called within Init so AppGameKit code will likely never need to call this command explicitly.
Returns: 1 when sending the request succeeds; otherwise 0. This is not an indication of whether user stats are initialized. See StatsInitialized.
Reference:
ISteamUserStats#RequestCurrentStats
RequestGlobalAchievementPercentages
RequestGlobalAchievementPercentages() as integer
Asynchronously fetch the data for the percentage of players who have received each achievement for the current game globally.
Use GetCallResultCode to determine when the call result finishes and its result.
Returns: A call result handle on success; otherwise 0.
Reference:
ISteamUserStats#RequestGlobalAchievementPercentages
ISteamUserStats#GlobalAchievementPercentagesReady_t
RequestGlobalStats
RequestGlobalStats(historyDays as integer) as integer
- historyDays - How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.
Asynchronously fetches global stats data, which is available for stats marked as "aggregated" in the App Admin panel of the Steamworks website.
Use GetCallResultCode to determine when the call result finishes and its result.
Returns: A call result handle on success; otherwise 0.
Reference:
ISteamUserStats#RequestGlobalStats
ISteamUserStats#GlobalStatsReceived_t
RequestUserStats
RequestUserStats(hSteamID as integer) as integer
- hSteamID - The Steam ID handle of the user to load stats for.
This command is initiates a callback.
Sends a request for another user's stats to Steam.
Returns: 1 when sending the request succeeds; otherwise 0. This is not an indication of whether user stats are initialized. See StatsInitialized.
Reference:
ISteamUserStats#RequestUserStats
ResetAllStats
ResetAllStats(achievementsToo as integer) as integer
- achievementsToo - When 1 then achievements are also cleared.
This command is initiates a callback.
Resets user stats and optionally all achievements (when bAchievementsToo is 1). This command also triggers the StoreStats callback.
Returns: 1 when sending the request to clear user stats succeeds; otherwise 0.
Reference:
ISteamUserStats#ResetAllStats
SetAchievement
SetAchievement(name as string) as integer
- name - The 'API Name' of the achievement.
Gives an achievement to the user.
Call StoreStats afterward to notify the user of the achievement. Otherwise, they will be notified after the game exits.
Returns: 1 when the call succeeds; otherwise 0.
Reference:
ISteamUserStats#SetAchievement
SetStatInt
SetStatInt(name as string, value as integer) as integer
- name - The 'API Name' of the stat.
- value - The new value of the stat. This must be an absolute value, it will not increment or decrement for you.
Sets the value of an integer stat for the current user.
Returns: 1 if setting the value succeeds; otherwise 0.
Reference:
ISteamUserStats#SetStat
SetStatFloat
SetStatFloat(name as string, value as float) as integer
- name - The 'API Name' of the stat.
- value - The new value of the stat. This must be an absolute value, it will not increment or decrement for you.
Sets the value of a float stat for the current user.
Returns: 1 if setting the value succeeds; otherwise 0.
Reference:
ISteamUserStats#SetStat
StoreStats
StoreStats() as integer
Stores user stats online.
Returns: 1 when sending the request to store user stats succeeds; otherwise 0.
Reference:
ISteamUserStats#StoreStats
IsStoringStats
IsStoringStats() as integer
Returns whether stats are currently being stored.
Returns: 1 while stats are being stored; otherwise 0.
Reference:
ISteamUserStats#StoreStats
UpdateAvgRateStat
UpdateAvgRateStat(name as string, countThisSession as float, sessionLength as float) as integer
- name - The 'API Name' of the stat.
- countThisSession - The value accumulation since the last call to this method.
- sessionLength - The amount of time in seconds since the last call to this method.
Updates an AVGRATE stat with new values. The value of these fields can be read with GetStatFloat.
Returns: 1 if setting the stat succeeds; otherwise 0.
Reference:
ISteamUserStats#UpdateAvgRateStat
AddUploadLeaderboardScoreDetail
AddUploadLeaderboardScoreDetail(detail as integer) as integer
- detail - The detail element to add.
Adds a detail to be sent in the next UploadLeaderboardScore call. A maximum of 64 details can be added. Details are optional.
Returns: 1 if the detail was successfully added; otherwise 0 meaning that the maximum number of details has been reached.
Reference:
ISteamUserStats#UploadLeaderboardScore
UploadLeaderboardScore
UploadLeaderboardScore(hLeaderboard as integer, score as integer) as integer
- hLeaderboard - A leaderboard handle.
- score - The score to upload.
Uploads a score to a leaderboard. The leaderboard will keep the user's best score.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetUploadLeaderboardScoreSuccess
GetUploadLeaderboardScoreHandle
GetUploadLeaderboardScoreValue
GetUploadLeaderboardScoreChanged
GetUploadLeaderboardScoreRankNew
GetUploadLeaderboardScoreRankPrevious
Reference:
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
UploadLeaderboardScoreForceUpdate
UploadLeaderboardScoreForceUpdate(hLeaderboard as integer, score as integer) as integer
- hLeaderboard - A leaderboard handle.
- score - The score to upload.
Uploads a score to a leaderboard. Forces the server to accept the uploaded score and replace any existing score.
Returns: A call result handle on success; otherwise 0.
Associated Methods:
GetUploadLeaderboardScoreSuccess
GetUploadLeaderboardScoreHandle
GetUploadLeaderboardScoreValue
GetUploadLeaderboardScoreChanged
GetUploadLeaderboardScoreRankNew
GetUploadLeaderboardScoreRankPrevious
Reference:
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreSuccess
GetUploadLeaderboardScoreSuccess(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns the success of the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: 1 on success; otherwise 0.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreHandle
GetUploadLeaderboardScoreHandle(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns the leaderboard handle of the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreValue
GetUploadLeaderboardScoreValue(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns the score of the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: An integer.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreChanged
GetUploadLeaderboardScoreChanged(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns whether the score on the leaderboard changed for the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: 1 if the score on the leaderboard changed; otherwise 0.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreRankNew
GetUploadLeaderboardScoreRankNew(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns the new rank of the user on the leaderboard for the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: The user's new rank.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
GetUploadLeaderboardScoreRankPrevious
GetUploadLeaderboardScoreRankPrevious(hCallResult as integer) as integer
- hCallResult - A UploadLeaderboardScore call result.
Returns the previous rank of the user on the leaderboard of the UploadLeaderboardScore call.
This method should only be used when the call result returned by UploadLeaderboardScore or UploadLeaderboardScoreForceUpdate has reported a GetCallResultCode of 1.
Returns: The user's previous rank or 0 if the user had no previous rank.
Reference:
ISteamUserStats#LeaderboardScoreUploaded_t
ISteamUserStats#UploadLeaderboardScore
ISteamUserStats#ELeaderboardUploadScoreMethod
HasUserAchievementStoredResponse
HasUserAchievementStoredResponse() as integer
Triggered by request to store the achievements on the server, or an "indicate progress" call.
Returns: 1 when achievements have been stored online; otherwise 0.
Associated Methods:
GetUserAchievementStoredName
GetUserAchievementStoredCurrentProgress
GetUserAchievementStoredMaxProgress
Reference:
ISteamUserStats#UserAchievementStored_t
GetUserAchievementStoredName
GetUserAchievementStoredName() as string
Returns the name of the achievement for the current UserAchievementStored_t callback response.
This method should only be used when HasUserAchievementStoredResponse has returned 1.
Returns: The achievement name.
Reference:
ISteamUserStats#UserAchievementStored_t
GetUserAchievementStoredCurrentProgress
GetUserAchievementStoredCurrentProgress() as integer
Returns the current progress of the achievement for the current UserAchievementStored_t callback response.
This method should only be used when HasUserAchievementStoredResponse has returned 1.
Returns: An integer.
Reference:
ISteamUserStats#UserAchievementStored_t
GetUserAchievementStoredMaxProgress
GetUserAchievementStoredMaxProgress() as integer
Returns the maximum progress of the achievement for the current UserAchievementStored_t callback response.
This method should only be used when HasUserAchievementStoredResponse has returned 1.
Returns: An integer.
Reference:
ISteamUserStats#UserAchievementStored_t
HasUserStatsReceivedResponse
HasUserStatsReceivedResponse() as integer
Triggered when the latest stats and achievements for a specific user (including the local user) have been received from the server.
Returns: 1 when the callback has more responses to process; otherwise 0.
Associated Methods:
GetUserStatsReceivedResult
GetUserStatsReceivedUser
Reference:
ISteamUserStats#UserStatsReceived_t
GetUserStatsReceivedResult
GetUserStatsReceivedResult() as integer
Returns whether the call was successful for the current UserStatsReceived_t callback response.
This method should only be used when HasUserStatsReceivedResponse has returned 1.
Returns: 1 when the call is successful; otherwise 0.
Reference:
ISteamUserStats#UserStatsReceived_t
steam_api#EResult
GetUserStatsReceivedUser
GetUserStatsReceivedUser() as integer
Returns the user whose stats were retrieved for the current UserStatsReceived_t callback response.
This method should only be used when HasUserStatsReceivedResponse has returned 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#UserStatsReceived_t
StatsInitialized
StatsInitialized() as integer
Checks to see whether user stats have been initialized after a RequestCurrentStats call.
Returns: 1 when users stats are initialized; otherwise 0.
Reference:
ISteamUserStats#RequestCurrentStats
StatsInitialized
StatsInitialized(hSteamID as integer) as integer
- hSteamID - The Steam ID handle of the user to check.
Checks to see whether a user's stats have been initialized after a RequestUserStats call.
Returns: 1 when the user's stats are initialized; otherwise 0.
Reference:
ISteamUserStats#RequestUserStats
HasUserStatsUnloadedResponse
HasUserStatsUnloadedResponse() as integer
Triggered when the stats and achievements for a user have been unloaded.
Returns: 1 when the callback has more responses to process; otherwise 0.
Associated Methods:
GetUserStatsUnloadedUser
Reference:
ISteamUserStats#UserStatsUnloaded_t
GetUserStatsUnloadedUser
GetUserStatsUnloadedUser() as integer
Returns the user whose stats were unloaded for the current UserStatsUnloaded_t callback response.
This method should only be used when HasUserStatsUnloadedResponse has returned 1.
Returns: A Steam ID handle.
Reference:
ISteamUserStats#UserStatsUnloaded_t
HasUserStatsStoredResponse
HasUserStatsStoredResponse() as integer
Triggered by a request to store the user stats.
Returns: 1 when users stats have been stored online; otherwise 0.
Associated Methods:
GetUserStatsStoredResult
Reference:
ISteamUserStats#UserStatsStored_t
GetUserStatsStoredResult
GetUserStatsStoredResult() as integer
Returns whether the call was successful for the current UserStatsStored_t callback response.
This method should only be used when HasUserStatsStoredResponse has returned 1.
Returns: An EResult value.
Reference:
ISteamUserStats#UserStatsStored_t