Repository navigation
Achievements
Jakub Hubacek edited this page Oct 1, 2025
·
4 revisions
Location:
godot_epic_extension/src/Achievements
The Achievements subsystem handles achievement definitions, player achievements, achievement unlocking, and stats ingestion/querying. This subsystem provides comprehensive support for Epic Online Services achievement and statistics functionality.
| Function | Description |
|---|---|
QueryAchievementDefinitions() |
Queries EOS achievement definitions; requires logged-in user |
QueryPlayerAchievements() |
Queries player achievements; requires logged-in user |
UnlockAchievement(achievement_id) |
Convenience wrapper that calls UnlockAchievements([id])
|
UnlockAchievements(achievement_ids) |
Supports unlocking multiple achievements; persists IDs in context to avoid dangling pointers |
GetAchievementDefinitions() |
Returns cached definitions array |
GetPlayerAchievements() |
Returns cached player achievements array |
GetAchievementDefinition(achievement_id) |
Copies the definition from EOS and returns a dictionary |
GetPlayerAchievement(achievement_id) |
Implementation present in header but heavy lookup relies on cached state; verify behavior when not cached |
| Function | Description |
|---|---|
IngestStat(stat_name, amount) |
Submits stat ingest using a context that keeps string storage alive |
QueryStats() |
Queries stats for the current player |
GetStats() |
Returns cached stats |
GetStat(stat_name) |
Returns stat dictionary if available |
- Authentication Required: All operations require a valid, logged-in user; guards are in place to return early and warn if not authenticated
Mapping of EOS_Achievements_ SDK functions* to implementation status:
| EOS Function | Status | Notes |
|---|---|---|
EOS_Achievements_QueryDefinitions |
β Yes | Called in QueryAchievementDefinitions()
|
EOS_Achievements_GetAchievementDefinitionCount |
π Indirect | Extension uses copy-by-index APIs after QueryDefinitions; count API not directly wrapped |
EOS_Achievements_CopyAchievementDefinitionV2ByIndex |
β No | Not directly used; extension copies by AchievementId instead |
EOS_Achievements_CopyAchievementDefinitionV2ByAchievementId |
β Yes | Used in GetAchievementDefinition()
|
EOS_Achievements_QueryPlayerAchievements |
β Yes | Called in QueryPlayerAchievements()
|
EOS_Achievements_GetPlayerAchievementCount |
π Indirect | Extension iterates using copy-by-id rather than relying on count in public API |
EOS_Achievements_CopyPlayerAchievementByIndex |
β No | Not used; extension copies by AchievementId |
EOS_Achievements_CopyPlayerAchievementByAchievementId |
β Yes | Used in GetPlayerAchievement()
|
EOS_Achievements_UnlockAchievements |
β Yes | Called in UnlockAchievements(). Uses context to keep strings alive |
EOS_Achievements_AddNotifyAchievementsUnlockedV2 |
β Yes | Registered in setup_notifications() to receive unlock events |
EOS_Achievements_RemoveNotifyAchievementsUnlocked |
β Yes | Called in cleanup_notifications()
|
Mapping of EOS_Stats_ SDK functions* to implementation status:
| EOS Function | Status | Notes |
|---|---|---|
EOS_Stats_IngestStat |
β Yes | Called in IngestStat(). Uses context to keep strings alive |
EOS_Stats_QueryStats |
β Yes | Called in QueryStats()
|
EOS_Stats_GetStatCount |
β Yes | Used to iterate through stats in GetStats()
|
EOS_Stats_CopyStatByIndex |
β Yes | Used in GetStats() to copy individual stat entries |
EOS_Stats_CopyStatByName |
β Yes | Used in GetStat() to retrieve specific stat by name |