Method | Description | |
---|---|---|
AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t |
Attaches a piece of user generated content the user's entry on a leaderboard. hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare(). This call is asynchronous, with the result returned in LeaderboardUGCSet_t.
|
|
ClearAchievement ( string pchName ) : bool | ||
DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t |
Asks the Steam back-end for a set of rows in the leaderboard. This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below) 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
|
|
DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t |
as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers if a user doesn't have a leaderboard entry, they won't be included in the result a max of 100 users can be downloaded at a time, with only one outstanding call at a time
|
|
FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t |
as above, but won't create the leaderboard if it's not found This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
|
FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t |
Leaderboard functions asks the Steam back-end for a leaderboard by name, and will create it if it's not yet This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
|
GetAchievement ( string pchName, bool &pbAchieved ) : bool |
Achievement flag accessors
|
|
GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool |
Returns the percentage of users who have achieved the specified achievement.
|
|
GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool |
Get the achievement status, and the time it was unlocked if unlocked. If the return value is true, but the unlock time is zero, that means it was unlocked before Steam began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.
|
|
GetAchievementDisplayAttribute ( string pchName, string pchKey ) : 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)
|
|
GetAchievementIcon ( string pchName ) : int |
Achievement / GroupAchievement metadata Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set. A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the specified achievement.
|
|
GetAchievementName ( uint iAchievement ) : string |
Get achievement name iAchievement in [0,GetNumAchievements)
|
|
GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, |
Returns data about a single leaderboard entry use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries e.g. void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) { for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) { LeaderboardEntry_t leaderboardEntry; int32 details[3]; // we know this is how many we've stored previously GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); assert( leaderboardEntry.m_cDetails == 3 ); ... } once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid
|
|
GetGlobalStat ( string pchStatName, double &pData ) : bool | ||
GetGlobalStat ( string pchStatName, long &pData ) : bool |
Gets the lifetime totals for an aggregated stat
|
|
GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int | ||
GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int |
Gets history for an aggregated stat. pData will be filled with daily values, starting with today. So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago, etc. cubData is the size in bytes of the pubData buffer. Returns the number of elements actually set.
|
|
GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType |
returns the display type of the leaderboard
|
|
GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int |
returns the total number of entries in a leaderboard, as of the last request
|
|
GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string |
returns the name of a leaderboard
|
|
GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod |
returns the sort method of the leaderboard
|
|
GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int |
Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch the next most achieved afterwards. Will return -1 if there is no data on achievement percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).
|
|
GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int |
Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last achievement has been iterated.
|
|
GetNumAchievements ( ) : uint |
Used for iterating achievements. In general games should not need these functions because they should have a list of existing achievements compiled into them
|
|
GetNumberOfCurrentPlayers ( ) : SteamAPICall_t |
Retrieves the number of players currently playing your game (online + offline) This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
|
|
GetStat ( string pchName, float &pData ) : bool | ||
GetStat ( string pchName, int &pData ) : bool |
Data accessors
|
|
GetTrophySpaceRequiredBeforeInstall ( ) : ulong |
Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().
|
|
GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool | ||
GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool |
See notes for GetAchievementAndUnlockTime above
|
|
GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool | ||
GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool |
requests stat information for a user, usable after a successful call to RequestUserStats()
|
|
GetUserStatsData ( |
Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required buffer size.
|
|
IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool |
Achievement progress - triggers an AchievementProgress callback, that is all. Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.
|
|
InstallPS3Trophies ( ) : bool |
Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t callback.
|
|
RequestCurrentStats ( ) : bool |
Ask the server to send down this user's data and achievements for this game
|
|
RequestGlobalAchievementPercentages ( ) : SteamAPICall_t |
Requests that Steam fetch data on the percentage of players who have received each achievement for the game globally. This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
|
|
RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t |
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.
|
|
RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t |
Friends stats & achievements downloads stats for the user returns a UserStatsReceived_t received when completed if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data
|
|
ResetAllStats ( bool bAchievementsToo ) : bool |
Reset stats
|
|
SetAchievement ( string pchName ) : bool | ||
SetStat ( string pchName, float fData ) : bool | ||
SetStat ( string pchName, int nData ) : bool |
Set / update data
|
|
SetUserStatsData ( |
On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data. At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method. If you do not have any user data, call this function with pvData = NULL and cubData = 0
|
|
StoreStats ( ) : bool |
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.
|
|
UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool | ||
UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t |
Uploads a user score to the Steam back-end. This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t Details are extra game-defined information regarding how the user got that score pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
|
public static AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t | ||
hSteamLeaderboard | SteamLeaderboard_t | |
hUGC | UGCHandle_t | |
return | SteamAPICall_t |
public static ClearAchievement ( string pchName ) : bool | ||
pchName | string | |
return | bool |
public static DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t | ||
hSteamLeaderboard | SteamLeaderboard_t | |
eLeaderboardDataRequest | ELeaderboardDataRequest | |
nRangeStart | int | |
nRangeEnd | int | |
return | SteamAPICall_t |
public static DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t | ||
hSteamLeaderboard | SteamLeaderboard_t | |
prgUsers | CSteamID | |
cUsers | int | |
return | SteamAPICall_t |
public static FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t | ||
pchLeaderboardName | string | |
return | SteamAPICall_t |
public static FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t | ||
pchLeaderboardName | string | |
eLeaderboardSortMethod | ELeaderboardSortMethod | |
eLeaderboardDisplayType | ELeaderboardDisplayType | |
return | SteamAPICall_t |
public static GetAchievement ( string pchName, bool &pbAchieved ) : bool | ||
pchName | string | |
pbAchieved | bool | |
return | bool |
public static GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool | ||
pchName | string | |
pflPercent | float | |
return | bool |
public static GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool | ||
pchName | string | |
pbAchieved | bool | |
punUnlockTime | uint | |
return | bool |
public static GetAchievementDisplayAttribute ( string pchName, string pchKey ) : string | ||
pchName | string | |
pchKey | string | |
return | string |
public static GetAchievementIcon ( string pchName ) : int | ||
pchName | string | |
return | int |
public static GetAchievementName ( uint iAchievement ) : string | ||
iAchievement | uint | |
return | string |
public static GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, |
||
hSteamLeaderboardEntries | SteamLeaderboardEntries_t | |
index | int | |
pLeaderboardEntry | ||
pDetails | int | |
cDetailsMax | int | |
return | bool |
public static GetGlobalStat ( string pchStatName, double &pData ) : bool | ||
pchStatName | string | |
pData | double | |
return | bool |
public static GetGlobalStat ( string pchStatName, long &pData ) : bool | ||
pchStatName | string | |
pData | long | |
return | bool |
public static GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int | ||
pchStatName | string | |
pData | double | |
cubData | uint | |
return | int |
public static GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int | ||
pchStatName | string | |
pData | long | |
cubData | uint | |
return | int |
public static GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType | ||
hSteamLeaderboard | SteamLeaderboard_t | |
return | ELeaderboardDisplayType |
public static GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int | ||
hSteamLeaderboard | SteamLeaderboard_t | |
return | int |
public static GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string | ||
hSteamLeaderboard | SteamLeaderboard_t | |
return | string |
public static GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod | ||
hSteamLeaderboard | SteamLeaderboard_t | |
return | ELeaderboardSortMethod |
public static GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int | ||
pchName | string | |
unNameBufLen | uint | |
pflPercent | float | |
pbAchieved | bool | |
return | int |
public static GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int | ||
iIteratorPrevious | int | |
pchName | string | |
unNameBufLen | uint | |
pflPercent | float | |
pbAchieved | bool | |
return | int |
public static GetNumberOfCurrentPlayers ( ) : SteamAPICall_t | ||
return | SteamAPICall_t |
public static GetStat ( string pchName, float &pData ) : bool | ||
pchName | string | |
pData | float | |
return | bool |
public static GetStat ( string pchName, int &pData ) : bool | ||
pchName | string | |
pData | int | |
return | bool |
public static GetTrophySpaceRequiredBeforeInstall ( ) : ulong | ||
return | ulong |
public static GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool | ||
steamIDUser | CSteamID | |
pchName | string | |
pbAchieved | bool | |
return | bool |
public static GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool | ||
steamIDUser | CSteamID | |
pchName | string | |
pbAchieved | bool | |
punUnlockTime | uint | |
return | bool |
public static GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool | ||
steamIDUser | CSteamID | |
pchName | string | |
pData | float | |
return | bool |
public static GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool | ||
steamIDUser | CSteamID | |
pchName | string | |
pData | int | |
return | bool |
public static GetUserStatsData ( |
||
pvData | ||
cubData | uint | |
pcubWritten | uint | |
return | bool |
public static IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool | ||
pchName | string | |
nCurProgress | uint | |
nMaxProgress | uint | |
return | bool |
public static RequestGlobalAchievementPercentages ( ) : SteamAPICall_t | ||
return | SteamAPICall_t |
public static RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t | ||
nHistoryDays | int | |
return | SteamAPICall_t |
public static RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t | ||
steamIDUser | CSteamID | |
return | SteamAPICall_t |
public static ResetAllStats ( bool bAchievementsToo ) : bool | ||
bAchievementsToo | bool | |
return | bool |
public static SetAchievement ( string pchName ) : bool | ||
pchName | string | |
return | bool |
public static SetStat ( string pchName, float fData ) : bool | ||
pchName | string | |
fData | float | |
return | bool |
public static SetStat ( string pchName, int nData ) : bool | ||
pchName | string | |
nData | int | |
return | bool |
public static SetUserStatsData ( |
||
pvData | ||
cubData | uint | |
return | bool |
public static UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool | ||
pchName | string | |
flCountThisSession | float | |
dSessionLength | double | |
return | bool |
public static UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t | ||
hSteamLeaderboard | SteamLeaderboard_t | |
eLeaderboardUploadScoreMethod | ELeaderboardUploadScoreMethod | |
nScore | int | |
pScoreDetails | int | |
cScoreDetailsCount | int | |
return | SteamAPICall_t |