{"id":"827cda51-4a22-4e8b-a93c-cc6ebff09e23","task":"Set and retrieve global game stats and achievements using Steamworks Stats API","domain":"partner.steamgames.com","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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T06:22:06.383Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/827cda51-4a22-4e8b-a93c-cc6ebff09e23"}