Content generated with AI — it may contain mistakes.

ExyliaTotemTrainer/GuidesUpdated in v1.2.0

Read stats and leaderboards

What a profile, a training record and the duel history store, how the leaderboards are built, and how to reset a player.

Page 8 of 236 min read

Three tables hold what a player has done. Each answers a different question, and nothing is derived from one that another could lose.

Before you start#

Stats are stored in the database ExyliaLib is configured with, see Database. Nothing needs enabling: a profile is created when the player first joins, and records appear after the first finished session.

TableOne row perAnswers
totem_profilesPlayerThe duel record and the lifetime pop numbers
totem_training_recordsPlayer, mode and tick speedThe bests, which is what the leaderboards rank
totem_matchesParticipant per duelThe history a player scrolls through

The profile#

The row is loaded when the player joins, written on every change and again when they quit.

FieldMoved by
Matches, wins, losses, win rateA decided duel. The win rate is stored, as a percentage.
Rounds, round wins, round lossesA decided duel, from the final score.
Total pops, best pop, total pop timeEvery session: duels and solo training alike. The average pop is derived from the last two.
Current streak, best streakDuel win streak: up by one on a win, back to zero on a loss. Training never touches it.
Preferred ticks, preferred formatThe last speed and best-of picked in a menu, so the pickers open where the player left them.

A forfeited duel counts as a decided one: the opponent's win, the quitter's loss.

/totem profile, or /totem stats, opens the profile screen: matches, wins, losses, win rate, round wins and losses, current and best streak, total pops, best pop and average pop. /totem profile <player> reads another player's row, from the database if they are offline.

Training records#

One row per player, mode and speed, keyed uuid:mode:ticks. A finished session is merged into its row when it had at least one pop or one fail; a session that ended during the countdown stores nothing.

FieldMerge rule
sessionsPlus one
bestPopsThe higher
bestAverageMillisThe lower, ignoring a session with no pops
bestStreakThe higher
longestSurvivalMillisThe longer session duration
bestScoreThe higher 0 to 100 score

The Records screen, reached from the profile, lists every row the player holds in the order the modes appear in config.yml, slowest speed first within a mode.

Leaderboards#

There is one board per mode, sorted by one of five categories. Boards are read from the training records, not the duel record: the numbers a mode produces are the ones worth comparing.

CategorySorts byDefault name
ratingbestScore times the weight of the speed it was set at, highest firstRating
best_popsbestPops, highest firstMost pops
fastest_averagebestAverageMillis, lowest firstFastest average
best_streakbestStreak, highest firstBest streak
longest_runlongestSurvivalMillis, highest firstLongest run

Names and icons live in messages.yml under menu.categories.

A board opens over every speed. A player appears once on it, with their best row, and the row names the speed it was set at. Only rating compares speeds honestly: it is the score weighted by performance.speed-weights (see Grading), so a clean 10-tick run outranks an equally clean 20-tick one. The other four are raw bests that a slower interval inflates on its own — more pops, longer streaks, longer runs — so the Speed button narrows the open board to one interval, then the next, then back to all of them, and within one speed every number is a fair comparison. A zero never takes a place, so an unplayed speed or a session that ended before a single pop is invisible.

plugins/ExyliaTotemTrainer/config.yml
yaml
leaderboard:
  entries: 10
  cache-seconds: 300
KeyDefaultWhat it does
entries10Rows per board.
cache-seconds300How long a board is kept before the database is asked again. Anything below 5 is treated as 5.

The cache is dropped as soon as a record is stored or a player is reset, so somebody who just set a best sees themselves on the board they set it on.

Opening a board#

/totem leaderboard opens the mode picker; /totem leaderboard <mode> opens that mode's board sorted by rating; /totem leaderboard <mode> <category> sorts it by that category. The old category key best_score still opens the rating board. An unknown mode opens the picker instead of an empty board. Inside, the row of category buttons and the speed button re-sort the open board in place, and the top three rows wear medals.

The same board is readable through PlaceholderAPI: %exyliatotemtrainer_top_<mode>_<category>_<n>% answers the name at that position, and %exyliatotemtrainer_top_<mode>_<category>_<n>_value% the number that put them there, both over every speed. See Placeholders.

Duel history#

Every decided duel writes two rows to totem_matches, one per participant, so "my duels" is a single-column query. Each row carries the opponent, whether the player won, the mode, the speed, the best-of, the score for and against, the duration, the pops, the best and average pop, and when it ended.

/totem history shows the newest rows, victories and defeats drawn differently.

plugins/ExyliaTotemTrainer/config.yml
yaml
history:
  entries: 20
  retention-days: 30
  prune-interval-minutes: 60
KeyDefaultWhat it does
entries20Duels shown to a player.
retention-days30Rows older than this are deleted. 0 keeps everything.
prune-interval-minutes60How often the prune runs. The first sweep is one minute after start.

A sweep looks at the oldest 500 rows at most and deletes the ones past the cutoff, so a backlog drains over several sweeps rather than one long transaction. Statistics are never derived from history, which is what makes pruning it safe.

Resetting a player#

From /totemtraineradmin → Players, behind a confirmation. A reset puts the profile back to zero and deletes every training record the player holds, then drops the leaderboard cache. Both halves on purpose: the boards are read from the records, so a reset that left them would keep the player on every board they were on.

Check that it works#

Finish a session with /totem train normal, then run /totem profile: total pops and best pop moved. Run /totem leaderboard normal and your name should be on the board with the speed you played at. After a duel, /totem history lists it.

Something missing on this page? Tell us on Discord