SoundSet beta
Interface of @v12-engine/client
export interface SoundSetThe sounds of a game: what each unit, building and ability sounds like, and the music and the ambience
Members
abilities
abilities?: Record<string, string>;When an ability goes off, by its id. cast for those left out
alert
alert?: string;Something of the player's is under attack where they are not looking (see GameView.hud.alertFor). error when left out
ambience
ambience?: string[];Sounds in the background, all at once and over and over: wind, birds. Each one file, made to loop
bounty
bounty?: string;Gold for a kill
building
building?: EntitySounds;For every building
cast
cast?: string;An ability goes off that has no sound of its own. Silence when left out, as for each of these
charged
charged?: Record<string, string>;When an ability goes off charged (see AbilityDef.charge), by its id. Its own sound for those left out
chat
chat?: string;A line of chat came. Silent when left out
chop
chop?: string;A worker's blow on what it gathers (a tree's, the chop event)
click
click?: string;An order was given
crit
crit?: string;When a hit lands a critical blow
defeat
defeat?: string;When the player loses
defs
defs?: Record<string, SoundDef>;How each sound is played, by its name, wherever it is played from (a unit's, an ability's, one standing on the map, a cinematic's): its volume, how much higher or lower each time, its reach and cutoff, its bus (campaign plan EQ9). What the game's sounds.json says is laid over it (SOUNDS_FILE, the editor's Sounds panel); each sound as what plays it asks when left out
error
error?: string;The game said no
footstep
footstep?: string;A footstep, for every unit whose type names none (EntitySounds.foot): sounded at each foot mark of the clip it walks with
hearing
hearing?: Hearing;How far the sounds of the game carry. A game seen from closer up hears less far
impact
impact?: string;A shot that hits an area comes down
late
late?: number;Seconds a sound fetched as it is first heard may start late; one later is skipped. 0.25 when left out
levelUp
levelUp?: string;When a hero gains a level
mix
mix?: MixerOptions;The game's own buses, the duck under a voice, a low-pass on pause, its snapshots (MixerOptions; in code, sounds.mixer)
music
music?: string[];Tracks in public/sounds/music, played one after the other
ping
ping?: string;A player of the side pinged the map. click when left out
preload
preload?: 'all' | readonly string[] | ((name: string) => boolean);The sounds loaded before the game starts: all of them ('all', when left out), those named, or those a function says yes to. The rest are fetched behind the game, a few at a time, and one heard before it is there is fetched then: played late, up to late seconds, or skipped
soundFor
soundFor?: SoundChooser;What an event sounds like, decided in code, over what the set declares: see SoundChooser
strikes
strikes?: Record<string, string>;When what an ability set off arrives: its missile hits, its star comes down. By the id of the ability
types
types?: Record<string, EntitySounds>;By the type of unit or building
unit
unit?: EntitySounds;For every unit
victory
victory?: string;When the player wins
work
work?: string;A worker builds or mends