Content generated with AI — it may contain mistakes.

ExyliaPracticeCore/ReferenceUpdated in v1.4.0

Database

The eighteen tables, what each one holds, how the two stat tiers relate, and how to export, import and wipe data.

Page 26 of 355 min read

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#

TableHoldsKindPer player
practice_arenasOne arena: spawns, regions, protection radii, extra regions, and the match kinds it acceptsSETUP—
practice_kitsOne kit: loadout, categories, compatible arenas, playability flags, rules JSONSETUP—
practice_kit_categoriesOne categorySETUP—
practice_player_kitsOne player's saved loadout slot for one kitPROGRESSyes
practice_player_season_statsOne player's counters for one kit in one seasonPROGRESSyes
practice_player_lifetime_statsThe same, across every seasonPROGRESSyes
practice_player_statsThe pre-season table. Read once by the migration, never written again.PROGRESSyes
practice_match_historyOne player's side of one finished match, with its inventories for replay.inventory-retention-daysHISTORYyes
practice_game_logOne row per match played: kit, arena, mode, player count, whether it was cancelledHISTORY—
practice_seasonsOne season: number, name, start, end, whether it is activeHISTORY—
practice_settingsA single row: lobby spawn, kit editor spawn, global boost, current seasonSETUP—
practice_player_settingsOne player's /settingsACCOUNTyes
practice_elo_boostsOne player's active LP boostPROGRESSyes
practice_pvp_regionsOne PvP zoneSETUP—
practice_portal_regionsOne portalSETUP—
practice_jumpadsOne jump pad and all its locationsSETUP—
practice_match_replaysOne recorded match, played back with /replay. See Match historyHISTORY—
practice_web_outboxPayloads waiting to reach the web APICACHE—

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:

CommandWhat 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:

SeasonLifetime
Reset by a rotationEffectively — the new season starts emptyNever
Read by leaderboardsYesNo
Read by sidebars and placeholdersYesNo
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.

Why winRate and kdr are columns

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#

TableIndexed on
practice_player_season_statsseason, playerUuid, playerName, plus seasonKit with each leaderboard column (elo, kills, deaths, kdr, wins, losses, winRate, bestStreak, currentStreak, damageDealt, timePlayed)
practice_player_lifetime_statsplayerUuid, playerName, kitId
practice_match_historymatchId, season, playedAt, plus playerUuid + playedAt and inventoryDay + playedAt
practice_game_logkitId, arenaId, endedAt, cancelled
practice_player_kitsplayerUuid, kitId
practice_web_outboxkind, createdAt, nextAttemptAt
practice_seasonsactive

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#

CommandWhat 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.

Restart after an import

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