Skip to content

rc_client_get_user_game_summary

Jamiras edited this page Mar 28, 2024 · 5 revisions

Gets a breakdown of the number of achievements in a game, and how many the user has unlocked in the current hardcore mode.

Syntax

void rc_client_get_user_game_summary(
    const rc_client_t* client,
    rc_client_user_game_summary_t* summary
);

Parameters

client

The rc_client_t containing a loaded game.

summary

A pointer to a rc_client_user_game_summary_t to populate.


rc_client_user_game_summary_t

typedef struct rc_client_user_game_summary_t
{
  uint32_t num_core_achievements;
  uint32_t num_unofficial_achievements;
  uint32_t num_unlocked_achievements;
  uint32_t num_unsupported_achievements;

  uint32_t points_core;
  uint32_t points_unlocked;
} rc_client_user_game_summary_t;

num_core_achievements

The number of core achievements in the game's set.

num_unofficial_achievements

The number of unofficial achievements in the game's set.

This value may be non-zero even if rc_client_set_unofficial_enabled was not called. In that case, the unofficial achievements still exist, but won't be active.

num_unlocked_achievements

The number of core achievements the user has unlocked in the current hardcore mode.

This value may be non-zero even if rc_client_set_encore_mode_enabled was called. In that case, the unlocked achievements will still be active.

num_unsupported_achievements

The number of achievements that were disabled due to syntax not supported by this version of the client or because of failed attempts to read memory.

num_unsupported_achievements

The number of achievements that were disabled due to syntax not supported by this version of the client or because of failed attempts to read memory.

points_core

The number of points associated to core achievements in the game's set.

points_unlocked

The number of points associated to core achievements the user has unlocked in the current hardcore mode.

Remarks

This function is primarily used to generate the summary message when announcing a game has been loaded.

The simplest implementation would be:

sprintf(msg, "You have %u of %u achievements unlocked.",
        summary.num_unlocked_achievements, summary.num_core_achievements);

Minimum version: 11.0.0

See also

rc_client_get_game_info

rcheevos

rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime

rhash

rapi

common

user

runtime

info

Clone this wiki locally