TDXDevelopment
TDX LeaderboardsGuides

Monthly reset explained

What happens when a period ends, from the final standings to rewards, offline winners and what carries over.

The period reset is the moment a leaderboard's "this month" turns over. It's the part of the plugin most likely to surprise you the first time it fires. This page walks through it step by step.

When does it fire?

At the calendar boundary of your monthly.reset-period, in the server's timezone: midnight on the 1st for monthly, midnight on Monday for weekly, and midnight on every second Monday for biweekly.

The plugin checks every five minutes and once on startup, so the reset runs within five minutes of the boundary. If the server was offline at the time, it runs on the next startup instead. The last period that was closed out is remembered in the database, so a missed reset is always caught up.

reset-day and reset-hour in config.yml are not used. See the monthly page for the details.

What happens, in order

  1. The final standings are read from storage. Boards are saved every time they refresh, so the standings are as they stood at the last refresh before the period ended. With the default update-interval that is at most five minutes old.
  2. Rewards are paid. First the positions on the points leaderboard (rewards.points-leaderboard), then any per-board rewards (rewards.board-rewards). Players holding no points get nothing.
  3. The standings are archived, if monthly.archive-history is on. That is what /leaderboard history and the Past Periods button read.
  4. The Discord webhook posts the results, if it is set up.
  5. The ended period is cleared. Starting points, plugin-counted totals, board rows and points for that period are all deleted.
  6. Online players get a fresh starting point on DELTA boards. Everybody else gets theirs the next time they join.

Rewards and the archive are each marked as done for that period. A reset that ends up running twice skips whatever already happened.

What carries over, and what does not

  • Points reset. They are earned from board positions within a period, and they are cleared with it. There is no all-time points total.
  • DELTA and ACCUMULATE boards start from zero.
  • CURRENT boards keep their value, because they show a live number (a balance, a level) and there is nothing to reset. The board refills on the next refresh.
  • Milestone alerts do not reset. A player is only told once that they entered the top rankings of a board, and that flag is permanent.

Offline winners

  • Reward commands for an offline winner are saved and run about two seconds after they next join, so give style commands land in a loaded inventory. If they log straight back out before the commands run, the commands are kept for the join after that.
  • Reward messages only reach winners who are online at the reset. An offline winner gets the reward, but not the message.

There is no test mode. /lbadmin reset confirm does not run this pipeline: it wipes the current period and starts it again, with no rewards and no archive. To try your rewards safely, use a copy of the server. To close out a past period that was missed, run /lbadmin archive <period> confirm.

Common surprises

  • "My monthly board is showing the same player as last month." Either the board uses tracking: CURRENT (a live value) when you wanted tracking: DELTA (progress this period), or that player just happens to be #1 again. If the value matches their all-time number, it's the former.
  • "Rewards fired but the player says they got nothing." Check latest.log. Every reward command is logged when it runs, and when it is queued for an offline winner. The most common cause is a typo in commands, such as an item name that does not exist.
  • "The countdown and the reset did not match." Before v1.9.19 the countdown used reset-day and reset-hour, which the reset itself ignores. Update, and the countdown shows the real time.