This extension adds Epic Games achievements support to Ren’Py. Ensure that you have accepted the usage conditions for the Epic Games SDK on the Epic Games Dev Portal before using this extension.
In the future, the extension will be updated to cover more EOS features such as authentication. The end goal is to provide a thin ctypes wrapper around all EOS functions as well as helpers for the most commonly used features.
Installation
Unpack the archive of the extension in your game’s directory
Update EOS_runner.ini to point towards the game’s generated exe file. This is most easily done and maintained by setting define build.executable_name = "MyGameName" in game/options.rpy.
Create a new game/epic.rpy file with the following information:
Code: Select all
# Get all attribute values under "Product Settings" -> "SDK Download & Credentials" at dev.epicgames.com
# You may need to create an EOS client for your game in "Product Settings" -> "Clients"
define config.epic_product = '0123456789abcdef0123456789abcdef'
define config.epic_sandbox = 'abcdef0123456789abcdef0123456789'
define config.epic_deployment = '456789abcdef0123456789abcdef0123'
define config.epic_client = 'AbCdEfGhIjKlMnOpQrStUv0123456789'
define config.epic_clientsecret = 'OT60Kvx3QM0ivZTncg8+yypmnNC1bcawfmQQ5C+8AGX'
# The client's policy must have the following Achievements features:
# findAchievementsForLocalUser, unlockAchievementForLocalUser,
# findAchievementDefinitions, readAchievementDefinition
define config.enable_epic_achievements = True
# The requested permissions. See EOS_EAuthScopeFlags for potential value
define config.epic_scopes = 0x0
init -1499 python:
achievement.backends.insert(0, epicapi.EpicBackend())
init python in epicapi:
# Start the Epic EOS handler here
init()
Code: Select all
init python:
## Epic support, none of those files may be in an archive
# Epic extension
build.classify('game/epic_eos.rpe', 'all')
# Renamed EOSBootstrapperTool.exe from the SDK
build.classify('EOS_runner.exe', 'windows')
build.classify('EOS_runner.ini', 'windows')
# Epic libs
build.classify('libs/EOSSDK-Win*-Shipping.dll', 'windows')
build.classify('libs/*/xaudio2_9redist.dll', 'windows')
build.classify('libs/libEOSSDK-Linux-Shipping.so', 'linux')
build.classify('libs/libEOSSDK-Mac-Shipping.dylib', 'mac')