Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

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.

Function Documentation

◆ CheatReset()

virtual GAME_ERROR CheatReset ( )
inlinevirtual

Reset the cheat system.

Returns
The error, or GAME_ERROR_NO_ERROR if the cheat system was reset

◆ GetMemory()

virtual GAME_ERROR GetMemory ( GAME_MEMORY type,
uint8_t *& data,
size_t & size )
inlinevirtual

Get a region of memory.

Parameters
[in]typeThe type of memory to retrieve
[in]dataSet to the region of memory; must remain valid until UnloadGame() is called
[in]sizeSet to the size of the region of memory
Returns
The error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer

◆ SetCheat()

virtual GAME_ERROR SetCheat ( unsigned int index,
bool enabled,
const std::string & code )
inlinevirtual

Set a cheat code.

Parameters
[in]index
[in]enabled
[in]code
Returns
The error, or GAME_ERROR_NO_ERROR if the cheat was set

◆ SetRetroAchievementsCredentials()

virtual GAME_ERROR SetRetroAchievementsCredentials ( const std::string & username,
const std::string & token )
inlinevirtual

Set the credentials of the RetroAchievements user.

Parameters
[in]usernameThe RetroAchievements username of the user
[in]tokenThe login token to RetroAchievements of the user
Returns
The error, or GAME_ERROR_NO_ERROR if the call was successful

◆ ActivateAchievement()

virtual GAME_ERROR ActivateAchievement ( unsigned int cheevoId,
const std::string & memAddrExpression )
inlinevirtual

Activate an achievement.

Parameters
[in]cheevoIdThe achievement ID
[in]memAddrExpressionAchievement memory expression from patch data as a string
Returns
The error, or GAME_ERROR_NO_ERROR if the call was successful

◆ GetCheevoUrlId()

virtual GAME_ERROR GetCheevoUrlId ( const std::function< void(const std::string &achievementUrl, unsigned int cheevoId)> & callback)
inlinevirtual

Get triggered achievement URL and ID pairs.

Parameters
[in]callbackCallback 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.
Returns
The error, or GAME_ERROR_NO_ERROR if the call was successful

◆ RCOnGameLoaded()

void RCOnGameLoaded ( const game_rc_game_loaded & data)
inline

Callback to Kodi Function
Notify Kodi that a game has been identified by the achievement runtime

Parameters
[in]dataThe achievement set of the game
Remarks
Only called from the add-on itself. The pointers inside data need only stay valid for the duration of the call.
Note
Added in Game API 8.0.0

◆ RCOnAchievementTriggered()

void RCOnAchievementTriggered ( const game_rc_achievement_triggered & data)
inline

Callback to Kodi Function
Notify Kodi that the player has earned an achievement

Parameters
[in]dataThe achievement that was earned
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnGameCompleted()

void RCOnGameCompleted ( const std::string & title,
bool hardcore )
inline

Callback to Kodi Function
Notify Kodi that every achievement of the game has been earned

Parameters
[in]titleThe title of the completed game
[in]hardcoreTrue if the game was completed in hardcore mode
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnRichPresenceUpdated()

void RCOnRichPresenceUpdated ( const std::string & evaluation)
inline

Callback to Kodi Function
Publish the current rich presence evaluation to Kodi

Parameters
[in]evaluationWhat the player is currently doing in the game
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnLoginResult()

void RCOnLoginResult ( const game_rc_login_result & data)
inline

Callback to Kodi Function
Notify Kodi of the outcome of a login attempt

Parameters
[in]dataThe login result
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnAchievementProgress()

void RCOnAchievementProgress ( const std::vector< game_rc_achievement_progress > & progress)
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.

Parameters
[in]progressProgress of each measured achievement
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnServerError()

void RCOnServerError ( const std::string & message,
const std::string & api )
inline

Callback to Kodi Function
Report an error returned by the RetroAchievements server

Parameters
[in]messageThe error as reported by the server
[in]apiThe API call that failed, or an empty string
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0

◆ RCOnConnectionChanged()

void RCOnConnectionChanged ( bool connected)
inline

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.

Parameters
[in]connectedTrue if the server is reachable again
Remarks
Only called from the add-on itself
Note
Added in Game API 8.0.0