Skip to content

SoundSet beta ​

Interface of @v12-engine/client

ts
export interface SoundSet

The sounds of a game: what each unit, building and ability sounds like, and the music and the ambience

Members ​

abilities ​

ts
abilities?: Record<string, string>;

When an ability goes off, by its id. cast for those left out

alert ​

ts
alert?: string;

Something of the player's is under attack where they are not looking (see GameView.hud.alertFor). error when left out

ambience ​

ts
ambience?: string[];

Sounds in the background, all at once and over and over: wind, birds. Each one file, made to loop

bounty ​

ts
bounty?: string;

Gold for a kill

building ​

ts
building?: EntitySounds;

For every building

cast ​

ts
cast?: string;

An ability goes off that has no sound of its own. Silence when left out, as for each of these

charged ​

ts
charged?: Record<string, string>;

When an ability goes off charged (see AbilityDef.charge), by its id. Its own sound for those left out

chat ​

ts
chat?: string;

A line of chat came. Silent when left out

chop ​

ts
chop?: string;

A worker's blow on what it gathers (a tree's, the chop event)

click ​

ts
click?: string;

An order was given

crit ​

ts
crit?: string;

When a hit lands a critical blow

defeat ​

ts
defeat?: string;

When the player loses

defs ​

ts
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 ​

ts
error?: string;

The game said no

footstep ​

ts
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 ​

ts
hearing?: Hearing;

How far the sounds of the game carry. A game seen from closer up hears less far

impact ​

ts
impact?: string;

A shot that hits an area comes down

late ​

ts
late?: number;

Seconds a sound fetched as it is first heard may start late; one later is skipped. 0.25 when left out

levelUp ​

ts
levelUp?: string;

When a hero gains a level

mix ​

ts
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 ​

ts
music?: string[];

Tracks in public/sounds/music, played one after the other

ping ​

ts
ping?: string;

A player of the side pinged the map. click when left out

preload ​

ts
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 ​

ts
soundFor?: SoundChooser;

What an event sounds like, decided in code, over what the set declares: see SoundChooser

strikes ​

ts
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 ​

ts
types?: Record<string, EntitySounds>;

By the type of unit or building

unit ​

ts
unit?: EntitySounds;

For every unit

victory ​

ts
victory?: string;

When the player wins

work ​

ts
work?: string;

A worker builds or mends