Skip to content

Content:Sound Definition File

dekarrin edited this page Feb 21, 2013 · 2 revisions

A Sound Definition File is a DEF file that maps sound indexes with sound files. Once defined, the sound indexes may be referred to from any field that requires a sound definition.

Every content pack contains at most one sound definition file. A content pack must include a sound definition file if it contains sound files that are to be referred to from other files in the content pack (that is to say, if it has sound files that are to be used at all). If a content pack is to include a sound definition file, it must list the path to it under the key SOUND_DEFS_FILE in its Content:Manifest File. It must also list the directory that images are stored in under the SOUND_DIR key in the manifest.

Each row maps one sound index to one key.

Row Format

Column Name Value Description
1 Index The index to map the sound file to.
2 File The sound file to be mapped. This path is relative to the path SOUND_DIR in the manifest.

Example File

"BUTTON_HIT",   "menu_click.mp3"
"BUTTON_HOVER", "menu_hover.mp3"

Provided Sounds

There are several index-to-file mappings provided by the built-in content pack. Note that the listed files are relative to the path listed under SOUND_DIR in the built-in manifest file.

All given sound indexes are used by the engine internally. External content packs can re-define the indexes, but there is no point in adding new indexes.

Index File
SFX_TEST slash.mp3
HIT strike.mp3
BUTTON_HIT menu_click.mp3
BUTTON_HOVER menu_hover.mp3