Skip to content

Achievement percentages#545

Open
dasafe wants to merge 6 commits into
Detanup01:devfrom
dasafe:achievement-percentages
Open

Achievement percentages#545
dasafe wants to merge 6 commits into
Detanup01:devfrom
dasafe:achievement-percentages

Conversation

@dasafe

@dasafe dasafe commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

1. Achievement unlock percentage display — Shows an unlock percentage for each achievement (e.g. "45.2%") if the unlock_percentage field exists in your achievements.json. Rare achievements (≤10%) are highlighted in gold with a glow border on the icon.

2. Rare achievement notification effect — Golden glowing border + shimmer sweep animation on the notification popup when a rare achievement is unlocked. This is enabled if your achievements.json includes achievement percentages, as it's assumed you'll want to highlight rare achievements when that data is available.

3. Achievement list and Notification history settings — Show_Achievement_List (show/hide the list), Unlocked_Expanded (expand unlocked section by default), Locked_Expanded (expand locked section by default) and Show_Notification_History (show/hide the history).

@dasafe

dasafe commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

There's a related feature I left out of this PR because the emulator is meant to work offline. It auto-fetches global achievement unlock percentages from Steam's API on game start and writes them to achievements.json.

In Steam_User_Stats constructor, if the user has explicitly set disable_lan_only=1 in [main::connectivity], networking is enabled (default) and the game has achievements, it spawns a background thread that:

  1. Fetches global percentages from https://api.steampowered.com/ISteamUserStats/GetGlobalAchievementPercentagesForApp/v2/?gameid=
  2. Matches achievements by name and writes unlock_percentage into each entry
  3. Saves the updated data back to steam_settings/achievements.json

By default, LAN-only mode blocks external connections, so this effectively only runs for users who have already opted into full networking. There's no dedicated setting, it piggybacks on disable_lan_only.

Is it okay to add it to the PR?

@ndiruhniu

Copy link
Copy Markdown

As I remember, the emulator's philosophy is to NEVER connect to third‑party services (especially Steam). So if this functionality is to be added, it should be fully offline, and at the same time update all current config generators (gbe_fork_tools and gen.emu.sharp).

@dasafe

dasafe commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

This is completely offline and optional, so if the field isn't there, it will still work as before. In the future the config generators can be updated to populate unlock_percentage values.

@ndiruhniu

Copy link
Copy Markdown

Sorry, I didn't translate correctly and misunderstood the text of your pull request.

Comment thread overlay_experimental/steam_overlay.cpp Outdated
Comment on lines +1167 to +1169
: is_achievement
? ImVec4(0.0f, 0.0f, 0.0f, settings_noti_alpha)
: ImVec4(0, 0, 0, settings_noti_alpha));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? if you already set to ImVec4(0, 0, 0, noti_alpha) there is no reason for this check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants