Ascendara Achievement Watcher
Overview#
Ascendara Achievement Watcher monitors and notifies users of game achievements in real time on the Ascendara platform. Built in JavaScript and optimized for Windows, it is based on achievement-watcher by xan105, but is heavily modified for seamless Ascendara integration.
Modifications from Upstream#
Compared to the original achievement-watcher, the Ascendara version:
- Removes the original notification system
- Integrates with Ascendara's notification helper for a unified user experience
- Streamlines the codebase to focus on core achievement tracking
Key Features#
- Real-time monitoring of achievement/stat files
- Rich, customizable notifications for unlocked achievements
- Single-instance enforcement to prevent duplicate processes
- Full support for both standard and custom Ascendara games
- Automatic updates of achievement state files
- Spam protection to avoid duplicate notifications
- Process-aware: notifies only if the game is running
- Multi-language support via Steam API code mapping
- Robust error handling and detailed logging
Usage#
Achievement Watcher runs as a background process, typically started by Ascendara. There is no standalone CLI; all activity is logged to the console and status files for platform integration.
Workflow#
- Initialization:
- Ensures only one instance runs
- Loads settings and environment variables
- Folder Monitoring:
- Uses node-watch to monitor configured directories/files
- File Change Handling:
- Parses achievement data on updates
- Applies spam protection
- Verifies the game is running
- Notification:
- Triggers notifications via AscendaraNotificationHelper.exe
- Updates achievement cache and state files
- State Update:
- Writes to achievements.ascendara.json (standard games) or achievementWater in games.json (custom games)
Technical Notes#
- Language: Maps user language to Steam API codes using steam.json
- Configuration: Reads from ascendarasettings.json and environment variables
- Persistence: Caches achievement state for all games
- Error Handling: Logs errors and warnings, fails gracefully
- Dependencies: single-instance, node-watch, moment, and standard Node.js modules
Example Notification Flow#
- User unlocks an achievement
- Watcher detects the file change
- If new and not previously notified, triggers a notification
- Updates and persists achievement state
Credits#
The Ascendara Achievement Watcher is a stripped down version of Achievement Watcher by xan105, and more specifically the watchdog used by the Achievement Watcher project.