Skip to content

rc_client_get_achievement_info

Jamiras edited this page Jun 17, 2025 · 5 revisions

Get information about an achievement.

Syntax

const rc_client_achievement_t* rc_client_get_achievement_info(
    rc_client_t* client,
    uint32_t id
);

Parameters

client

The rc_client_t containing a loaded game.

id

The unique identifier of the achievement to retrieve information about.

Return value

A pointer to the achievement information, or NULL if not found.


rc_client_achievement_t

typedef struct rc_client_achievement_t {
  const char* title;
  const char* description;
  char badge_name[8];
  char measured_progress[24];
  float measured_percent;
  uint32_t id;
  uint32_t points;
  time_t unlock_time;
  uint8_t state;
  uint8_t category;
  uint8_t bucket;
  uint8_t unlocked;
  float rarity;
  float rarity_hardcore;
  uint8_t type;
  const char* badge_url;
  const char* badge_locked_url;
} rc_client_achievement_t;

title

The title of the achievement.

description

A short summary of the requirements for unlocking the achievement.

badge_name

The unique identifier of the image associated to the achievement. See also rc_client_achievement_get_image_url.

measured_progress

A string summarizing the user's progress towards completing an achievement that supports progress tracking (i.e. 6/15 or 40%). Will be empty string if achievement doesn't support progress tracking, or no progress has been made.

measured_percent

The raw percentage of progress completed (0.0-100.0). Used for filling progress bars. Will be 0.0 if achievement does not support progress tracking.

id

The unique identifier of the achievement.

points

The number of points the achievement is worth.

unlock_time

The time when the achievement was unlocked (if known), otherwise 0.

state

The current state of the achievement.

state description
RC_CLIENT_ACHIEVEMENT_STATE_INACTIVE The achievement hasn't been processed yet.
RC_CLIENT_ACHIEVEMENT_STATE_ACTIVE The achievement is eligible to trigger.
RC_CLIENT_ACHIEVEMENT_STATE_UNLOCKED The user has unlocked this achievement.
RC_CLIENT_ACHIEVEMENT_STATE_DISABLED The achievement is not supported by this version of the runtime, or references a memory address that failed to be read.

category

The category of the achievement.

category description
RC_CLIENT_ACHIEVEMENT_CATEGORY_CORE The achievement has been published and is eligible to be earned by players.
RC_CLIENT_ACHIEVEMENT_CATEGORY_UNOFFICIAL The achievement is not currently eligible to be earned by players.

Unofficial achievements are only activated is rc_client_set_unofficial_enabled was called to enable them.

bucket

A secondary classification of the achievement for rc_client_create_achievement_list grouping via RC_CLIENT_ACHIEVEMENT_LIST_GROUPING_PROGRESS.

unlocked

Bitflags representing whether the user has unlocked the achievement in hardcore (RC_CLIENT_ACHIEVEMENT_UNLOCKED_HARDCORE), softcore (RC_CLIENT_ACHIEVEMENT_UNLOCKED_SOFTCORE), or both.

To detect if the user has unlocked the achievement for the currently specified hardcore state (see rc_client_set_hardcore_enabled), check for state == RC_CLIENT_ACHIEVEMENT_STATE_UNLOCKED.

rarity(Minimum version: 11.7.0)

The percentage of players who have earned this achievement (0.0-100.0).

rarity_hardcore(Minimum version: 11.7.0)

The percentage of players who have earned this achievement in hardcore (0.0-100.0).

type(Minimum version: 11.7.0)

The type of the achievement

type description
RC_CLIENT_ACHIEVEMENT_TYPE_STANDARD No special marking
RC_CLIENT_ACHIEVEMENT_TYPE_MISSABLE The achievement cannot be earned after some point in the playthrough and would require another playthrough if missed
RC_CLIENT_ACHIEVEMENT_TYPE_PROGRESSION The achievement is required to beat the game
RC_CLIENT_ACHIEVEMENT_TYPE_WIN The achievement indicates the game has been beaten

In order to earn a beaten badge, the player must earn all PROGRESSION achievements and at least one WIN achievement. To master the game, the player must earn all achievements.

badge_url(Minimum version: 12.0.0)

A URL to the achievement's badge image.

badge_locked_url(Minimum version: 12.0.0)

A URL to the locked version of the achievement's badge image. Typically, this is just a slightly-blurred greyscale version of the badge image.

Remarks

measured_progress, measured_percent, and bucket are recalculated on demand (when rc_client_get_achievement_info or rc_client_create_achievement_list is called, or when the achievement is passed to an event handler). If you store a reference to the rc_client_achievement_t, those fields may become stale.

rarity and rarity_hardcore are calculated assuming the player has earned the achievement so the rarity can be displayed in the achievement unlocked popup. Anything with less than a 10% earn rate is considered rare and the client can choose to mark them as such and/or have a special unlock sound.

Minimum version: 11.0.0

See also

rc_client_achievement_get_image_url

rc_client_create_achievement_list

rc_client_get_game_info

rc_client_get_leaderboard_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