Heroes & Experts

Hero gear slots

The four equip slots of Hero Gear, with an icon for each: Goggles, Gloves, Belt, and Boots. List the slots and show their icons. A hero has one piece of gear in each slot.


Type

HeroGearSlotEntry

FieldTypeDescription
idHeroGearSlot'goggles', 'gloves', 'belt', or 'boots'
namestringDisplay name
imagesRecord<TroopType, string>Icon of the piece for infantry, lancer, and marksman

Factory

import { heroGearSlots } from 'whiteout-survival-data'

heroGearSlots() // all 4 slots, in the order of the game
heroGearSlots(source) // wrap a pre-filtered array

Terminal methods

heroGearSlots() has no filters of its own.

MethodReturnsDescription
.get()HeroGearSlotEntry[]All results
.first()HeroGearSlotEntry | undefinedFirst result
.find(id)HeroGearSlotEntry | undefinedFind by id
.findByName(name)HeroGearSlotEntry | undefinedCase-insensitive exact name match
.search(query)HeroGearSlotEntry[]Case-insensitive partial name match
.count()numberNumber of results

Examples

import { heroGearSlots, heroGearStats } from 'whiteout-survival-data'

heroGearSlots().count() // 4
heroGearSlots()
  .get()
  .map((slot) => slot.name) // ['Goggles', 'Gloves', 'Belt', 'Boots']

const belt = heroGearSlots().find('belt')
belt?.images.lancer // '/images/hero-gear/belt-lancer.png'

// The stats of one slot for a troop type
const stats = heroGearStats().bySlot('belt').byTroopType('lancer').first()
stats?.combatStat // 'Defense'
stats?.percentStat // 'Health'

Notes

The id of a slot is the slot of Hero gear stats, which has the stats of each slot for the three troop types. A slot and a troop type give the id of an entry there, such as belt-lancer, so every entry of heroGearStats() has an icon.

The 12 icons are named like belt-lancer.png. Each icon is a 276 by 276 pixel PNG of one tile with its troop badge in the corner. The badge tells the types apart: a shield is Infantry, a spear is Lancer, and a crossbow is Marksman.


Next steps

Previous
Hero gear mastery forging