メインコンテンツまでスキップ

Dungeon Leaderboard Source

Dungeon Leaderboard Source

The rows of a gui_leaderboard made from the statistics of the dungeons: put this entry in the source field of the leaderboard. The leaderboard keeps its order, limit, includeZero and row texts; this entry says what is ranked and how the numbers read. Every player who ever played is listed, online or not. The row texts of the leaderboard can use {name}, {score} (the ranking statistic, formatted), {score_raw} and {value_<key>} for each statistic of values, where <key> is the key of the statistic (damage_dealt, best_time...). {score_raw} is what the ranking compares (health is scaled by 10^decimals to stay a whole number); {value_<key>_raw} is the bare number of the statistic, unscaled, as the _raw placeholders write it. A player without a value for the ranking statistic has a score of 0: includeZero of the leaderboard hides them. For best_time and the other records where the smallest is the best, set the leaderboard order to ASCENDING. The lifetime rows are kept until a run is paid out, so opening the menu does not recompute them.

フィールド

フィールド型デフォルト説明
artifactsList<Ref<DungeonArtifactEntry>>emptyThe 'Dungeon Artifact' entries whose statistics are ranked. Several make one global board: counters add up, records keep the best. Entries that share an artifactId are one file and count once.
scopeDungeonBoardScopeLIFETIMELIFETIME: every player of the artifacts, with their statistics since the beginning. CURRENT_RUN: the members of the run the viewer is in, with what they did so far in it (nobody when the viewer is not in a run).
rankByDungeonStatRUNS_COMPLETEDThe statistic that decides the rank and is written as {score}. Records where the smallest is best (best_time...) need the leaderboard order ASCENDING. current_health only exists in CURRENT_RUN.
valuesList<DungeonStat>emptyStatistics written into each row, one {value_<key>} each (for instance {value_damage_dealt}), and {value_<key>_raw} for the bare number (the same as the _raw placeholders). The ranking statistic is always available too.
durationFormatVar<String>{mm}:{ss}How a duration is written. Tokens: {h} hours, {m} or {mm} minutes (minutes carry the hours unless {h} is used), {ss} seconds, {SSS} milliseconds.
decimalsInt1Decimals of health and rates (damage, health, completion rate). The ranking compares health to this precision: {score_raw} is the rank value, health multiplied by 10^decimals. For the unscaled number use {value_<key>_raw}.
missingValueVar<String>-Written instead of a value that does not exist: no record yet, health of a member who is offline. Plain text: style it in the row text of the leaderboard.
unknownNameVar<String>?Written as the name of a player whose name is not known (a record from before names were kept who has not played since). Plain text.

How to use it​

This entry turns the statistics of the dungeons into the rows of a GUI leaderboard. It needs GUI 0.20 or later: with an older GUI the dungeon leaderboard does not load.

  1. Create the entry and list the Dungeon Artifact entries to rank in artifacts. Several artifacts make one global board: counters add up and records keep the best. Artifacts that share an artifactId count once.
  2. Create a GUI Leaderboard and pick this entry in its source field. The leaderboard keeps order, limit, includeZero, rowItem, rowName and rowLore; its facts, scope, group, population, worlds and scoreMode are not used.
  3. Choose what is ranked: scope, rankBy and the statistics to write in values. For best_time and the other records where the smallest is the best, set the order of the leaderboard to ASCENDING.
  4. Write the row texts with the tokens below, then add a leaderboard layout that points at the leaderboard in an Open GUI.
FieldWhat to know
artifactsThe artifacts whose statistics are ranked.
scopeLIFETIME: every player who ever played, online or not, with their statistics since the beginning. CURRENT_RUN: the members of the run the viewer is in, with what they did so far in it; nobody when the viewer is not in a run.
rankByThe statistic that decides the rank and is written as {score}. Default runs_completed. current_health only exists in CURRENT_RUN.
valuesStatistics written into each row, one token each. The ranking statistic is always available too.
durationFormatHow a duration is written: {h} hours, {m} or {mm} minutes (the minutes carry the hours unless {h} is used), {ss} seconds, {SSS} milliseconds. Default {mm}:{ss}.
decimalsDecimals of health and rates, 0 to 3, default 1. Health is ranked at this precision.
missingValueWritten instead of a value that does not exist: no record yet, or the health of a member who is offline. Default -. Plain text.
unknownNameWritten as the name of a player whose name is not known. Default ?. Plain text.

Tokens of rowName and rowLore, where <key> is the key of a statistic (damage_dealt, best_time...):

TokenValue
{rank}, {name}Place and name of the player.
{score}The ranking statistic, formatted.
{score_raw}The number the ranking compares: the statistic multiplied by 10 to the power of decimals for a health, the plain number for the other units.
{value_<key>}A statistic of values, formatted.
{value_<key>_raw}The same statistic as a bare number, not scaled: milliseconds, health points, parts per thousand.

For example, a rowLore line <gray>Kills: <white>{value_mob_kills} shows the kills of each row when mob_kills is in values.

A player without a value for the ranking statistic has a score of 0, so includeZero of the leaderboard hides them. The LIFETIME rows are kept until a run is paid out, so opening the menu does not recompute them.