RetroAchievements / RAIntegration

The DLL responsible to integrate emulators with RetroAchievements.org
https://retroachievements.org
MIT License
98 stars 23 forks source link

Ability to edit local achievements without an internet connection #904

Closed Jamiras closed 2 years ago

Jamiras commented 2 years ago

Initial support for #770. Pretty much everything is functional, except code notes are read only.

If you open an emulator without an internet connection, you'll get an error indicating that you're being dropped into "offline mode". image

The title bar indicates the user is "[OFFLINE]" and the menu is simplified: image

When a game is loaded while online, assets are downloaded and stored in the RACache directory. When a game is loaded while offline, only those assets are available to be used. As such, the user must still first load their game in online mode before entering offline mode. Attempting to load a game not already in the cache results in an error indicating a connection is required.

Because there's no online connection, all Core achievements will automatically be activated as if the player had not earned them. Unlocking the achievements shows a modified popup indicating the achievements are Offline achievements. These will not be synced to the server at a later time. Offline unlocks are local only!

image

Achievement progress is still maintained in the overlay, though the player's score is not updated. Also, any achievements that the player had previously unlocked such that the locked image is not in the cache will appear without an icon. The unlocked icon will be available in the cache and will show up in the unlock popups.

image

Leaderboards are also supported in a similar manner.

image

All of the developer tools work the same. Memory can be searched, bookmarked, edited, and frozen. Local modifications to achievements and leaderboards can be saved to be published later. The rich presence file can be externally modified and picked up by the emulator. Existing notes will be present and are searchable. I'm pretty sure that the only thing that doesn't work in offline mode is editing code notes as those are written directly to the server. Supporting that is a much larger project and may or may not happen before this feature is released.