Hexen scripted ambient sounds

Hexen and its expansion set use ACS to manage ambient sounds in their map, using script 254.

Example script
These scripts are generally of this form:

script 254 OPEN {   int whichsound; delay(random(x, y) * 100); var = random(1, z); switch (whichsound) {       case 1: {           ambientsound("Ambient1(t, u));            break;            }        ...        case z:            {            ambientsound("Ambientz(v, w)); break; }       }    restart; } The values for t, u, v, w, x, y and z depend on the script.

Ambient sounds
Logical sound names are usually rather explicit, however some of them are identified only by a number. This table helps identify them.

Hexen
The ambient sound scripts in Hexen use a delay expressed in tics. There are 35 tics per seconds, so a maximum delay of 700 tics corresponds to a maximum delay of 20 seconds. The volume at which each ambient sound is on a scale of 0 to 127, so for example (50, 80) corresponds to between about 40% and 63% of full volume (rounding up). For concision, the random keyword is not explicitly written, so any bracketed pair of values in these table should be understood as being a random integral value between the two boundaries given, inclusively. Each sound is listed only as its logical name followed by its volume. Note that some sounds may be listed several time in a single script; this is how it was coded by the Raven Software level designers.

Deathkings of the Dark Citadel
The deathmatch maps in Deathkings do not feature ambient sounds.


 * &dagger; Ambient sounds are disabled in deathmatch mode in this map.