TDXDevelopment
TDX LeaderboardsConfiguration

points

Points-from-position scoring across boards.

Points are the meta-leaderboard. Every board awards points to its top positions, the points are added up per player, and that total is its own leaderboard. Period rewards are paid from it.

Quick example

plugins/TDXLeaderboards/config.yml
points:
  enabled: true
  show-on-join: true
  position-points:
    1: 10
    2: 9
    3: 8
    4: 7
    5: 6
    6: 5
    7: 4
    8: 3
    9: 2
    10: 1

With this, every board awards 10 points to its #1, 9 to its #2, and so on. A player who is #1 on three boards has 30 points.

Reference

KeyTypeDefaultNotes
enabledbooleantrueMaster switch.
show-on-joinbooleantrueSends each player their points total on join (points-join in messages.yml).
position-pointsint → int10 down to 1Points for each position. A position that is not listed is worth 0.

Making one board count for more

There is no separate point ladder per board. Instead, each board has a points-multiplier in its own entry under boards:

plugins/TDXLeaderboards/config.yml
boards:
  votes:
    # ...
    points-multiplier: 3

The board's points are the ladder value times the multiplier, so #1 on this board is worth 30 points instead of 10. The multiplier is a whole number and values below 1 are treated as 1. See boards for the other board keys.

How totals are kept

Points are recalculated every general.update-interval seconds, right after the boards themselves. They always reflect the current standings: drop from #1 to #4 on a board and your points drop with it.

Keep the ladder within general.leaderboard-size (10 by default). Only that many positions of each board are stored. A lower position can earn points while the player is online, but it disappears from the ranking as soon as they log off, and the points with it.

Points are cleared at every period reset, together with the boards. The final standings of each period are kept in the archive, which players can browse with /leaderboard history.