EOS Extension Documentation
EOS Extension Documentation
Free, cross-platform services that make it easier and faster for devs to successfully launch,
operate, and scale high-quality games.
Setup
Follow these guides to get yourself going on everything you need for your new game.
• Setup
Modules
This extension API presents a variety of modules that can be used to push your game to
the next level. These are the included modules:
• Achievements
• Auth
• Connect
• Friends
• Leaderboards
• Metrics
• Platform
• PlayerDataStorage
• ProgressionSnapshot
• Sanctions
• Stats
• TitleStorage
• User Interface
• UserInfo
• Other MISCELLANEOUS
Result Constants
This extension API can return a large set of result constants depending on the function
being called. These are the available result constants:
• EpicGames Result
Setup Guide
To use the Epic Online Services API extension you should follow these steps:
1. Import this Epic Online Services extension into your project, if you haven't done
that already.
2. The Epic Launcher App needs to be installed, running and with an account
logged in (official site).
3. Download Epic Online Services SDK (C version, 1.14.2) from Epics's developer
portal and extract the contents of the zip into a directory of your choice (e.g.: C:
\epic_online_services\sdk ).
NOTE If you set Debug Mode to false this will force your app to be launched by the
EOS launcher. This should only be used when you are ready to send your app to
production (DO NOT try to run the game from the IDE while debug mode is disabled)
Heading
This function is used to do something.
Functions
• EpicGames_Achievements_AddNotifyAchievementsUnlockedV2
• EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId
• EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex
• EpicGames_Achievements_CopyPlayerAchievementByAchievementId
• EpicGames_Achievements_CopyPlayerAchievementByIndex
• EpicGames_Achievements_GetAchievementDefinitionCount
• EpicGames_Achievements_GetPlayerAchievementCount
• EpicGames_Achievements_QueryDefinitions
• EpicGames_Achievements_QueryPlayerAchievements
• EpicGames_Achievements_RemoveNotifyAchievementsUnlocked
• EpicGames_Achievements_UnlockAchievement
Structures
• AchievementDefinition
• PlayerAchievement
EpicGames_Achievements_AddNotifyAchievementsUnlockedV2
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Achievements_AddNotifyAchievementsUnlockedV2()
Returns:
int64
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_Achievements_AddNotifyAchievementsUnlockedV2"
identifier = EpicGames_Achievements_AddNotifyAchievementsUnlockedV2()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId
Syntax:
EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId(AchievementId)
Returns:
struct (AchievementDefinition)
Example:
var struct =
EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId("MyAchievement1")
if(struct.status == EpicGames_Success)
{
var AchievementId = struct.AchievementId
}
The above code will show an example of how the function should be used. The
achievement definition data is returned providing an achievement id.
EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex
Syntax:
EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex(index)
Returns:
struct (AchievementDefinition)
Example:
The above code will show an example of how the function should be used. The
achievement definition data is returned providing an achievement index.
EpicGames_Achievements_CopyPlayerAchievementByAchievementId
Syntax:
EpicGames_Achievements_CopyPlayerAchievementByAchievementId(userID, userID_target,
achievementID)
Returns:
struct (PlayerAchievement)
Example:
var struct =
EpicGames_Achievements_CopyPlayerAchievementByAchievementId(userID,userID_target,achievementID)
if(struct.status == EpicGames_Success)
{
var AchievementId = struct.AchievementId
}
The above code will show an example of how the function should be used. The player
achievement data is returned providing an achievement id.
EpicGames_Achievements_CopyPlayerAchievementByIndex
Syntax:
Returns:
struct (PlayerAchievement)
Example:
The above code will show an example of how the function should be used. The player
achievement data is returned providing an achievement index.
EpicGames_Achievements_GetAchievementDefinitionCount
Syntax:
EpicGames_Achievements_GetAchievementDefinitionCount()
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Achievements_QueryDefinitions, the function
EpicGames_Achievements_GetAchievementDefinitionCount will return the number of
entries in the query array which can then be accessed using the
EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex function.
EpicGames_Achievements_GetPlayerAchievementCount
Syntax:
EpicGames_Achievements_GetPlayerAchievementCount(userID)
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Achievements_QueryPlayerAchievements, the function
EpicGames_Achievements_GetPlayerAchievementCount will return the number of entries
in the query array which can then be accessed using the
EpicGames_Achievements_CopyPlayerAchievementByIndex function.
EpicGames_Achievements_QueryDefinitions
Query for a list of definitions for all existing achievements, including localized text, icon IDs
and whether an achievement is hidden.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId
• EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex
• EpicGames_Achievements_GetAchievementDefinitionCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Achievements_QueryDefinitions(userId)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_Achievements_QueryDefinitions"
Example:
identifier = EpicGames_Achievements_QueryDefinitions(userId)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Achievements_QueryPlayerAchievements
Query for a list of achievements for a specific player, including progress towards
completion for each achievement.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Achievements_CopyPlayerAchievementByAchievementId
• EpicGames_Achievements_CopyPlayerAchievementByIndex
• EpicGames_Achievements_GetPlayerAchievementCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Achievements_QueryPlayerAchievements(userID, userID_target)
Returns:
real
Triggers:
Asynchronous Social Event
async_load Contents
Key Type Description
type string "EpicGames_Achievements_QueryPlayerAchievements"
Example:
identifier = EpicGames_Achievements_QueryPlayerAchievements(userID,userID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Achievements_RemoveNotifyAchievementsUnlocked
• EpicGames_Achievements_AddNotifyAchievementsUnlockedV2
Syntax:
EpicGames_Achievements_RemoveNotifyAchievementsUnlocked(id)
Returns:
N/A
Example:
handle = EpicGames_Achievements_AddNotifyAchievementsUnlockedV2()
//...
//later...
//...
EpicGames_Achievements_RemoveNotifyAchievementsUnlocked(handle)
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Achievements_UnlockAchievement(userID, AchievementID)
Returns:
real
Triggers:
Example:
identifier = EpicGames_Achievements_UnlockAchievement()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
PlayerAchievement
A player achievement is represented by a struct and contains information about a single
player achievement. This struct is returned by the following functions:
• EpicGames_Achievements_CopyPlayerAchievementByAchievementId
• EpicGames_Achievements_CopyPlayerAchievementByIndex
The status member present in the struct can be represented by one of the following
values:
• EpicGames_Achievements_CopyAchievementDefinitionV2ByAchievementId
• EpicGames_Achievements_CopyAchievementDefinitionV2ByIndex
The status member present in the struct can be represented by one of the following
values:
Guides
Functions
• EpicGames_Auth_AddNotifyLoginStatusChanged
• EpicGames_Auth_CopyIdToken
• EpicGames_Auth_CopyUserAuthToken
• EpicGames_Auth_DeletePersistentAuth
• EpicGames_Auth_GetLoginStatus
• EpicGames_Auth_GetSelectedAccountId
• EpicGames_Auth_LinkAccount
• EpicGames_Auth_Login
• EpicGames_Auth_Logout
• EpicGames_Auth_QueryIdToken
• EpicGames_Auth_RemoveNotifyLoginStatusChanged
• EpicGames_Auth_VerifyIdToken
Constants
• Login Status
External Login Flow Guide
This is a detailed login flow for external accounts (the required credentials depend on the
External Credential Type used with the EpicGames_Auth_Login API)
4. EOS SDK automatically opens the local default web browser and takes the user to
the Epic account portal web page.
5. The user is able to login to their existing Epic account or create a new
account if needed.
6. In the meantime, EOS SDK will internally keep polling the backend for a
completion status of the login flow.
7. Once user completes the login, cancels it or if the login flow times out,
EpicGames_Auth_LinkAccount invokes the completion callback to the caller.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Auth_AddNotifyLoginStatusChanged()
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_Auth_AddNotifyLoginStatusChanged"
EpicGames
CurrentStatus Login The status at the time of the notification
Status
EpicGames
PrevStatus Login The status prior to the change
Status
Example:
identifier = EpicGames_Auth_AddNotifyLoginStatusChanged()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Auth_CopyIdToken
Fetch an ID token for an Epic Account ID. ID tokens are used to securely verify user
identities with online services. The most common use case is using an ID token to
authenticate the local user by their selected account ID, which is the account ID that
should be used to access any game-scoped data for the current application. An ID token
for the selected account ID of a locally authenticated user will always be readily available.
To retrieve it for the selected account ID, you can use
EpicGames_Auth_CopyIdToken directly after a successful user login.
Syntax:
EpicGames_Auth_CopyIdToken(accountID)
Returns:
Struct
Example:
The above code will show an example of how the function should be used. The token
associated with the provided account id is returned inside the struct, alongside other
useful information.
EpicGames_Auth_CopyUserAuthToken
Fetch a user auth token for an Epic Account ID. A user authentication token allows any
code with possession (backend/client) to perform certain actions on behalf of the user.
Because of this, for the purposes of user identity verification,
the EpicGames_Auth_CopyIdToken should be used instead.
Syntax:
EpicGames_Auth_CopyUserAuthToken(accountID)
Returns:
struct
Example:
The above code will show an example of how the function should be used. The access
token associated with the provided account id is returned inside the struct along side
other useful information.
EpicGames_Auth_DeletePersistentAuth
Deletes a previously received and locally stored persistent auth access token for the
currently logged in user of the local device. On Desktop and Mobile platforms, the access
token is deleted from the keychain of the local user and a backend request is made to
revoke the token on the authentication server. On Console platforms, even though the
caller is responsible for storing and deleting the access token on the local device, this
function should still be called with the access token before its deletion to make the best
effort in attempting to also revoke it on the authentication server. If the function would fail
on Console, the caller should still proceed as normal to delete the access token locally as
intended.
Syntax:
EpicGames_Auth_DeletePersistentAuth(refreshToken)
Returns:
N/A
Example:
EpicGames_Auth_DeletePersistentAuth(refreshtoken)
The above code will show an example of how the function should be used. The refresh
token provided will be revoked and invalidated.
EpicGames_Auth_GetLoginStatus
Fetches the login status for an Epic Account ID.
Syntax:
EpicGames_Auth_GetLoginStatus(accountId)
Returns:
Example:
switch(EpicGames_Auth_GetLoginStatus(AccountID))
{
case EpicGames_LS_NotLoggedIn:
draw_text(100,190,"LoginStatus: NotLoggedIn");
break;
case EpicGames_LS_UsingLocalProfile:
draw_text(100,190,"LoginStatus: UsingLocalProfile");
break;
case EpicGames_LS_LoggedIn:
draw_text(100,190,"LoginStatus: LoggedIn");
break;
}
The above code will show an example of how the function should be used. A login status
constant is returned and checked against the provided builtin constants.
EpicGames_Auth_GetSelectedAccountId
Fetch the selected account ID to the current application for a local authenticated user.
Syntax:
EpicGames_Auth_GetSelectedAccountId(account)
Returns:
string
Example:
The above code will show an example of how the function should be used.
EpicGames_Auth_LinkAccount
Link external account by continuing previous login attempt with a continuance token. On
Desktop and Mobile platforms, the user will be presented the Epic Account Portal to
resolve their identity. On Console, the user will login to their Epic Account using an
external device, e.g. a mobile device or a desktop PC, by browsing to the presented
authentication URL and entering the device code presented by the game on the console.
On success, the user will be logged in at the completion of this action. This will commit this
external account to the Epic Account and cannot be undone in the SDK.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Auth_LinkAccount(accountID, scope_flags)
Returns:
real
Triggers:
Asynchronous Social Event
async_load Contents
Key Type Description
type string The string "EpicGames_Auth_LinkAccount"
Example:
identifier = EpicGames_Auth_Login(
accountID,
EpicGames_AS_BasicProfile | EpicGames_AS_FriendsList |
EpicGames_AS_Presence)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Auth_Login
Login/Authenticate with user credentials.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Auth_Login"
Example:
identifier = EpicGames_Auth_Login(
EpicGames_LCT_ExchangeCode,
EpicGames_AS_BasicProfile | EpicGames_AS_FriendsList |
EpicGames_AS_Presence,
"",
code,
noone)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Auth_Logout
Signs the player out of the online service.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Auth_Logout(accountID)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Auth_Logout"
Example:
identifier = EpicGames_Auth_Logout(accountID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Auth_QueryIdToken
Query the backend for an ID token that describes one of the merged account IDs of a local
authenticated user. The ID token can be used to impersonate a merged account ID when
communicating with online services. An ID token for the selected account ID of a locally
authenticated user will always be readily available and does not need to be queried
explicitly.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Auth_QueryIdToken(accountID, accountID_target)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Auth_QueryIdToken"
Example:
identifier = EpicGames_Auth_QueryIdToken(accountID,accountID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Auth_RemoveNotifyLoginStatusChanged
Syntax:
EpicGames_Auth_RemoveNotifyLoginStatusChanged(id)
Returns:
N/A
Example:
• EpicGames_Auth_AddNotifyLoginStatusChanged CALLBACK
• EpicGames_Auth_GetLoginStatus
• EpicGames_Connect_AddNotifyLoginStatusChanged CALLBACK
• EpicGames_Connect_GetLoginStatus
Argument Description
Epic Account Services Token Using ID Token is
preferred, retrieved with
EpicGames_Auth_CopyIdToken that returns
JsonWebToken. Using Auth Token is supported for
EpicGames_ECT_EPIC
backwards compatibility, retrieved with
EpicGames_Auth_CopyUserAuthToken that returns
AccessToken. Supported with
EpicGames_Connect_Login.
Steam Encrypted App Ticket Generated using the
RequestEncryptedAppTicket API of Steamworks SDK.
EpicGames_ECT_STEAM_APP_TICKET The retrieved App is then passed into
the EpicGames_Auth_Login
or EpicGames_Connect_Login APIs.
PlayStation(TM)Network ID Token Retrieved from
the PlayStation(R) SDK. Please see first-party
EpicGames_ECT_PSN_ID_TOKEN documentation for additional information.
Supported with
EpicGames_Auth_Login, EpicGames_Connect_Login.
Xbox Live XSTS Token Retrieved from the GDK and
XDK. Please see first-party documentation for
EpicGames_ECT_XBL_XSTS_TOKEN
additional information. Supported with
EpicGames_Auth_Login, EpicGames_Connect_Login.
Discord Access Token Retrieved using the
EpicGames_ECT_DISCORD_ACCESS_TOKEN GetOAuth2Token API of Discord SDK. Supported
with EpicGames_Auth_Login.
GOG Galaxy Encrypted App Ticket Generated using
the RequestEncryptedAppTicket API of GOG Galaxy
EpicGames_ECT_GOG_SESSION_TICKET
SDK. The retrieved App is then passed into
the EpicGames_Auth_Login API.
Nintendo Account ID Token Identifies a Nintendo
user account and is acquired through web flow
authentication where the local user logs in using
EpicGames_ECT_NINTENDO_ID_TOKEN their email address/sign-in ID and password. This is
the common Nintendo account that users login with
outside the Nintendo Switch device. Supported with
EpicGames_Auth_Login, EpicGames_Connect_Login.
Nintendo Service Account ID Token (NSA ID) The
NSA ID identifies uniquely the local Nintendo Switch
device. The authentication token is acquired locally
without explicit user credentials. As such, it is the
primary authentication method for seamless login
on Nintendo Switch. The NSA ID is not exposed
directly to the user and does not provide any means
for login outside the local device. Because of this,
Nintendo Switch users will need to link their
Nintendo Account or another external user account
to their Product User ID in order to share their game
progression across other platforms. Otherwise, the
user will not be able to login to their existing
Product User ID on another platform due to missing
EpicGames_ECT_NINTENDO_NSA_ID_TOKEN login credentials to use. It is recommended that the
game explicitly communicates this restriction to the
user so that they will know to add the first linked
external account on the Nintendo Switch device and
then proceed with login on another platform. In
addition to sharing cross-platform game
progression, linking the Nintendo Account or
another external account will allow preserving the
game progression permanently. Otherwise, the
game progression will be tied only to the local
device. In case the user loses access to their local
device, they will not be able to recover the game
progression if it is only associated with this account
type. Supported with
EpicGames_Auth_Login, EpicGames_Connect_Login.
EpicGames_ECT_UPLAY_ACCESS_TOKEN Uplay Access Token
OpenID Provider Access Token Supported with
EpicGames_ECT_OPENID_ACCESS_TOKEN
EpicGames_Connect_Login.
Device ID access token that identifies the current
locally logged in user profile on the local device. The
local user profile here refers to the operating system
user login, for example the user's Windows Account
or on a mobile device the default active user profile.
This credential type is used to automatically login
the local user using the EOS Connect Device ID
feature. The intended use of the Device ID feature is
EpicGames_ECT_DEVICEID_ACCESS_TOKEN to allow automatically logging in the user on a
mobile device and to allow playing the game without
requiring the user to necessarily login using a real
user account at all. This makes a seamless first-time
experience possible and allows linking the local
device with a real external user account at a later
time, sharing the same EpicGames_ProductUserId
that is being used with the Device ID feature.
Supported with EpicGames_Connect_Login.
Apple ID Token; Supported with
EpicGames_ECT_APPLE_ID_TOKEN
EpicGames_Connect_Login.
Google ID Token; Supported with
EpicGames_ECT_GOOGLE_ID_TOKEN
EpicGames_Connect_Login.
Oculus User ID and Nonce (call
ovr_User_GetUserProof, to retrieve the nonce). Then
pass the local User ID and the Nonce as a "{UserID}|
{Nonce}" formatted string for
the EpicGames_Connect_Login Token parameter.
EpicGames_ECT_OCULUS_USERID_NONCE Note that in order to successfully retrieve a valid
non-zero id for the local user using
ovr_User_GetUser, your Oculus App needs to be
configured in the Oculus Developer Dashboard to
have the User ID feature enabled. Supported with
EpicGames_Connect_Login.
itch.io JWT Access Token. Use the itch.io app
manifest to receive a JWT access token for the local
user via the ITCHIO_API_KEY process environment
variable. The itch.io access token is valid for 7 days
EpicGames_ECT_ITCHIO_JWT
after which the game needs to be restarted by the
user as otherwise EOS Connect authentication
session can no longer be refreshed. Supported with
EpicGames_Connect_Login.
itch.io Key Access Token. This access token type is
retrieved through the OAuth 2.0 authentication flow
EpicGames_ECT_ITCHIO_KEY
for the itch.io application. Supported with
EpicGames_Connect_Login.
Epic Games ID Token. Acquired
using EpicGames_Auth_CopyIdToken that returns
EpicGames_ECT_EPIC_ID_TOKEN
JsonWebToken. Supported with
EpicGames_Connect_Login.
Amazon Access Token. Supported with
EpicGames_ECT_AMAZON_ACCESS_TOKEN
EpicGames_Connect_Login.
ELogin Credential Type
These constants represent all possible types of login methods, availability depends on
permissions granted to the client.
Argument Description
EpicGames_LCT_Password The argument to be passed in
A short-lived one-time use exchange
code to login the local user. When
started, the application is expected to
consume the exchange code by using
the EpicGames_Auth_Login API as
soon as possible. This is needed in
EpicGames_LCT_ExchangeCode
order to authenticate the local user
before the exchange code would
expire. Attempting to consume an
already expired exchange code will
return AuthExchangeCodeNotFound error
by the EpicGames_Auth_Login API.
Desktop and Mobile only; deprecated
on Console platforms in favor of
EOS_LCT_ExternalAuth login method.
Long-lived access token that is stored
on the local device to allow persisting
a user login session over multiple
runs of the application. When using
this login type, if an existing access
token is not found or it is invalid or
EpicGames_LCT_PersistentAuth otherwise expired, the error result
EpicGames_InvalidAuth is returned. On
• EpicGames_Auth_Login
• EpicGames_Auth_LinkAccount
Functions
• EpicGames_Connect_AddNotifyAuthExpiration
• EpicGames_Connect_AddNotifyLoginStatusChanged
• EpicGames_Connect_CopyIdToken
• EpicGames_Connect_CopyProductUserInfo
• EpicGames_Connect_CreateUser
• EpicGames_Connect_GetLoginStatus
• EpicGames_Connect_Login
• EpicGames_Connect_RemoveNotifyAuthExpiration
• EpicGames_Connect_RemoveNotifyLoginStatusChanged
Structures
• ExternalAccountInfo
EpicGames_Connect_AddNotifyAuthExpiration
Register to receive upcoming authentication expiration notifications. Notification is
approximately 10 minutes prior to expiration. Call EpicGames_Connect_Login again with
valid third party credentials to refresh access.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Connect_AddNotifyAuthExpiration()
Returns:
N/A
Triggers:
Example:
identifier = EpicGames_Connect_AddNotifyAuthExpiration()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Connect_AddNotifyLoginStatusChanged
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Connect_AddNotifyLoginStatusChanged()
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_Connect_AddNotifyLoginStatusChanged"
EpicGames
CurrentStatus Login The status at the time of the notification
Status
EpicGames
PrevStatus Login The status prior to the change
Status
Example:
identifier = EpicGames_Connect_AddNotifyLoginStatusChanged()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Connect_CopyIdToken
Fetches an ID token for a Product User ID.
Syntax:
EpicGames_Connect_CopyIdToken(user)
Argument Description
user The local Product User ID whose ID token should be copied.
Returns:
struct
Example:
var struct = EpicGames_Connect_CopyIdToken(user)
if(struct.status = EpicGames_Success)
{
JsonWebToken = struct.JsonWebToken
}
The above code will show an example of how the function should be used. The JWT
associated with the provided product user id is returned inside the struct, alongside other
useful information.
EpicGames_Connect_CopyProductUserInfo
Fetch information about a Product User, using the external account that they most
recently logged in with as the reference.
Syntax:
EpicGames_Connect_CopyProductUserInfo(userID_target)
Argument Description
Product user ID to look for when copying external
userID_target
account info from the cache.
Returns:
struct (ExternalAccountInfo)
Example:
The above code will show an example of how the function should be used.
EpicGames_Connect_CreateUser
Create an account association with the Epic Online Service as a product user given their
external auth credentials.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Connect_CreateUser()
Returns:
real
Triggers:
identifier = EpicGames_Connect_CreateUser()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Connect_GetLoginStatus
Fetches the login status for an Product User ID. This Product User ID is considered logged
in as long as the underlying access token has not expired.
Syntax:
EpicGames_Connect_GetLoginStatus(user)
Returns:
Example:
if(EpicGames_Connect_GetLoginStatus(user) == EpicGames_LS_LoggedIn)
show_debug_message(user + ": is logged")
else
show_debug_message(user + ": not logged")
The above code will show an example of how the function should be used. A login status
constant is returned and checked against the provided builtin constants.
EpicGames_Connect_Login
Login/Authenticate given a valid set of external auth credentials.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Returns:
real
Triggers:
Example:
identifier = EpicGames_Connect_Login()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Connect_RemoveNotifyAuthExpiration
Unregister from receiving expiration notifications.
Syntax:
EpicGames_Connect_RemoveNotifyAuthExpiration(id)
Returns:
N/A
Example:
AddNotifyAuthExpiration_id = EpicGames_Connect_AddNotifyAuthExpiration()
//...
//...Later
//...
EpicGames_Connect_RemoveNotifyAuthExpiration(AddNotifyAuthExpiration_id)
Syntax:
EpicGames_Connect_RemoveNotifyLoginStatusChanged(Id)
Returns:
N/A
Example:
NotifyLoginStatusChanged_id = EpicGames_Connect_AddNotifyLoginStatusChanged()
//...
//...Later
//...
EpicGames_Connect_RemoveNotifyLoginStatusChanged(NotifyLoginStatusChanged_id)
The code sample above enables the login status changed notifications
(EpicGames_Connect_AddNotifyLoginStatusChanged) and later disables them by refering
to the previous generated handle.
Friends
Playing games with your friends and meeting new players online are important parts of
many online services. The Epic Online Services (EOS) SDK uses the Friends Interface to
retrieve the friends lists for a logged-in user.
Friends lists are stored by the online service's servers, and can change during a session as
friends are added or removed or if friends grant or revoke consent for the game to use
their information.
Functions
• EpicGames_Friends_AcceptInvite
• EpicGames_Friends_AddNotifyFriendsUpdate
• EpicGames_Friends_GetFriendAtIndex
• EpicGames_Friends_GetFriendsCount
• EpicGames_Friends_GetStatus
• EpicGames_Friends_QueryFriends
• EpicGames_Friends_RejectInvite
• EpicGames_Friends_RemoveNotifyFriendsUpdate
• EpicGames_Friends_SendInvite
Constants
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Friends_AcceptInvite(accountID, accountID_target)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Friends_AcceptInvite"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes
indicate errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Friends_AddNotifyFriendsUpdate
Listen for changes to friends for a particular account.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Friends_AddNotifyFriendsUpdate()
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_Friends_AddNotifyFriendsUpdate"
EpicGames
CurrentStatus Friendship The current status of the user.
Status
EpicGames
PreviousStatus Friendship The previous status of the user.
Status
The Epic Account ID of the user whose
TargetUserId string
status is being updated.
The Epic Account ID of the local user
LocalUserId string
who is receiving the update
Example:
identifier = EpicGames_Friends_AddNotifyFriendsUpdate()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Friends_GetFriendAtIndex
Retrieves the Epic Account ID of an entry from the friends list that has already been
cached. The Epic Account ID returned by this function may belong to an account that has
been invited to be a friend or that has invited the local user to be a friend. To determine if
the Epic Account ID returned by this function is a friend or a pending friend invitation, use
the EpicGames_Friends_GetStatus function.
Syntax:
EpicGames_Friends_GetFriendAtIndex(accountID, index)
Returns:
string
Example:
The above code will show an example of how the function should be used. The friends
data is returned providing an index.
EpicGames_Friends_GetFriendsCount
Retrieves the number of friends on the friends list.
Syntax:
EpicGames_Friends_GetFriendsCount(accountID)
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Friends_QueryFriends, the
function EpicGames_Friends_GetFriendsCount will return the number of entries in the
query array which can then be accessed using the
EpicGames_Friends_GetFriendAtIndex function.
EpicGames_Friends_GetStatus
Retrieve the friendship status between the local user and another user.
Syntax:
EpicGames_Friends_GetStatus(accountID, accountID_target)
Returns:
Example:
if(EpicGames_Friends_GetStatus(accountID,accountID_target) == EpicGames_FS_Friends)
{
show_debug_message("It's my friend!!!")
}
else
{
show_debug_message("Not my friend :(")
}
The above code will show an example of how the function should be used. The friendship
status is returned from the function call.
EpicGames_Friends_QueryFriends
Starts an asynchronous task that reads the user's friends list from the backend service,
caching it for future use.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Friends_GetFriendAtIndex
• EpicGames_Friends_GetFriendsCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Friends_QueryFriends(accountID)
Returns:
N/A
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Friends_QueryFriends"
Example:
identifier = EpicGames_Friends_QueryFriends(accountID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Friends_RejectInvite
Starts an asynchronous task that rejects a friend invitation from another user. The
completion delegate is executed after the backend response has been received.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Friends_RejectInvite(accountID, accountID_target)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Friends_RejectInvite"
Example:
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Friends_RemoveNotifyFriendsUpdate
Stop listening for friends changes on a previously bound handler.
Syntax:
EpicGames_Friends_RemoveNotifyFriendsUpdate(id)
Returns:
N/A
Example:
handle = EpicGames_Friends_AddNotifyFriendsUpdate()
//...
//...later
//...
EpicGames_Friends_RemoveNotifyFriendsUpdate(handle)
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Friends_SendInvite(accountID,accountID_target)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Friends_SendInvite"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes
indicate errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames Friendship Status
These contants are used to describe the friendship status with a given account and are
returned by the following functions:
• EpicGames_Friends_AddNotifyFriendsUpdate CALLBACK
• EpicGames_Friends_GetStatus
EpicGames Friendship
Description
Status Constant
The two accounts have no
EpicGames_FS_NotFriends
friendship status
The local account has sent a friend
EpicGames_FS_InviteSent
invite to the other account
The other account has sent a friend
EpicGames_FS_InviteRecieved
invite to the local account
The accounts have accepted
EpicGames_FS_Friends
friendship
Leaderboards
The Leaderboards Interface gives developers using Epic Online Services (EOS) the ability to
rank scores from their entire player base, so that players can compete with their friends or
other players worldwide for the top score. Each game can support multiple leaderboards,
collecting scores from different sources, and ranking them with different scoring modes.
Functions
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId
• EpicGames_Leaderboards_CopyLeaderboardRecordByIndex
• EpicGames_Leaderboards_CopyLeaderboardRecordByUserId
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByUserId
• EpicGames_Leaderboards_GetLeaderboardDefinitionCount
• EpicGames_Leaderboards_GetLeaderboardRecordCount
• EpicGames_Leaderboards_GetLeaderboardUserScoreCount
• EpicGames_Leaderboards_QueryLeaderboardDefinitions
• EpicGames_Leaderboards_QueryLeaderboardRanks
• EpicGames_Leaderboards_QueryLeaderboardUserScores
Structures
• LeaderboardDefinition
• LeaderboardRecord
• LeaderboardUserScore
EpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex
Syntax:
EpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex(index)
Returns:
struct (LeaderboardDefinition)
Example:
The above code will show an example of how the function should be used. The
leaderboard definition data is returned providing an leaderboard index.
EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId
EXTERNAL A wrapper
around EOS_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId
Syntax:
EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId(leaderboardID)
Returns:
struct (LeaderboardDefinition)
Example:
var struct =
EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId("MyLeaderboard")
if(struct.status == EpicGames_Success)
{
var LeaderboardId = struct.LeaderboardId
}
The above code will show an example of how the function should be used. The
leaderboard definition data is returned providing an leaderboard id.
EpicGames_Leaderboards_CopyLeaderboardRecordByIndex
Syntax:
EpicGames_Leaderboards_CopyLeaderboardRecordByIndex(index)
Returns:
struct (LeaderboardRecord)
Example:
The above code will show an example of how the function should be used. The
leaderboard record data is returned providing an leaderboard index.
EpicGames_Leaderboards_CopyLeaderboardRecordByUserId
Syntax:
EpicGames_Leaderboards_CopyLeaderboardRecordByUserId(userId)
Returns:
struct (LeaderboardRecord)
Example:
The above code will show an example of how the function should be used. The
leaderboard record data is returned providing an user id.
EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex
Syntax:
EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex(index, statName)
Returns:
struct (LeaderboardUserScore)
Example:
The above code will show an example of how the function should be used. The
leaderboard user score is returned providing an index.
EpicGames_Leaderboards_CopyLeaderboardUserScoreByUserId
Syntax:
EpicGames_Leaderboards_CopyLeaderboardUserScoreByUserId(userId, statName)
Returns:
struct (LeaderboardUserScore)
Example:
The above code will show an example of how the function should be used. The
leaderboard user score is returned providing an user id.
EpicGames_Leaderboards_GetLeaderboardDefinitionCount
Syntax:
EpicGames_Leaderboards_GetLeaderboardDefinitionCount()
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Leaderboards_QueryLeaderboardDefinitions, the function
EpicGames_Leaderboards_GetLeaderboardDefinitionCount will return the number of
entries in the query array which can then be accessed using
theEpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex function.
EpicGames_Leaderboards_GetLeaderboardRecordCount
Syntax:
EpicGames_Leaderboards_GetLeaderboardRecordCount()
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Leaderboards_QueryLeaderboardRanks, the function
EpicGames_Leaderboards_GetLeaderboardRecordCount will return the number of entries
in the query array which can then be accessed using
the EpicGames_Leaderboards_CopyLeaderboardRecordByIndex function.
EpicGames_Leaderboards_GetLeaderboardUserScoreCount
Fetch the number of leaderboard user scores that are cached locally.
Syntax:
EpicGames_Leaderboards_GetLeaderboardUserScoreCount()
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Leaderboards_QueryLeaderboardUserScores, the function
EpicGames_Leaderboards_GetLeaderboardUserScoreCount will return the number of
entries in the query array which can then be accessed using
the EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex function.
EpicGames_Leaderboards_QueryLeaderboardDefinitions
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId
• EpicGames_Leaderboards_GetLeaderboardDefinitionCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_Leaderboards_QueryLeaderboardDefinitions"
Example:
identifier = EpicGames_Leaderboards_QueryLeaderboardDefinitions
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Leaderboards_QueryLeaderboardRanks
Retrieves top leaderboard records by rank in the leaderboard matching the given
leaderboard ID.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Leaderboards_CopyLeaderboardRecordByIndex
• EpicGames_Leaderboards_CopyLeaderboardRecordByUserId
• EpicGames_Leaderboards_GetLeaderboardRecordCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Leaderboards_QueryLeaderboardRanks(userID, LeaderboardId)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_Leaderboards_QueryLeaderboardRanks"
Example:
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Leaderboards_QueryLeaderboardUserScores
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByUserId
• EpicGames_Leaderboards_GetLeaderboardUserScoreCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_Leaderboards_QueryLeaderboardUserScores"
Example:
The code sample above save the identifier that can be used inside an Async Social event.
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByIndex
• EpicGames_Leaderboards_CopyLeaderboardUserScoreByUserId
• EpicGames_Leaderboards_CopyLeaderboardRecordByIndex
• EpicGames_Leaderboards_CopyLeaderboardRecordByUserId
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByIndex
• EpicGames_Leaderboards_CopyLeaderboardDefinitionByLeaderboardId
Functions
• EpicGames_Metrics_BeginPlayerSession
• EpicGames_Metrics_EndPlayerSession
Constants
Syntax:
struct
Example:
if(struct.status != EpicGames_Success)
{
show_debug_message("EpicGames_Metrics_BeginPlayerSession Failed")
}
The above code will show an example of how the function should be used.
EpicGames_Metrics_EndPlayerSession
Logs the end of a game session for a local player. Call once when the game client leaves
the active game session. Each call to EpicGames_Metrics_BeginPlayerSession must be
matched with a corresponding call to EpicGames_Metrics_EndPlayerSession.
Syntax:
EpicGames_Metrics_EndPlayerSession(accountID,AccountIdType)
Returns:
struct
Example:
• EpicGames_Metrics_BeginPlayerSession
• EpicGames_Metrics_EndPlayerSession
• EpicGames_Metrics_BeginPlayerSession
Functions
• EpicGames_Platform_CheckForLauncherAndRestart
• EpicGames_Platform_GetActiveCountryCode
• EpicGames_Platform_GetActiveLocaleCode
• EpicGames_Platform_GetOverrideCountryCode
• EpicGames_Platform_GetOverrideLocaleCode
• EpicGames_Platform_Release
• EpicGames_Platform_SetOverrideCountryCode
• EpicGames_Platform_SetOverrideLocaleCode
• EpicGames_Platform_Tick
EpicGames_Platform_CheckForLauncherAndRestart
Checks if the app was launched through the Epic Launcher, and relaunches it through the
Epic Launcher if it wasn't.
1.
EpicGames_Successis returned if the app is being restarted. You should quit your
process as soon as possible.
2.
EpicGames_NoChangeis returned if the app was already launched through the Epic
Launcher, and no action needs to be taken.
3.
EpicGames_UnexpectedError is returned if the LauncherCheck module failed to
initialize, or the module tried and failed to restart the app.
Syntax:
EpicGames_Platform_CheckForLauncherAndRestart()
Returns:
real
Example:
if (EpicGames_Platform_CheckForLauncherAndRestart() != EpicGames_NoChange)
game_end();
The above code will show an example of how the function should be used. If the output of
the function is other than EpicGames_NoChange it will force close the project.
EpicGames_Platform_GetActiveCountryCode
Returns the active country code. This only will return the value set as the override
otherwise empty string is returned.
Syntax:
EpicGames_Platform_GetActiveCountryCode(accountID)
Returns:
string
Example:
show_debug_message("CountryCode: "
+ EpicGames_Platform_GetActiveCountryCode(accountID))
The above code will show an example of how the function should be used.
EpicGames_Platform_GetActiveLocaleCode
Get the active locale code that the SDK will send to services which require it. This returns
the override value otherwise it will use the locale code of the given user. This is used for
localization. This follows ISO 639.
Syntax:
EpicGames_Platform_GetActiveLocaleCode(accountID)
Returns:
string
Example:
show_debug_message("LocaleCode: "
+ EpicGames_Platform_GetActiveLocaleCode(accountID))
The above code will show an example of how the function should be used.
EpicGames_Platform_GetOverrideCountryCode
Get the override country code that the SDK will send to services which require it. This is
not currently used for anything internally.
Syntax:
EpicGames_Platform_GetOverrideCountryCode()
Returns:
string
Example:
The above code will show an example of how the function should be used.
EpicGames_Platform_GetOverrideLocaleCode
Get the override locale code that the SDK will send to services which require it. This is used
for localization. This follows ISO 639.
Syntax:
EpicGames_Platform_GetOverrideLocaleCode()
Returns:
string
Example:
The above code will show an example of how the function should be used.
EpicGames_Platform_Release
Release an Epic Online Services platform. This function should only be called when
terminating your application right before calling EpicGames_Shutdown.
Syntax:
EpicGames_Platform_Release()
Returns:
N/A
Example:
EpicGames_Platform_Release();
EpicGames_Shutdown();
game_end();
The above code will show an example of how the function should be used.
EpicGames_Platform_SetOverrideCountryCode
Set the override country code that the SDK will send to services which require it. This is not
currently used for anything internally.
Syntax:
EpicGames_Platform_SetOverrideCountryCode(countryCode)
Returns:
N/A
Example:
EpicGames_Platform_SetOverrideCountryCode("UK")
The above code will show an example of how the function should be used.
EpicGames_Platform_SetOverrideLocaleCode
Set the override locale code that the SDK will send to services which require it. This is used
for localization. This follows ISO 639.
Syntax:
EpicGames_Platform_SetOverrideLocaleCode(localCode)
Returns:
N/A
Example:
EpicGames_Platform_SetOverrideLocaleCode("en")
The above code will show an example of how the function should be used.
EpicGames_Platform_Tick
Notify the platform instance to do work. This function must be called frequently in order
for the services provided by the SDK to properly.
Syntax:
EpicGames_Platform_Tick()
Returns:
N/A
Example:
EpicGames_Platform_Tick()
Functions
• EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex
• EpicGames_PlayerDataStorage_CopyFileMetadataByFilename
• EpicGames_PlayerDataStorage_DeleteCache
• EpicGames_PlayerDataStorage_DeleteFile
• EpicGames_PlayerDataStorage_DuplicateFile
• EpicGames_PlayerDataStorage_GetFileMetadataCount
• EpicGames_PlayerDataStorage_QueryFile
• EpicGames_PlayerDataStorage_QueryFileList
• EpicGames_PlayerDataStorage_ReadFile
• EpicGames_PlayerDataStorage_WriteFile
• EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest
Structures
• PlayerFileMetadata
EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex
Get the cached copy of a file's metadata by index. The metadata will be for the last
retrieved or successfully saved version, and will not include any local changes that have
not been committed by calling EpicGames_PlayerDataStorage_WriteFile.
Syntax:
EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex(userID,index)
Returns:
struct (PlayerFileMetadata)
Example:
Create the cached copy of a file's metadata by filename. The metadata will be for the last
retrieved or successfully saved version, and will not include any changes that have not
completed writing.
Syntax:
EpicGames_PlayerDataStorage_CopyFileMetadataByFilename(userID, filename)
Returns:
struct (PlayerFileMetadata)
Example:
The above code will show an example of how the function should be used. The player file
metadata is returned for a provided filename.
EpicGames_PlayerDataStorage_DeleteCache
Clear previously cached file data. This operation will be done asynchronously. All cached
files except those corresponding to the transfers in progress will be removed. Warning:
Use this with care. Cache system generally tries to clear old and unused cached files from
time to time. Unnecessarily clearing cache can degrade performance as SDK will have to
re-download data.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_DeleteCache(userID)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorage_DeleteCache"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes indicate
errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
identifier = EpicGames_PlayerDataStorage_DeleteCache(userID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_DeleteFile
Deletes an existing file in the cloud. If successful, the file's data will be removed from our
local cache.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_DeleteFile(userID,filename)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorage_DeleteFile"
Example:
identifier = EpicGames_PlayerDataStorage_DeleteFile(userID,"MyFilename.txt")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_DuplicateFile
Copies the data of an existing file to a new filename. This action happens entirely on the
server and will not upload the contents of the source destination file from the host. This
function paired with a subsequent EpicGames_PlayerDataStorage_DeleteFile can be used
to rename a file. If successful, the destination file's metadata will be updated in our local
cache.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_DuplicateFile(userID,source,destination)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorage_DuplicateFile"
Example:
identifier =
EpicGames_PlayerDataStorage_DuplicateFile(userID,"myNiceFile.dat","myNiceFile2.dat")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_GetFileMetadataCount
Get the count of files we have previously queried information for and files we have
previously read from / written to.
Syntax:
EpicGames_PlayerDataStorage_GetFileMetadataCount(userID)
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_PlayerDataStorage_QueryFileList, the
function EpicGames_PlayerDataStorage_GetFileMetadataCount will return the number of
entries in the query array which can then be accessed using the
EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex function.
EpicGames_PlayerDataStorage_QueryFile
Query a specific file's metadata, such as file names, size, and a MD5 hash of the data. This
is not required before a file may be opened, saved, copied, or deleted. Once a file has
been queried, its metadata will be available by the one of the following functions:
• EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex
• EpicGames_PlayerDataStorage_CopyFileMetadataByFilename
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_QueryFile(userID,filename)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorage_QueryFile"
Example:
identifier = EpicGames_PlayerDataStorage_QueryFile(userID,"myFile.txt")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_QueryFileList
Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files
owned by this user for this application. This is not required before a file may be opened,
saved, copied, or deleted.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex
• EpicGames_PlayerDataStorage_CopyFileMetadataByFilename
• EpicGames_PlayerDataStorage_GetFileMetadataCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_QueryFileList(userID)
Argument Description
The Product User ID of the local user who requested file
userID
metadata
Returns:
real
Triggers:
Example:
identifier = EpicGames_PlayerDataStorage_QueryFileList(userID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_ReadFile
Retrieve the contents of a specific file, potentially downloading the contents if we do not
have a local copy, from the cloud. This request will occur asynchronously, potentially over
multiple frames. All callbacks for this function will come from the same thread that the
SDK is ticked from. If specified, the FileTransferProgressCallback will always be called at
least once if the request is started successfully.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Argument Description
The Product User ID of the local user who is reading the
userID
requested file
filen The file name to read; this file must already exist
path local path where save the file
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorage_ReadFile"
Example:
identifier = EpicGames_PlayerDataStorage_ReadFile(userID,"MyFavPic.png","path/to/
save/MyFavPic.png")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorage_WriteFile
Write new data to a specific file, potentially overwriting any existing file by the same name,
to the cloud. This request will occur asynchronously, potentially over multiple frames. All
callbacks for this function will come from the same thread that the SDK is ticked from. If
specified, the FileTransferProgressCallback will always be called at least once if the request
is started successfully.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_PlayerDataStorage_WriteFile(userID,file,path)
Argument Description
The Product User ID of the local user who is writing the
userID
requested file to the cloud
The name of the file to write; if this file already exists, the
file contents will be replaced if the write request completes
successfully
path Local path of the file to upload
Returns:
real
Triggers:
Example:
identifier = EpicGames_PlayerDataStorage_WriteFile(userID,"myData.dat",/path/to/file/
myData.dat)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest
Attempt to cancel this file request in progress. This is a best-effort command and is not
guaranteed to be successful if the request has completed before this function is called.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
EXTERNAL A wrapper
around EOS_PlayerDataStorageFileTransferRequest_CancelRequest
Syntax:
EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest(filename)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest"
Example:
identifier =
EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest("myFile.txt")
The code sample above save the identifier that can be used inside an Async Social event.
if (async_load[? "type"] ==
"EpicGames_PlayerDataStorageFileTransferRequest_CancelRequest")
if (async_load[? "identifier"] = identifier)
{
if (async_load[? "status"] == EpicGames_Success)
{
show_debug_message(async_load[? "type"] + " succeeded!");
}
else
{
show_debug_message(async_load[? "type"] + " failed: " + async_load[?
"status_message"])
}
}
The code above matches the response against the correct event type and logs the success
of the task.
PlayerFileMetadata
The player file metadata is represented by a struct and contains metadata information for
a specific player file. This struct is returned by the following functions:
• EpicGames_PlayerDataStorage_CopyFileMetadataAtIndex
• EpicGames_PlayerDataStorage_CopyFileMetadataByFilename
The progression snapshot feature becomes relevant for users in cases where they have
two separate Epic accounts, and have played the same game on both of the accounts. In
such a case, if the user chooses to merge their Epic accounts into a single account, the Epic
overlay will be able to present a snapshot view of their game progress for both accounts.
This allows users to choose their preferred game progression to preserve as a result of
the account merge operation.
Functions
• EpicGames_ProgressionSnapshot_AddProgression
• EpicGames_ProgressionSnapshot_BeginSnapshot
• EpicGames_ProgressionSnapshot_DeleteSnapshot
• EpicGames_ProgressionSnapshot_EndSnapshot
• EpicGames_ProgressionSnapshot_SubmitSnapshot
EpicGames_ProgressionSnapshot_AddProgression
Stores a Key/Value pair in memory for a given snapshot. If multiple calls happen with the
same key, the last invocation wins, overwriting the previous value for that given key. The
order in which the Key/Value pairs are added is stored as is for later retrieval/display.
Ideally, you would make multiple calls
to EpicGames_ProgressionSnapshot_AddProgression followed by a single call to
EpicGames_ProgressionSnapshot_SubmitSnapshot.
Syntax:
Returns:
N/A
Example:
identifier = EpicGames_ProgressionSnapshot_BeginSnapshot(local_UserId)
EpicGames_ProgressionSnapshot_AddProgression(identifier, "PlayerName", "Hero");
• EpicGames_ProgressionSnapshot_AddProgression
• EpicGames_ProgressionSnapshot_DeleteSnapshot
• EpicGames_ProgressionSnapshot_EndSnapshot
• EpicGames_ProgressionSnapshot_SubmitSnapshot
Syntax:
EpicGames_ProgressionSnapshot_BeginSnapshot(local_UserId);
Returns:
real
Example:
identifier = EpicGames_ProgressionSnapshot_BeginSnapshot(local_UserId)
EpicGames_ProgressionSnapshot_AddProgression(identifier, "PlayerName", "Hero");
The code sample above shows how to create a snapshot and add a progression value to it
(EpicGames_ProgressionSnapshot_AddProgression).
EpicGames_ProgressionSnapshot_DeleteSnapshot
Wipes out all progression data for the given user from the service. However, any previous
progression data that haven't been submitted yet are retained.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_ProgressionSnapshot_DeleteSnapshot(userId);
Returns:
real
Triggers:
async_load Contents
Key Type Description
type real "EpicGames_ProgressionSnapshot_DeleteSnapshot"
Example:
identifier = EpicGames_ProgressionSnapshot_DeleteSnapshot(userId);
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_ProgressionSnapshot_EndSnapshot
Cleans up and releases resources associated with the given progression snapshot
identifier.
Syntax:
EpicGames_ProgressionSnapshot_EndSnapshot(snapshotId);
Returns:
struct
Example:
result = EpicGames_ProgressionSnapshot_EndSnapshot(snapshotId)
if (result.status == EpicGames_Success)
{
show_debug_message("EpicGames_ProgressionSnapshot_EndSnapshot: success");
}
The code above matches the response status and logs the success of the task.
EpicGames_ProgressionSnapshot_SubmitSnapshot
Saves the previously added Key/Value pairs of a given Snapshot to the service.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
NOTE This will overwrite any prior progression data stored with the service that's
associated with the user.
Syntax:
EpicGames_ProgressionSnapshot_SubmitSnapshot(snapshotId);
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string "EpicGames_ProgressionSnapshot_SubmitSnapshot"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes indicate
errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID
Example:
identifier = EpicGames_ProgressionSnapshot_SubmitSnapshot(snapshotId);
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
Sanctions
The Sanctions Interface manages punitive actions taken against your users. Actions may
include temporary or permanent bans from gameplay or communication bans that limit
the social aspects of your product for a particular user. You define the disciplinary actions
for your product to handle negative behavior based on your use cases.
Functions
• EpicGames_Sanctions_CopyPlayerSanctionByIndex
• EpicGames_Sanctions_GetPlayerSanctionCount
• EpicGames_Sanctions_QueryActivePlayerSanctions
EpicGames_Sanctions_CopyPlayerSanctionByIndex
Copies an active player sanction.
Syntax:
EpicGames_Sanctions_CopyPlayerSanctionByIndex(UserID_target, index)
Returns:
struct
The above code will show an example of how the function should be used. The player
sanction data is returned for the provided index.
EpicGames_Sanctions_GetPlayerSanctionCount
Fetch the number of player sanctions that have been retrieved for a given player.
Syntax:
EpicGames_Sanctions_GetPlayerSanctionCount(UserID_target)
Argument Description
Product User ID of the user whose sanction count
UserID_target
should be returned
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Sanctions_QueryActivePlayerSanctions, the function
EpicGames_Sanctions_GetPlayerSanctionCount will return the number of entries in the
query array which can then be accessed using
the EpicGames_Sanctions_CopyPlayerSanctionByIndex function.
EpicGames_Sanctions_QueryActivePlayerSanctions
Start an asynchronous query to retrieve any active sanctions for a specified user.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Sanctions_CopyPlayerSanctionByIndex
• EpicGames_Sanctions_GetPlayerSanctionCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Sanctions_QueryActivePlayerSanctions(UserID,UserID_target)
Argument Description
The Product User ID of the local user who initiated this
UserID
request. Dedicated servers should set this to null.
Product User ID of the user whose active sanctions are
UserID_target
to be retrieved.
Returns:
real
Triggers:
Example:
identifier = EpicGames_Sanctions_QueryActivePlayerSanctions()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
Stats
The Stats Interface provides the ability for developers to manage users' stats for an
application, which can include any statistical data that a developer wishes to track, such as
the number of items collected, the player's fastest completion time for a level, the total
number of victories or losses, or the number of times that a user has performed a certain
action. You can use stats to determine when to unlock Achievements and how to use rank
users in Leaderboards.
Functions
• EpicGames_Stats_CopyStatByIndex
• EpicGames_Stats_CopyStatByName
• EpicGames_Stats_GetStatsCount
• EpicGames_Stats_IngestStat
• EpicGames_Stats_QueryStats
Structures
• StatData
EpicGames_Stats_CopyStatByIndex
Fetches a stat from a given index.
Syntax:
EpicGames_Stats_CopyStatByIndex(userID_target, index)
Returns:
struct (StatData)
Example:
The above code will show an example of how the function should be used. The stats data
is returned for the provided stat index.
EpicGames_Stats_CopyStatByName
Fetches a stat from cached stats by name.
Syntax:
EpicGames_Stats_CopyStatByName(userID_target,name)
Returns:
struct (StatData)
Example:
The above code will show an example of how the function should be used. The stats data
is returned for the provided stat name.
EpicGames_Stats_GetStatsCount
Fetch the number of stats that are cached locally.
Syntax:
EpicGames_Stats_GetStatsCount(userID_target)
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_Stats_QueryStats, the
function EpicGames_Stats_GetStatsCount will return the number of entries in the query
array which can then be accessed using the EpicGames_Stats_CopyStatByIndex function.
EpicGames_Stats_IngestStat
Ingest a stat by the amount specified in Options. When the operation is complete and the
delegate is triggered the stat will be uploaded to the backend to be processed. The stat
may not be updated immediately and an achievement using the stat may take a while to
be unlocked once the stat has been uploaded.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Returns:
real
Triggers:
Example:
identifier = EpicGames_Stats_IngestStat(userID,userID,"Leaderboard_Stat",183)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_Stats_QueryStats
Query for a list of stats for a specific player.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_Stats_CopyStatByIndex
• EpicGames_Stats_CopyStatByName
• EpicGames_Stats_GetStatsCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Argument Description
The Product User ID of the local user requesting the
userID
stats. Set to undefined for dedicated server
The Product User ID for the user whose stats are being
userID_target
retrieved
startTime The POSIX timestamp for start time OPTIONAL
endTime The POSIX timestamp for end time OPTIONAL
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Stats_QueryStats"
Example:
identifier = EpicGames_Stats_QueryStats()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
StatData
The stat data is represented by a struct and contains information for a specific stat. This
struct is returned by the following functions:
• EpicGames_Stats_CopyStatByIndex
• EpicGames_Stats_CopyStatByName
Functions
• EpicGames_TitleStorage_CopyFileMetadataAtIndex
• EpicGames_TitleStorage_CopyFileMetadataByFilename
• EpicGames_TitleStorage_DeleteCache
• EpicGames_TitleStorage_GetFileMetadataCount
• EpicGames_TitleStorage_QueryFile
• EpicGames_TitleStorage_QueryFileList
• EpicGames_TitleStorage_ReadFile
• EpicGames_TitleStorageFileTransferRequest_CancelRequest
Structures
• TitleFileMetadata
EpicGames_TitleStorage_CopyFileMetadataAtIndex
Get the cached copy of a file's metadata by index. The metadata will be for the last
retrieved version.
Syntax:
EpicGames_TitleStorage_CopyFileMetadataAtIndex(userID,index)
Argument Description
Product User ID of the local user who is requesting file
userID
metadata (optional)
index The index to get data for
Returns:
struct (TitleFileMetadata)
Example:
The above code will show an example of how the function should be used. The title file
metadata is returned for the provided file index.
EpicGames_TitleStorage_CopyFileMetadataByFilename
Create a cached copy of a file's metadata by filename. The metadata will be for the last
retrieved or successfully saved version, and will not include any changes that have not
completed writing.
Syntax:
EpicGames_TitleStorage_CopyFileMetadataByFilename(userID,name)
Argument Description
Product User ID of the local user who is requesting file
userID
metadata (optional)
name The file's name to get data for
Returns:
struct (TitleFileMetadata)
Example:
The above code will show an example of how the function should be used. The title file
metadata is returned for the provided file name.
EpicGames_TitleStorage_DeleteCache
Clear previously cached file data. This operation will be done asynchronously. All cached
files except those corresponding to the transfers in progress will be removed. Warning:
Use this with care. Cache system generally tries to clear old and unused cached files from
time to time. Unnecessarily clearing cache can degrade performance as SDK will have to
re-download data.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_TitleStorage_DeleteCache(userID)
Argument Description
Product User ID of the local user who is deleting his cache
userID
(optional)
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_TitleStorage_DeleteCache"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes
indicate errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
identifier = EpicGames_TitleStorage_DeleteCache(userID)
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_TitleStorage_GetFileMetadataCount
Get the count of files we have previously queried information for and files we have
previously read from / written to.
Syntax:
EpicGames_TitleStorage_GetFileMetadataCount(userID)
Argument Description
Object containing properties related to which user is
userID
requesting the metadata count
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call toEpicGames_TitleStorage_QueryFileList, the
function EpicGames_TitleStorage_GetFileMetadataCount will return the number of entries
in the query array which can then be accessed using the
EpicGames_TitleStorage_CopyFileMetadataAtIndex function.
EpicGames_TitleStorage_QueryFile
Query a specific file's metadata, such as file names, size, and a MD5 hash of the data. This
is not required before a file may be opened. Once a file has been queried, its metadata
will be available by the EpicGames_TitleStorage_CopyFileMetadataAtIndex and
EpicGames_TitleStorage_CopyFileMetadataByFilename functions.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_TitleStorage_QueryFile(userID,file)
Argument Description
Product User ID of the local user requesting file metadata
userID
(optional)
file The requested file's name
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_TitleStorage_QueryFile"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes
indicate errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
identifier = EpicGames_TitleStorage_QueryFile(userID,"myFile.dat")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_TitleStorage_QueryFileList
Query the file metadata, such as file names, size, and a MD5 hash of the data, for all files
available for current user based on their settings (such as game role) and tags provided.
This is not required before a file can be downloaded by name.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_TitleStorage_CopyFileMetadataAtIndex
• EpicGames_TitleStorage_CopyFileMetadataByFilename
• EpicGames_TitleStorage_GetFileMetadataCount
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_TitleStorage_QueryFileList(userID, tag)
Argument Description
Product User ID of the local user who requested file
userID
metadata
tag List of tags to use for lookup.
Returns:
real
Triggers:
Asynchronous Social Event
async_load Contents
Key Type Description
The
type string
string "EpicGames_TitleStorage_QueryFileList"
Example:
identifier = EpicGames_TitleStorage_QueryFileList(userID,"Tag1")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_TitleStorage_ReadFile
Retrieve the contents of a specific file, potentially downloading the contents if we do not
have a local copy, from the cloud. This request will occur asynchronously, potentially over
multiple frames.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_TitleStorage_ReadFile(userID,file,path)
Argument Description
Product User ID of the local user who is reading the
userID
requested file
file The file name to read; this file must already exist
path Local path where save the file
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_TitleStorage_ReadFile"
The status code for the operation.
EpicGames_Success indicates that the
status EResult
operation succeeded; other codes
indicate errors
status_message string Text representation of the status code
identifier real The asynchronous listener ID.
Example:
identifier = EpicGames_TitleStorage_ReadFile(userID,"Preferences.json","/path/to/
save/Preferences.json")
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_TitleStorageFileTransferRequest_CancelRequest
Attempt to cancel this file request in progress. This is a best-effort command and is not
guaranteed to be successful if the request has completed before this function is called.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_TitleStorageFileTransferRequest_CancelRequest(filename)
Argument Description
filename Filename contained in the process to cancel
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_TitleStorageFileTransferRequest_CancelRequest"
Example:
identifier = EpicGames_TitleStorageFileTransferRequest_CancelRequest("myFile.txt")
The code sample above save the identifier that can be used inside an Async Social event.
if (async_load[? "type"] ==
"EpicGames_TitleStorageFileTransferRequest_CancelRequest")
if(async_load[? "identifier"] = identifier)
{
if (async_load[? "status"] == EpicGames_Success)
{
show_debug_message(async_load[? "type"] + " succeeded!");
}
else
{
show_debug_message(async_load[? "type"] + " failed: " + async_load[?
"status_message"])
}
}
The code above matches the response against the correct event type and logs the success
of the task.
TitleFileMetadata
The player file metadata is represented by a struct and contains metadata information for
a specific title file. This struct is returned by the following functions:
• EpicGames_TitleStorage_CopyFileMetadataAtIndex
• EpicGames_TitleStorage_CopyFileMetadataByFilename
Functions
• EpicGames_UI_AddNotifyDisplaySettingsUpdated
• EpicGames_UI_GetFriendsVisible
• EpicGames_UI_GetNotificationLocationPreference
• EpicGames_UI_HideFriends
• EpicGames_UI_RemoveNotifyDisplaySettingsUpdated
• EpicGames_UI_SetDisplayPreference
• EpicGames_UI_ShowFriends
Constants
• UINotificationLocation
EpicGames_UI_AddNotifyDisplaySettingsUpdated
Register to receive notifications when the overlay display settings are updated. Newly
registered handlers will always be called the next tick with the current state.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_UI_AddNotifyDisplaySettingsUpdated()
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_UI_AddNotifyDisplaySettingsUpdated"
identifier = EpicGames_UI_AddNotifyDisplaySettingsUpdated()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_UI_GetFriendsVisible
Gets the friends overlay visibility.
Syntax:
EpicGames_UI_GetFriendsVisible(accountID)
Argument Description
The Epic Account ID of the user whose overlay is being
accountID
updated.
Returns:
bool
Example:
if (EpicGames_UI_GetFriendsVisible(accountID))
{
PauseGame(); // add logic to pause the game here
}
The above code will show an example of how the function should be used. If the Friends
UI is being displayed the developer must make sure the game is set to pause.
EpicGames_UI_GetNotificationLocationPreference
Returns the current notification location display preference.
Syntax:
EpicGames_UI_GetNotificationLocationPreference()
Returns:
string
Example:
show_debug_message("LocationPreference: "
+ EpicGames_UI_GetNotificationLocationPreference())
The above code will show an example of how the function should be used.
EpicGames_UI_HideFriends
Hides the active Social Overlay.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_UI_HideFriends(accountID)
Argument Description
The Epic Account ID of the user whose friend list is being
accountID
shown.
Returns:
real
Triggers:
identifier = EpicGames_UI_HideFriends()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_UI_RemoveNotifyDisplaySettingsUpdated
Unregister from receiving notifications when the overlay display settings are updated.
Syntax:
EpicGames_UI_RemoveNotifyDisplaySettingsUpdated(id)
Returns:
N/A
Example:
handle = EpicGames_UI_AddNotifyDisplaySettingsUpdated()
//...
//...Later
//...
EpicGames_UI_RemoveNotifyDisplaySettingsUpdated(handle)
The code sample above enables the display settings update notifications
(EpicGames_UI_AddNotifyDisplaySettingsUpdated) and later disables them by refering to
the previous generated handle.
EpicGames_UI_SetDisplayPreference
Define any preferences for any display settings.
Syntax:
EpicGames_UI_SetDisplayPreference(location)
Returns:
struct
Example:
EpicGames_UI_SetDisplayPreference(EpicGames_UNL_TopLeft)
The above code will show an example of how the function should be used. The position of
the notifications will now be the rop left corner of the game screen.
EpicGames_UI_ShowFriends
Opens the Social Overlay with a request to show the friends list.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_UI_ShowFriends(accountID)
Argument Description
arg The argument to be passed in
Returns:
real
Triggers:
identifier = EpicGames_UI_ShowFriends()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
UINotificationLocation
The UI Notification Location is used in the following function:
• EpicGames_UI_SetDisplayPreference
Functions
• EpicGames_UserInfo_CopyExternalUserInfoByAccountId
• EpicGames_UserInfo_CopyExternalUserInfoByAccountType
• EpicGames_UserInfo_CopyExternalUserInfoByIndex
• EpicGames_UserInfo_CopyUserInfo
• EpicGames_UserInfo_GetExternalUserInfoCount
• EpicGames_UserInfo_QueryUserInfo
• EpicGames_UserInfo_QueryUserInfoByDisplayName
• EpicGames_UserInfo_QueryUserInfoByExternalAccount
Structures
• ExternalUserInfo
• UserInfo
Constants
• ExternalAccountType
EpicGames_UserInfo_CopyExternalUserInfoByAccountId
Syntax:
Returns:
struct (ExternalUserInfo)
Example:
var struct =
EpicGames_UserInfo_CopyExternalUserInfoByAccountId(accountID,accountID_target,accountID_externa
if(struct.status == ESO_Success)
{
DisplayName = struct.DisplayName
}
The above code will show an example of how the function should be used. The external
user info data is returned given the provided accountID.
EpicGames_UserInfo_CopyExternalUserInfoByAccountType
Syntax:
EpicGames_UserInfo_CopyExternalUserInfoByAccountType(accountID,accountID_target,accountType)
Returns:
struct (ExternalUserInfo)
Example:
var struct =
EpicGames_UserInfo_CopyExternalUserInfoByAccountType(accountID,accountID_target,accountType)
if(struct.status == ESO_Success)
{
DisplayName = struct.DisplayName
}
The above code will show an example of how the function should be used. The external
user info data is returned given the provided account type.
EpicGames_UserInfo_CopyExternalUserInfoByIndex
Fetches an external user info from a given index.
Syntax:
Returns:
struct (ExternalUserInfo)
Example:
Syntax:
EpicGames_UserInfo_CopyUserInfo(accountID, accountID_target)
Returns:
struct (UserInfo)
Example:
The above code will show an example of how the function should be used. The user info
data is returned given the provided accountID.
EpicGames_UserInfo_GetExternalUserInfoCount
Fetch the number of external user information that are cached locally.
Syntax:
EpicGames_UserInfo_GetExternalUserInfoCount(accountID, accountID_target)
Returns:
real
Example:
The above code will show an example of how the function should be used. After a
successcull call to EpicGames_UserInfo_QueryUserInfoByExternalAccount, the function
EpicGames_UserInfo_GetExternalUserInfoCount will return the number of entries in the
query array which can then be accessed using the
EpicGames_UserInfo_CopyExternalUserInfoByIndex function.
EpicGames_UserInfo_QueryUserInfo
This function is used to start an asynchronous query to retrieve information, such as
display name, about another account.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
the function:
• EpicGames_UserInfo_CopyUserInfo
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_UserInfo_QueryUserInfo(accountID,accountID_target)
Returns:
real
Triggers:
Example:
identifier = EpicGames_UserInfo_QueryUserInfo
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_UserInfo_QueryUserInfoByDisplayName
This function is used to start an asynchronous query to retrieve user information by
display name. This can be useful for getting the AccountId for a display name.
Once the callback has been fired with a successful EpicGames Result, it is possible to call
the function:
• EpicGames_UserInfo_CopyUserInfo
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_UserInfo_QueryUserInfoByDisplayName(accountID, DisplayName)
Returns:
real
Triggers:
Example:
identifier = EpicGames_UserInfo_QueryUserInfoByDisplayName()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
EpicGames_UserInfo_QueryUserInfoByExternalAccount
Once the callback has been fired with a successful EpicGames Result, it is possible to call
one of the following functions:
• EpicGames_UserInfo_CopyExternalUserInfoByAccountId
• EpicGames_UserInfo_CopyExternalUserInfoByAccountType
• EpicGames_UserInfo_CopyExternalUserInfoByIndex
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
Returns:
real
Triggers:
async_load Contents
Key Type Description
The
type string
string "EpicGames_UserInfo_QueryUserInfoByExternalAccount"
Example:
identifier = EpicGames_UserInfo_QueryUserInfoByExternalAccount()
The code sample above save the identifier that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.
ExternalUserInfo
The external user info is represented by a struct and contains information about a single
external user info. This struct is returned by the following functions:
• EpicGames_UserInfo_CopyExternalUserInfoByAccountId
• EpicGames_UserInfo_CopyExternalUserInfoByAccountType
• EpicGames_UserInfo_CopyExternalUserInfoByIndex
• EpicGames_UserInfo_CopyExternalUserInfoByAccountType
Functions
Provided functions:
• EpicGames_GetVersion
• EpicGames_Logging_SetLogLevel
• EpicGames_Shutdown
Constants
Syntax:
EpicGames_GetVersion()
Returns:
string
Example:
The above code will show an example of how the function should be used. The
function EpicGames_GetVersion will return the current version of the SDK.
EpicGames_Logging_SetLogLevel
Set the logging level for the specified logging category.
NOTE By default all log categories will callback for Warnings, Errors, and Fatals.
Syntax:
EpicGames_Logging_SetLogLevel(category, logLevel)
Returns:
N/A
Example:
EpicGames_Logging_SetLogLevel(EpicGames_LC_ALL_CATEGORIES, EpicGames_LOG_Off)
The above code will show an example of how the function should be used. This will turn
off logging for all categories.
EpicGames_Shutdown
Tear down the Epic Online Services SDK. Once this function has been called, no more SDK
calls are permitted.
1.
EpicGames_Success is the returned status if the SDK is successfully torn down.
2.
EpicGames_NotConfigured is returned status if the extension didn't initialize correctly.
3.
EpicGames_UnexpectedError is returned status if EpicGames_Shutdown has already
been called.
Syntax:
EpicGames_Shutdown()
Returns:
struct
Example:
var struct = EpicGames_Shutdown()
if(struct.status == EpicGames_Success)
{
show_debug_message("Shutdown Success")
}
else
{
show_debug_message("Shutdown Failed")
}
The above code will show an example of how the function should be used. This should be
called at the end of your game.
EpicGames Logging Category
These constants represent the available logging categories, and are to be used with the
function:
• EpicGames_Logging_SetLogLevel
• EpicGames_Logging_SetLogLevel
• EpicGames_Connect_CopyProductUserInfo
The status member present in the struct can be represented by one of the following
values:
EpicGames_Auth_VerifyIdToken
Verify a given ID token for authenticity and validity.
This is an asynchronous function that will trigger the Social Async Event when the task
is finished.
Syntax:
EpicGames_Auth_VerifyIdToken(accountID, JsonWebToken)
Returns:
real
Triggers:
async_load Contents
Key Type Description
type string The string "EpicGames_Auth_VerifyIdToken"
Example:
The code sample above keeps an handle that can be used inside an Async Social event.
The code above matches the response against the correct event type and logs the success
of the task.