-
Notifications
You must be signed in to change notification settings - Fork 44
rc_client_get_achievement_info
Get information about an achievement.
const rc_client_achievement_t* rc_client_get_achievement_info(
rc_client_t* client,
uint32_t id
);
client
The rc_client_t
containing a loaded game.
id
The unique identifier of the achievement to retrieve information about.
A pointer to the achievement information, or NULL if not found.
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.
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
rc_client_achievement_get_image_url
rc_client
- rc_client_abort_async
- rc_client_create
- rc_client_destroy
- rc_client_enable_logging
- rc_client_get_encore_mode_enabled
- rc_client_get_hardcore_enabled
- rc_client_get_spectator_mode_enabled
- rc_client_get_unofficial_enabled
- rc_client_get_user_agent_clause
- rc_client_get_userdata
- rc_client_set_allow_background_memory_reads
- rc_client_set_encore_mode_enabled
- rc_client_set_hardcore_enabled
- rc_client_set_hash_callbacks
- rc_client_set_host
- rc_client_set_spectator_mode_enabled
- rc_client_set_unofficial_enabled
- rc_client_set_userdata
- rc_client_begin_login_with_password
- rc_client_begin_login_with_token
- rc_client_get_user_info
- rc_client_get_user_game_summary
- rc_client_logout
- rc_client_user_get_image_url
- rc_client_achievement_get_image_url
- rc_client_begin_change_media
- rc_client_begin_fetch_leaderboard_entries
- rc_client_begin_fetch_leaderboard_entries_around_user
- rc_client_begin_identify_and_change_media
- rc_client_begin_identify_and_load_game
- rc_client_begin_load_game
- rc_client_create_achievement_list
- rc_client_create_leaderboard_list
- rc_client_destroy_achievement_list
- rc_client_destroy_leaderboard_entry_list
- rc_client_destroy_leaderboard_list
- rc_client_game_get_image_url
- rc_client_get_achievement_info
- rc_client_get_game_info
- rc_client_get_leaderboard_info
- rc_client_get_load_game_state
- rc_client_get_rich_presence_message
- rc_client_has_achievements
- rc_client_has_leaderboards
- rc_client_has_rich_presence
- rc_client_is_game_loaded
- rc_client_leaderboard_entry_get_user_image_url
- rc_client_unload_game
- rc_client_can_pause
- rc_client_deserialize_progress
- rc_client_do_frame
- rc_client_idle
- rc_client_is_processing_required
- rc_client_progress_size
- rc_client_reset
- rc_client_serialize_progress
- rc_client_set_event_handler
- rc_client_set_read_memory_function
- rc_client_begin_load_raintegration
- rc_client_raintegration_activate_menu_item
- rc_client_raintegration_get_achievement_state
- rc_client_raintegration_get_menu
- rc_client_raintegration_has_modifications
- rc_client_raintegration_rebuild_submenu
- rc_client_raintegration_set_console_id
- rc_client_raintegration_set_event_handler
- rc_client_raintegration_set_get_game_name_function
- rc_client_raintegration_set_write_memory_function
- rc_client_raintegration_update_main_window_handle
- rc_client_raintegration_update_menu_item
- rc_client_unload_raintegration
rc_runtime
- rc_runtime_activate_achievement
- rc_runtime_activate_lboard
- rc_runtime_activate_richpresence
- rc_runtime_deactivate_achievement
- rc_runtime_deactivate_lboard
- rc_runtime_deserialize_progress
- rc_runtime_destroy
- rc_runtime_do_frame
- rc_runtime_format_achievement_measured
- rc_runtime_format_lboard_value
- rc_runtime_get_achievement
- rc_runtime_get_achievement_measured
- rc_runtime_get_lboard
- rc_runtime_get_richpresence
- rc_runtime_init
- rc_runtime_invalidate_address
- rc_runtime_progress_size
- rc_runtime_reset
- rc_runtime_serialize_progress
- rc_runtime_validate_addresses
rapi
- rc_api_destroy_fetch_all_user_progress_response
- rc_api_destroy_fetch_followed_users_response
- rc_api_destroy_fetch_user_unlocks_response
- rc_api_destroy_login_response
- rc_api_destroy_start_session_response
- rc_api_init_fetch_all_user_progress_request
- rc_api_init_fetch_followed_users_request
- rc_api_init_fetch_user_unlocks_request
- rc_api_init_login_request
- rc_api_init_start_session_request
- rc_api_process_fetch_all_user_progress_server_response
- rc_api_process_fetch_followed_users_server_response
- rc_api_process_fetch_user_unlocks_response
- rc_api_process_login_response
- rc_api_process_start_session_response
- rc_api_destroy_award_achievement_response
- rc_api_destroy_fetch_game_data_response
- rc_api_destroy_fetch_game_sets_response
- rc_api_destroy_ping_response
- rc_api_destroy_resolve_hash_response
- rc_api_destroy_submit_lboard_entry_response
- rc_api_init_award_achievement_request
- rc_api_init_fetch_game_data_request
- rc_api_init_fetch_game_sets_request
- rc_api_init_fetch_image_request
- rc_api_init_ping_request
- rc_api_init_resolve_hash_request
- rc_api_init_submit_lboard_entry_request
- rc_api_process_award_achievement_response
- rc_api_process_fetch_game_data_response
- rc_api_process_fetch_game_sets_server_response
- rc_api_process_ping_response
- rc_api_process_resolve_hash_response
- rc_api_process_submit_lboard_entry_response
- rc_api_destroy_fetch_achievement_info_response
- rc_api_destroy_fetch_game_titles_response
- rc_api_destroy_fetch_games_list_response
- rc_api_destroy_fetch_hash_library_response
- rc_api_destroy_fetch_leaderboard_info_response
- rc_api_init_fetch_achievement_info_request
- rc_api_init_fetch_game_titles_request
- rc_api_init_fetch_games_list_request
- rc_api_init_fetch_hash_library_request
- rc_api_init_fetch_leaderboard_info_request
- rc_api_process_fetch_achievement_info_response
- rc_api_process_fetch_game_titles_server_response
- rc_api_process_fetch_games_list_response
- rc_api_process_fetch_hash_library_response
- rc_api_process_fetch_leaderboard_info_response