-
Notifications
You must be signed in to change notification settings - Fork 30
Steam Achievements #371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LossyDragon
merged 21 commits into
Longi94:master
from
phobos665:steam-achievements-user-stats
Dec 6, 2025
Merged
Steam Achievements #371
LossyDragon
merged 21 commits into
Longi94:master
from
phobos665:steam-achievements-user-stats
Dec 6, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add getExpandedAchievements() to UserStatsCallback to parse bit-level achievements from schema - Add Sample 32 to demonstrate achievement retrieval with full metadata - Parse achievement blocks into individual achievements with names, descriptions, icons, and unlock times - Support for base game and DLC achievements organized in stat blocks
Contributor
Author
|
Achievements.txt I'd love to talk more about this pull request because I think I've nailed it and need someone else to verify with and see what we can do to tighten up the code and ship it. |
Going to actually go through this and work through it, but at least I've set got it set up to be asserted and now I can make adjustments.
…n 32-bit integers won't be able to work with unix timestamps :D
…:ss) just to make things easier for the users.
Turns out that there's inconsistencies with how the date lib works. I hate dates SO MUCH
phobos665
commented
Nov 22, 2025
src/test/java/in/dragonbra/javasteam/steam/handlers/steamuserstats/SteamUserStatsTest.java
Outdated
Show resolved
Hide resolved
Collaborator
|
Thanks for helping with this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings in Steam Achievements 🎉
Steam Blocks were very difficult to figure out, but ultimately the prorots had keyvalues that were decodable and I was able to figure it out.
TL;DR Explanation:
Figured out the real ID, unlock time & whether they were locked/unlocked of individual Achievements via the timestamps index and, thanks to this, was able to then match them with the schema metadata to retrieve the rest of the information.
Parse bit-level achievements from the keyvalue schema
Create a callback to pull in the achievement full with metadata.
Parse achievement blocks into individual achievements with names, descriptions, icons, and unlock times
Support for base game and DLC achievements organized in stat blocks
In-depth Explanation:
AchievementBlocks come from the UserStatsCallback:
Blocks mean that theres collections of multiple achievements. For Example, Borderlands has 3 blocks. Which is Game + DLC 1 and DLC 2.
By delving into this, I managed to figure out that the timestamps were an list of unlockTimestamps in as numbers. The interesting part is that they're always in order of AchievementId and if it is not unlocked based on whether it was 0 or a value above 0.
From there, we were then able to iterate over the "bits" in the schema, which contains the individual Achievement metadata:
The Achievement Metadata
Metadata Fields (from schema)
name: String?- Internal achievement name (e.g., "TF_PLAY_GAME_EVERYCLASS")displayName: String?- Localized display name shown to usersdescription: String?- Achievement description texticon: String?- Icon hash for unlocked (color) versioniconGray: String?- Icon hash for locked (grayscale) versionhidden: Boolean- Whether achievement is hidden until unlockedChecklist