Skip to content

VampireZ

The VampireZ module exposes a single parser, parseVampireZ, which mirrors the raw stats.VampireZ block of the Hypixel player API field-for-field into readonly, fully-typed objects. Every value below is read straight from the raw JSON with no computation, no ratios, and no derived totals.

parseVampireZ

Parses a player's VampireZ stats (stats.VampireZ) into a typed object.

ts
function parseVampireZ(stats: Record<string, unknown>): VampireZStats | null;

Null / empty behavior

parseVampireZ returns null when stats.VampireZ is missing or is not a plain object (i.e. it is absent, null, or an array). Otherwise it always returns a fully-populated VampireZStats object filled in by the safe readers used throughout the module:

  • Missing or non-number values become 0.
  • Missing or non-string values become "".
  • Boolean fields are true only when the raw value is exactly true, otherwise false.
  • packages becomes an empty array ([]) when absent or not an array, keeping only string entries.
  • boughtDyeColors collects every raw key prefixed with bought_dye_color: whose value is exactly true, with the prefix stripped; it is [] when none are present.

Returned type tree

VampireZStats

The root object returned by parseVampireZ.

ts
interface VampireZStats {
  readonly coins: number;
  readonly goldBought: number;
  readonly blood: boolean;
  readonly updatedStats: boolean;
  readonly usingOld: boolean;
  readonly usingOldVamp: boolean;
  readonly disableKillPing: boolean;
  readonly combatTracker: boolean;
  readonly noStartingCompass: boolean;
  readonly noStartingGear: boolean;
  readonly noStartingFood: boolean;
  readonly noStartingPotion: boolean;
  readonly noStartingTorch: boolean;
  readonly disabledLootDrops: boolean;
  readonly prefixDisabled: boolean;
  readonly vampColor: string;
  readonly vampireColor: string;
  readonly survivorColor: string;
  readonly boughtDyeColors: readonly string[];
  readonly zombieKills: number;
  readonly zombieDoubler: number;
  readonly vampireDoubler: number;
  readonly lootDrops: number;
  readonly terrorLevel: number;
  readonly mostVampireKills: number;
  readonly mostVampireKillsLegacy: number;
  readonly packages: readonly string[];
  readonly votes: VampireZMapVotes;
  readonly human: VampireZRoleStats;
  readonly vampire: VampireZRoleStats;
  readonly monthly: VampireZPeriodWins;
  readonly weekly: VampireZPeriodWins;
  readonly perks: VampireZPerks;
}
FieldRaw sourceNotes
coinscoins or tokensFalls back to tokens when coins is 0/absent.
goldBoughtgold_bought
bloodblood
updatedStatsupdated_stats
usingOldusing_old
usingOldVampusing_old_vamp
disableKillPingdisable_kill_ping
combatTrackercombatTracker
noStartingCompassno_starting_compass
noStartingGearno_starting_gear
noStartingFoodno_starting_food
noStartingPotionno_starting_potion
noStartingTorchno_starting_torch
disabledLootDropsdisabled_loot_drops
prefixDisabledprefix_disabled
vampColorvamp_color
vampireColorvampirecolor
survivorColorsurvivor_color
boughtDyeColorsbought_dye_color:* keysSee note below.
zombieKillszombie_kills
zombieDoublerzombie_doubler
vampireDoublervampire_doubler
lootDropsloot_drops
terrorLevelterror_level
mostVampireKillsmost_vampire_kills_new
mostVampireKillsLegacymost_vampire_kills
packagespackagesString entries only; non-string entries are filtered out.

boughtDyeColors is built from every raw key prefixed with bought_dye_color: whose value is exactly true; the resulting strings are those keys with the bought_dye_color: prefix stripped. packages is the raw packages array filtered to string entries only, or [] when it is not an array.

VampireZMapVotes

Per-map vote counts (votes field of VampireZStats), each read from the raw votes_<Map> key.

ts
interface VampireZMapVotes {
  readonly cavern: number;
  readonly church: number;
  readonly darkValley: number;
  readonly dusk: number;
  readonly erias: number;
  readonly kudong: number;
  readonly overhill: number;
  readonly plundered: number;
  readonly pyramids: number;
  readonly village: number;
}
FieldRaw source
cavernvotes_Cavern
churchvotes_Church
darkValleyvotes_Dark Valley
duskvotes_Dusk
eriasvotes_Erias
kudongvotes_Kudong
overhillvotes_Overhill
plunderedvotes_Plundered
pyramidsvotes_Pyramids
villagevotes_Village

VampireZRoleStats

Per-role kill/death/win totals (used by both human and vampire).

ts
interface VampireZRoleStats {
  readonly kills: number;
  readonly deaths: number;
  readonly wins: number;
}
FieldRaw source (human)Raw source (vampire)
killshuman_killsvampire_kills
deathshuman_deathsvampire_deaths
winshuman_winsvampire_wins

VampireZPeriodWins

Periodic win counters (used by both monthly and weekly).

ts
interface VampireZPeriodWins {
  readonly humanWinsA: number;
  readonly humanWinsB: number;
  readonly vampireWinsA: number;
  readonly vampireWinsB: number;
}
FieldRaw source (monthly)Raw source (weekly)
humanWinsAmonthly_human_wins_aweekly_human_wins_a
humanWinsBmonthly_human_wins_bweekly_human_wins_b
vampireWinsAmonthly_vampire_wins_aweekly_vampire_wins_a
vampireWinsBmonthly_vampire_wins_bweekly_vampire_wins_b

VampireZPerks

Purchased/levelled perk values (perks field of VampireZStats).

ts
interface VampireZPerks {
  readonly advancedSwag: number;
  readonly babyHater: number;
  readonly basicSwag: number;
  readonly bloodBooster: number;
  readonly bloodDrinker: number;
  readonly constitution: number;
  readonly drainPunch: number;
  readonly expertSwag: number;
  readonly explosiveKiller: number;
  readonly finalBreath: number;
  readonly fireproofing: number;
  readonly foresight: number;
  readonly frankensteinsMonster: number;
  readonly goldBooster: number;
  readonly goldStarter: number;
  readonly hellborn: number;
  readonly killBooster: number;
  readonly renfield: number;
  readonly theology: number;
  readonly transfusion: number;
  readonly vampiricMinion: number;
  readonly vampiricScream: number;
  readonly vanHelsing: number;
  readonly waveBooster: number;
}
FieldRaw source
advancedSwagadvanced_swag
babyHaterbaby_hater
basicSwagbasic_swag
bloodBoosterblood_booster
bloodDrinkerblood_drinker
constitutionconstitution
drainPunchdrain_punch
expertSwagexpert_swag
explosiveKillerexplosive_killer
finalBreathfinal_breath
fireproofingfireproofing
foresightforesight
frankensteinsMonsterfrankensteins_monster
goldBoostergold_booster
goldStartergold_starter
hellbornhellborn
killBoosterkill_booster
renfieldrenfield
theologytheology
transfusiontransfusion
vampiricMinionvampiric_minion
vampiricScreamvampiric_scream
vanHelsingvan_helsing
waveBoosterwave_booster

Released under the MIT License.