Skip to content

SkyWars computed

Derived SkyWars statistics, attached as .computed on the raw SkyWarsStats parser block. It is always present (always-on), computed from the parsed stats alone.

All ratios use the shared ratio(a, b) helper: the result is rounded to 2 decimals, and a zero denominator yields the numerator (K/D convention). percent(part, whole) yields a 0 to 100 value rounded to 2 decimals, with a zero whole yielding 0. neededForNextWholeRatio(n, d) is the extra numerator needed, with the denominator unchanged, to reach the next whole ratio floor(n / d) + 1 (it is 0 when the denominator is 0).

SkyWarsComputed

The root object returned by computeSkyWars(raw: SkyWarsStats).

ts
export interface SkyWarsComputed {
  readonly level: SkyWarsLevel;
  readonly xpForNextLevel: number;
  readonly levelFormatted: string;
  readonly weeklyKills: number;
  readonly monthlyKills: number;
  readonly lootBoxesTotal: number;
  readonly headsPerGame: number;
  readonly soulWellLegendaryRate: number;
  readonly soulWellRareRate: number;
  readonly soulsGatheredPerGame: number;
  readonly overall: SkyWarsModeComputed;
  readonly perMode: Readonly<Record<SkyWarsSubmode, SkyWarsModeComputed>>;
}
FieldFormula / meaning
levelskywarsLevel(experience): level object from the SkyWars XP curve. The first 19 levels use increasing per-level costs (0, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500, 3000, 3500, 4000, 4500 XP), after which every level costs a constant 5,000 XP, capped at level 10,000. See SkyWarsLevel below.
xpForNextLevelmax(0, level.required - level.currentXp): XP still needed to reach the next level (0 at the level cap, where required is 0).
levelFormattedThe raw levelFormatted string cleaned of Minecraft formatting: §l becomes **, §r is removed, and color codes (§0 to §f) are stripped.
weeklyKillsThe active one of the two oscillating weekly kill counters (weeklyKillsA / weeklyKillsB). Hypixel alternates the live bucket each week; the week parity is computed from the number of whole weeks since the oscillation epoch (timestamp 1417237200000), odd weeks select a.
monthlyKillsThe active one of monthlyKillsA / monthlyKillsB, selected by the current month's parity (odd zero-based month index selects a).
lootBoxesTotalhalloweenBoxes + christmasBoxes + lunarBoxes + easterBoxes: total seasonal loot boxes.
headsPerGameratio(headsCollected, overall.gamesPlayed): lifetime heads collected per game (top-level counter, distinct from the per-mode headsPerGame).
soulWellLegendaryRateratio(soulWellLegendaries, soulWell): fraction of soul well uses that produced a legendary.
soulWellRareRateratio(soulWellRares, soulWell): fraction of soul well uses that produced a rare.
soulsGatheredPerGameratio(soulsGathered, overall.gamesPlayed).
overallSkyWarsModeComputed for the overall (all modes combined) stat block.
perModeSkyWarsModeComputed for each submode: solo, teams, mega, mini, ranked, lab.

SkyWarsModeComputed

Computed per stat block (overall and each submode).

ts
export interface SkyWarsModeComputed {
  readonly winLossRatio: number;
  readonly winRate: number;
  readonly kdr: number;
  readonly killsForNextKdr: number;
  readonly winsForNextWlr: number;
  readonly killsPerGame: number;
  readonly assistsPerGame: number;
  readonly bowAccuracy: number;
  readonly avgGameLength: number;
  readonly quitRate: number;
  readonly survivalEfficiency: number;
  readonly headsPerGame: number;
  readonly killShare: SkyWarsKillShare;
}
FieldFormula / meaning
winLossRatioratio(wins, losses) (WLR).
winRateratio(wins, gamesPlayed): fraction of games won (0 to 1 scale).
kdrratio(kills.total, deaths).
killsForNextKdrKills needed, with zero further deaths, to reach the next whole KDR.
winsForNextWlrWins needed, with zero further losses, to reach the next whole WLR.
killsPerGamekills.total / gamesPlayed.
assistsPerGameassists / gamesPlayed.
bowAccuracyratio(arrowsHit, arrowsShot): fraction of arrows that hit.
avgGameLengthratio(timePlayed, gamesPlayed): average time per game, in the unit timePlayed is stored in.
quitRateratio(quits, gamesPlayed): fraction of games quit.
survivalEfficiencyratio(survivedPlayers, gamesPlayed): players outlived per game.
headsPerGameheads.total / gamesPlayed for this stat block.
killSharePercentage breakdown of kills by cause, see SkyWarsKillShare.

SkyWarsKillShare

ts
export interface SkyWarsKillShare {
  readonly melee: number;
  readonly void: number;
  readonly bow: number;
  readonly mob: number;
  readonly fall: number;
}

Each field is a percentage (0 to 100) of the block's total kills (kills.total).

FieldFormula / meaning
meleepercent(kills.melee, kills.total).
voidpercent(kills.void, kills.total): kills by knocking players into the void.
bowpercent(kills.bow, kills.total).
mobpercent(kills.mob, kills.total).
fallpercent(fallKills, kills.total) (fall kills are a separate counter on the mode block, not part of the kills breakdown).

SkyWarsSubmode

ts
export type SkyWarsSubmode =
  | "solo"
  | "teams"
  | "mega"
  | "mini"
  | "ranked"
  | "lab";

The keys of SkyWarsComputed.perMode; each maps to a SkyWarsModeComputed for that submode.

SkyWarsLevel

Re-exported from the shared leveling module and used as the type of SkyWarsComputed.level.

ts
export interface SkyWarsLevel {
  readonly level: number;
  readonly currentXp: number;
  readonly required: number;
  readonly totalXp: number;
}
FieldFormula / meaning
levelWhole SkyWars level from the XP curve described above (capped at 10,000).
currentXpXP earned within the current level.
requiredXP the current level costs in total (5000 in the constant region; 0 at the level cap).
totalXpThe raw lifetime experience value.

computeSkyWars

ts
export function computeSkyWars(raw: SkyWarsStats): SkyWarsComputed;

Builds the whole computed block from the parsed SkyWarsStats. The weekly and monthly oscillating counters are resolved against the current date at compute time.

Released under the MIT License.