What problem does it solve?
This module centralizes achievement tracking, progress calculation, reward application, persistence, and platform synchronization so teams avoid fragile, ad-hoc achievement logic that is hard to test, inconsistent across sessions, or out of sync with Steam.
Core Features & Use Cases
- Composable Unlock Conditions: Build complex AND/OR/NOT rules for flexible achievement gating.
- Progressive and Event-Driven Tracking: Stat-driven progress computation combined with event-triggered updates and periodic evaluation for non-progressive checks.
- Rewards and Persistence: Apply currency and stat rewards on unlock and persist state with a save service, including ISO 8601 timestamps and dirty-flag saves.
- Platform Sync & Gating: Bidirectional Steam synchronization, evaluation gated by game playable state, and reactive properties for UI binding.
- Use Case: Register a centralized AchievementDatabaseConfig at startup, surface reactive unlock state to UI, and ensure unlocks grant rewards and sync to Steam.
Quick Start
Create an AchievementDefinition that tracks a stat (e.g., "distance") with a progress target, specify a SteamAchievementId and currency reward, add it to the AchievementDatabaseConfig, and register the database so the AchievementService evaluates progress and syncs unlocks with Steam.