Database Sync
Sync player data (level, XP, stat allocations) to an external database for analytics, web dashboards, or external tools.One-way sync only. Data flows from the game to the database. Hytale storage is the source of truth. Changes made directly in the database do not affect players in-game. This may evolve in future versions.
How It Works
- Hytale storage - Player data (level, XP, stats) is stored by Hytale in JSON files under
universe/players/. This is always the authoritative source. - Database mirror - When enabled, the plugin copies this data to an external database table whenever it changes.
- When sync runs:
- On startup - All players from disk are synced to the DB (table is created if it does not exist).
- On change - Whenever a player levels up, gains XP, allocates stats, or has stats reset, their data is synced asynchronously.
Configuration File
DatabaseConfig.json is in mods/Zuxaw_RPGLeveling/ (next to other config files).
All Parameters
Example Configuration
MariaDB / MySQL:Connection URLs
- Replace
host,port, anddatabasewith your values. - H2 file mode stores data locally; no external server is needed. Username and Password are usually empty.
- All table names use the
RPGLeveling_prefix for consistency with the plugin.
Table Schema
The plugin createsRPGLeveling_players automatically when it connects (if it does not exist).
Example Queries
Get data for one player (by UUID or username):Important Notes
- Sync is one-way. Edits in the database (e.g. via SQL) are not applied to players in-game.
- Hytale storage wins. If there is any conflict, the in-game data is authoritative.
- Performance - Sync runs asynchronously; it does not block gameplay.
- Failure handling - If the DB is unreachable, sync fails quietly and is logged. The game continues normally.
