|
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Cheat operations More...
Functions | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::CheatReset () |
| Reset the cheat system. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::GetMemory (GAME_MEMORY type, uint8_t *&data, size_t &size) |
| Get a region of memory. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::SetCheat (unsigned int index, bool enabled, const std::string &code) |
| Set a cheat code. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::SetRetroAchievementsCredentials (const std::string &username, const std::string &token) |
| Set the credentials of the RetroAchievements user. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::RCSetHardcoreEnabled (bool enabled) |
| Set whether achievements are earned in hardcore mode. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::RCSetEncoreModeEnabled (bool enabled) |
| Set whether already-earned achievements can be earned again. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::ActivateAchievement (unsigned int cheevoId, const std::string &memAddrExpression) |
| Activate an achievement. | |
| virtual GAME_ERROR | kodi::addon::CInstanceGame::GetCheevoUrlId (const std::function< void(const std::string &achievementUrl, unsigned int cheevoId)> &callback) |
| Get triggered achievement URL and ID pairs. | |
| void | kodi::addon::CInstanceGame::RCOnGameLoaded (const game_rc_game_loaded &data) |
| Callback to Kodi Function Notify Kodi that a game has been identified by the achievement runtime | |
| void | kodi::addon::CInstanceGame::RCOnAchievementTriggered (const game_rc_achievement_triggered &data) |
| Callback to Kodi Function Notify Kodi that the player has earned an achievement | |
| void | kodi::addon::CInstanceGame::RCOnGameCompleted (const std::string &title, bool hardcore) |
| Callback to Kodi Function Notify Kodi that every achievement of the game has been earned | |
| void | kodi::addon::CInstanceGame::RCOnRichPresenceUpdated (const std::string &evaluation) |
| Callback to Kodi Function Publish the current rich presence evaluation to Kodi | |
| void | kodi::addon::CInstanceGame::RCOnLoginResult (const game_rc_login_result &data) |
| Callback to Kodi Function Notify Kodi of the outcome of a login attempt | |
| void | kodi::addon::CInstanceGame::RCOnAchievementProgress (const std::vector< game_rc_achievement_progress > &progress) |
| Callback to Kodi Function Publish progress towards the game's measured achievements | |
| void | kodi::addon::CInstanceGame::RCOnServerError (const std::string &message, const std::string &api) |
| Callback to Kodi Function Report an error returned by the RetroAchievements server | |
| void | kodi::addon::CInstanceGame::RCOnConnectionChanged (bool connected) |
| Callback to Kodi Function Report a change in connectivity to the RetroAchievements server | |
| void | kodi::addon::CInstanceGame::RCOnChallengeIndicator (const game_rc_achievement_challenge &data, bool show) |
| Callback to Kodi Function Show or hide the indicator for an achievement the player is attempting | |
| void | kodi::addon::CInstanceGame::RCOnAchievementProgressUpdate (const game_rc_achievement_progress_indicator &data) |
| Callback to Kodi Function Give Kodi a new value for a measured achievement already on screen | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardStarted (const game_rc_leaderboard &data) |
| Callback to Kodi Function Notify Kodi that an attempt at a leaderboard has begun | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardFailed (const game_rc_leaderboard &data) |
| Callback to Kodi Function Notify Kodi that an attempt at a leaderboard has been abandoned | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardSubmitted (const game_rc_leaderboard &data) |
| Callback to Kodi Function Notify Kodi that a leaderboard value has been sent to the server | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardTrackerUpdate (const game_rc_leaderboard_tracker &data) |
| Callback to Kodi Function Give Kodi a new value for an attempt already on screen | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardScoreboard (const game_rc_leaderboard_scoreboard &data) |
| Callback to Kodi Function Tell Kodi where a submitted attempt placed | |
| void | kodi::addon::CInstanceGame::RCOnReset () |
| Callback to Kodi Function Ask the frontend to reset the game | |
| void | kodi::addon::CInstanceGame::RCOnSubsetCompleted (const std::string &title) |
| Callback to Kodi Function Notify Kodi that every achievement of a subset has been earned | |
| void | kodi::addon::CInstanceGame::RCOnAchievementProgressIndicator (const game_rc_achievement_progress_indicator &data, bool show) |
| Callback to Kodi Function Show, update or hide how far along a measured achievement is | |
| void | kodi::addon::CInstanceGame::RCOnLeaderboardTracker (const game_rc_leaderboard_tracker &data, bool show) |
| Callback to Kodi Function Show, update or hide the live value of an attempt in progress | |
Cheat operations
Cheat operation parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
|
inlinevirtual |
Activate an achievement.
| [in] | cheevoId | The achievement ID |
| [in] | memAddrExpression | Achievement memory expression from patch data as a string |
|
inlinevirtual |
Reset the cheat system.
|
inlinevirtual |
Get triggered achievement URL and ID pairs.
| [in] | callback | Callback invoked once per triggered achievement during this call. It may be called zero or more times before the function returns. Implementations must not retain/copy the callback for later use. The URL string reference is valid only for the callback invocation and must be copied if needed afterwards. |
|
inlinevirtual |
Get a region of memory.
| [in] | type | The type of memory to retrieve |
| [in] | data | Set to the region of memory; must remain valid until UnloadGame() is called |
| [in] | size | Set to the size of the region of memory |
|
inline |
Callback to Kodi Function
Publish progress towards the game's measured achievements
Sent whenever the reported progress changes. Achievements without a measured trigger condition are omitted.
| [in] | progress | Progress of each measured achievement |
|
inline |
Callback to Kodi Function
Show, update or hide how far along a measured achievement is
Some achievements are measured rather than simply locked or unlocked, and the runtime reports progress while the player works towards one. Show and update are separate events but the same thing on screen, so both set the value; hide removes it.
| [in] | data | The achievement and how far along it is |
| [in] | show | True to show or update it, false to hide it |
|
inline |
Callback to Kodi Function
Give Kodi a new value for a measured achievement already on screen
| [in] | data | The achievement and how far along it is |
|
inline |
Callback to Kodi Function
Notify Kodi that the player has earned an achievement
| [in] | data | The achievement that was earned |
|
inline |
Callback to Kodi Function
Show or hide the indicator for an achievement the player is attempting
| [in] | data | The achievement being attempted |
| [in] | show | True to show the indicator, false to hide it |
Callback to Kodi Function
Report a change in connectivity to the RetroAchievements server
Unlocks earned while disconnected are held by the add-on and submitted once the connection returns.
| [in] | connected | True if the server is reachable again |
|
inline |
Callback to Kodi Function
Notify Kodi that every achievement of the game has been earned
| [in] | title | The title of the completed game |
| [in] | hardcore | True if the game was completed in hardcore mode |
|
inline |
Callback to Kodi Function
Notify Kodi that a game has been identified by the achievement runtime
| [in] | data | The achievement set of the game |
data need only stay valid for the duration of the call.
|
inline |
Callback to Kodi Function
Notify Kodi that an attempt at a leaderboard has been abandoned
| [in] | data | The leaderboard that was being attempted |
|
inline |
Callback to Kodi Function
Tell Kodi where a submitted attempt placed
| [in] | data | The new standing |
|
inline |
Callback to Kodi Function
Notify Kodi that an attempt at a leaderboard has begun
| [in] | data | The leaderboard being attempted |
|
inline |
Callback to Kodi Function
Notify Kodi that a leaderboard value has been sent to the server
Where it placed arrives later, through KodiRCOnLeaderboardScoreboard, and may not arrive at all.
| [in] | data | The leaderboard and the value submitted |
|
inline |
Callback to Kodi Function
Show, update or hide the live value of an attempt in progress
Show and update are separate events in the runtime but the same thing on screen, so both set the value; hide removes it.
| [in] | data | The tracker and its current value |
| [in] | show | True to show or update it, false to hide it |
|
inline |
Callback to Kodi Function
Give Kodi a new value for an attempt already on screen
| [in] | data | The tracker and its current value |
|
inline |
Callback to Kodi Function
Notify Kodi of the outcome of a login attempt
| [in] | data | The login result |
|
inline |
Callback to Kodi Function
Ask the frontend to reset the game
Raised when hardcore mode is enabled, because a session started in casual mode may not continue into hardcore.
|
inline |
Callback to Kodi Function
Publish the current rich presence evaluation to Kodi
| [in] | evaluation | What the player is currently doing in the game |
|
inline |
Callback to Kodi Function
Report an error returned by the RetroAchievements server
| [in] | message | The error as reported by the server |
| [in] | api | The API call that failed, or an empty string |
|
inline |
Callback to Kodi Function
Notify Kodi that every achievement of a subset has been earned
| [in] | title | The title of the completed subset |
|
inlinevirtual |
Set whether already-earned achievements can be earned again.
| [in] | enabled | True to re-earn achievements already unlocked |
|
inlinevirtual |
Set whether achievements are earned in hardcore mode.
The frontend enforces the restrictions hardcore requires. The client is told so its runtime agrees, and so that anything the client itself can do that hardcore forbids - cheats, for one - can be refused here too.
| [in] | enabled | True to earn in hardcore mode |
|
inlinevirtual |
Set a cheat code.
| [in] | index | |
| [in] | enabled | |
| [in] | code |
|
inlinevirtual |
Set the credentials of the RetroAchievements user.
| [in] | username | The RetroAchievements username of the user |
| [in] | token | The login token to RetroAchievements of the user |