ConstPosts one of the game's sound events by name through the game's AudioSystem.Play: the
game plays it through its own mix, with the event's own logic (variations, effects). The
game must know the name; an unknown one plays nothing.
By default the event plays on V, so a positional sound (footsteps, a weapon, a door) is
heard where the player stands. { on: "none" } posts it with no entity, as the game
plays UI sounds. Some events loop until stopped: call stop() on what this returns.
Experimental (Sound Tools): its shape may change.
The sound ids of an event's recordings (its variations), by its name or Wwise id, from
the game's sound index: what audio.playGame picks from with { event }. Empty
for a stop event, or one whose sound lives in a Wwise bank.
Experimental (Sound Tools): its shape may change.
Plays a sound: an id from the manifest's "sounds", a file's path in your
package's folder, or (REDnode 0.44.0 or later) a full path in your package's data
folder, pkg.dataDir, for sounds made while the package runs, such as spoken lines.
Resolves once the engine has it, with a Sound; the file loads in the
background and starts as soon as it is ready. The file is read at each play, so a
file written again plays its new sound.
Optionaloptions: PlayOptionsPlays one of the game's own sound effects through REDnode's engine like a file of your
package: the raw recording, without the game's effects or position, so you hear it
wherever the sound happens in the game. The game's archives store it as Opus; it is
decoded on first use. An archive in archive/pc/mod that carries the sound index wins
over the game's own, so a hot-swapped sound plays its new version.
Give a sound id (one variation, as the game's sfx_container.opusinfo lists it), or
{ event } with an event's name or Wwise id to play one of that event's recordings:
variation (from 0) picks one, otherwise they come in turn. Stop events, and events
whose sound lives in a Wwise bank, have no recordings there and reject.
Experimental (Sound Tools): its shape may change.
Optionaloptions: PlayOptionsYour package's sounds that are loading or playing.
Searches the game's sound events: words of a name (all must appear in the event's name
or tags, in any order), an event id, or a sound id (the events that play that
recording). The catalogue holds every event the game's sound index has recordings for
and every event REDbridge's list names (WolvenKit's, game 1.6); names arrive a few
seconds after the first search while REDbridge starts, so names says "loading"
until then, and "none" without REDbridge, when only ids match.
Experimental (Sound Tools, SP3): its shape may change.
Stops every sound of your package, fading out over fadeOut milliseconds.
Optionaloptions: { fadeOut?: number }Listens to the game's sounds: onTrace gets, about ten times a second, the events the
game posted to its audio engine (Wwise) and the sounds it loaded. Resolves once the trace
runs, with a function that stops it. The trace also stops when your package stops.
Experimental (Sound Tools, SP1): its shape may change.
Sound for packages: play your own audio files in the game.