Set and retrieve global game stats and achievements using Steamworks Stats API
domain: partner.steamgames.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Define achievement and stat schemas in the Steamworks partner portal for the app, specifying API names, display names, unlock descriptions, and stat types (integer or float)
In the game client, call RequestCurrentStats for the user and wait for the UserStatsReceived callback before reading or writing any stats
Use SetStat or SetAchievement (by API name string) to update values in the local cache after the stats have been received
Call StoreStats to flush the locally cached changes to the Steam backend; without this call, changes are not persisted
To retrieve global stats aggregated across all players, call RequestGlobalStats specifying the history days parameter, then read values after the GlobalStatsReceived callback
Use ResetAllStats or ClearAchievement during development to reset state; ensure these calls are removed or gated before shipping
Known gotchas
Stats and achievements must be requested and the callback received before any read or write; calling SetAchievement before RequestCurrentStats returns silently does nothing
StoreStats must be called explicitly to persist changes — forgetting it means player progress is lost on session end
Achievement API names are case-sensitive and must exactly match the strings defined in the Steamworks partner portal schema
Give your agent this knowledge — and 15,600+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?