Music and sounds

From Unvanquished
Jump to: navigation, search

Overview

TODO

Licensing

The following licenses are suitable for music and sounds:

Configuration files

Buildables

There are 14 animations per buildable type: construct1, construct2, idle1, idle2, idle3, attack1, attack2, spawn1, spawn2, pain1, pain2, destroy1, destroy2, and destroyed. Each buildable type has a sound configuration file, located at sound/buildables/<buildable_type>/sound.cfg, that describes 2 properties for each buildable animation:

  • whether the buildable animation has an associated sound, and
  • whether the sound is to be played in a loop.

Such a file should contain a 1 for a yes answer and a 0 for a no answer, for the above 2 questions, in the given order, and for each buildable animation, in the above given order. Technically, this means that the file should contain 28 integers (2 per animation). However, by convention, 1 line is used for each animation, and comments are added for guidance about which animation a pair of numbers refers to.

So each line in a buildable sound configuration file is formatted as follows:

<has_sound> <loop> //<filename>

This is an sound configuration file example for a buildable:

1 0 //construct1.wav
0 0 //construct2.wav
1 1 //idle1.wav
0 0 //idle2.wav
0 0 //idle3.wav
0 0 //attack1.wav
0 0 //attack2.wav
0 0 //spawn1.wav
0 0 //spawn2.wav
0 0 //pain1.wav
0 0 //pain2.wav
1 0 //destroy1.wav
1 0 //destroy2.wav
0 0 //destroyed.wav

Do not reorder the lines because it's how the game knows what is what. The comments are for humans only!

Sound filenames

The structure cg_customSoundNames in src/gamelogic/gpp/src/cgame/cg_players.c contains a list of some sounds.