RetroAchievements.Achievement

This class contains information of a specific achievement from a RetroAchievements.GameInfo object.

Note

For a proper guide on how to use this integration, please refer to the dedicated integration guide.

Enumerations

enum Type:

  • NORMAL - A normal achievement.

  • PROGRESSION - An achievement that denotes some in-game progression.

  • WIN - An achievement obtainable by reaching (one of) the game’s ending.

  • MISSABLE - An achievement that can be missed during a playthrough, requiring the player to start a new game to obtain it.

Properties

Type

Name

Default

int

id

0

String

title

""

String

description

""

Achievement.Type

type

NORMAL

bool

unlocked

false

bool

unlocked_hard_mode

false

int

unlocked_count

0

int

unlocked_hard_mode_count

0


int id = 0

The achievement’s ID on RetroAchievements.


String title = ""

The achievement’s title.


String description = ""

The achievement’s description.


Achievement.Type type = NORMAL

The achievement’s type.


bool unlocked = false

Whether the achievement has been unlocked.


bool unlocked_hard_mode = false

Whether the achievement has been unlocked, in hard mode.


int unlocked_count = 0

How many players unlocked this achievement.


int unlocked_hard_mode_count = 0

How many players unlocked this achievement, in hard mode.

Methods

Type

Name

Texture

load_icon

void

parse_raw


Texture load_icon ()

Loads the achievement’s icon. If the icon doesn’t exist yet, it will download it from RetroAchievements’ servers and store it automatically.

Warning

This function will queue downloads, which cannot be canceled. A large queue will create delays on other API calls that require any network access. Therefore, you should only call this function only when immediately needed, and take care to not call it for a lot of achievements at once.

Note

This function is asynchronous; use an await to wait for it’s completion.


void parse_raw (Dictionary data)

Parses a raw JSON response from RetroAchievements’s API into this object. Used internally by RetroHub.