Database
The eighteen tables, what each one holds, how the two stat tiers relate, and how to export, import and wipe data.
The plugin stores everything through ExyliaLib's database module, so which engine backs it (MySQL, SQLite, H2, MongoDB) is configured once in ExyliaLib and not here: see database. Tables are created and migrated automatically.
The eighteen tables#
| Table | Holds | Kind | Per player |
|---|---|---|---|
practice_arenas | One arena: spawns, regions, protection radii, extra regions, and the match kinds it accepts | SETUP | — |
practice_kits | One kit: loadout, categories, compatible arenas, playability flags, rules JSON | SETUP | — |
practice_kit_categories | One category | SETUP | — |
practice_player_kits | One player's saved loadout slot for one kit | PROGRESS | yes |
practice_player_season_stats | One player's counters for one kit in one season | PROGRESS | yes |
practice_player_lifetime_stats | The same, across every season | PROGRESS | yes |
practice_player_stats | The pre-season table. Read once by the migration, never written again. | PROGRESS | yes |
practice_match_history | One player's side of one finished match, with its inventories for replay.inventory-retention-days | HISTORY | yes |
practice_game_log | One row per match played: kit, arena, mode, player count, whether it was cancelled | HISTORY | — |
practice_seasons | One season: number, name, start, end, whether it is active | HISTORY | — |
practice_settings | A single row: lobby spawn, kit editor spawn, global boost, current season | SETUP | — |
practice_player_settings | One player's /settings | ACCOUNT | yes |
practice_elo_boosts | One player's active LP boost | PROGRESS | yes |
practice_pvp_regions | One PvP zone | SETUP | — |
practice_portal_regions | One portal | SETUP | — |
practice_jumpads | One jump pad and all its locations | SETUP | — |
practice_match_replays | One recorded match, played back with /replay. See Match history | HISTORY | — |
practice_web_outbox | Payloads waiting to reach the web API | CACHE | — |
Wiping data and resetting a player#
The plugin has no wipe or reset command of its own. Every table above says what it holds (the Kind
column), so ExyliaLib's /exylialib wipe screens and commands cover it:
| Command | What it does here |
|---|---|
/exylialib wipe ExyliaPracticeCore <table|@kind|all> [code] | Empties one table, one kind, or every table of the plugin |
/exylialib resetplayer <player> [ExyliaPracticeCore|all] [@kind ...] [code] | Deletes one player's rows from the tables marked Per player. By default that is the PROGRESS ones: saved loadouts, season and lifetime stats, ELO boosts. Add @history for their match history and @account for their /settings. |
Each runs twice: the first run only lists what would go and hands out a code, and a backup is exported before anything is deleted. After a player reset the plugin also drops that player's ELO boost and cached leaderboard entries from memory. See the ExyliaLib commands.
The two stat tiers#
practice_player_season_stats and practice_player_lifetime_stats hold the same columns. The
difference is what resets:
| Season | Lifetime | |
|---|---|---|
| Reset by a rotation | Effectively — the new season starts empty | Never |
| Read by leaderboards | Yes | No |
| Read by sidebars and placeholders | Yes | No |
| Key | <season>:<kit> denormalised into seasonKit | <player>:<kit> |
Both are written in the same commit at the end of a match, so they can never disagree.
The global ladder is stored in both under the kit id global, which is what lets one query answer
both a per-kit and an overall leaderboard.
They are stored rather than computed on read so the database can order a leaderboard by them against
an index. Editing wins by hand through /epc stats set recalculates them.
Indexes that matter#
| Table | Indexed on |
|---|---|
practice_player_season_stats | season, playerUuid, playerName, plus seasonKit with each leaderboard column (elo, kills, deaths, kdr, wins, losses, winRate, bestStreak, currentStreak, damageDealt, timePlayed) |
practice_player_lifetime_stats | playerUuid, playerName, kitId |
practice_match_history | matchId, season, playedAt, plus playerUuid + playedAt and inventoryDay + playedAt |
practice_game_log | kitId, arenaId, endedAt, cancelled |
practice_player_kits | playerUuid, kitId |
practice_web_outbox | kind, createdAt, nextAttemptAt |
practice_seasons | active |
Leaderboards order and limit inside the database against the season index; match history does the same against the played-at index. Nothing pages a whole table into memory.
Migrating from ExyliaCommons#
Two separate migrations exist:
Automatic, on first boot. If practice_player_stats has rows, every one is attributed to season 1
and copied into both the season and lifetime tiers. It runs in the background without blocking
startup, is resumable if the server dies part-way through, and only ever reads the legacy table — so
it can be re-run safely.
Manual, on a dump. /epc migrate <file> [--skip-stats] converts an exported ExyliaCommons v2
database dump into this plugin's schema. Put the dump in plugins/ExyliaPracticeCore/database/exports/: the command writes a converted migrated_<file>.json next to it, imports it, then reloads arenas and kits and re-saves every arena's schematic. --skip-stats converts arenas, kits and settings without
touching player statistics.
Export and import#
| Command | What it does |
|---|---|
/epc export [filename] | Write a dump. With no name, a timestamped file in the dumps folder. |
/epc import <filename> | Load one back |
Both go through ExyliaLib's transfer module, so a dump taken on SQLite can be imported into MySQL.
An import loads rows straight into the live tables and does not invalidate anything the server is already holding in memory — arenas, kits, categories, loaded player stats. Take an export first, run the import with nobody online, and restart the server before letting anybody back in. Otherwise the old in-memory copies are written back over the imported rows.
Something missing on this page? Tell us on Discord