(info) Most of the information here is for Warzone 3.1 and above.

audio.cfg

Defines audio looping, volume and range.

 

File format

An example of a customised audio.cfg is shown below:

audio_module
{
	/* audio format: audio [filename] [oneshot/loop] [volume 0-100] [range] */


/*sitrepmod*/
	audio	"sit-lasactiv.ogg"		oneshot 100 1800	/*Laser Satellite Activated*/
	audio	"sit-lascomp.ogg"		oneshot 100 1800	/*Laser Satellite Completed*/
	audio	"sit-cbcomp.ogg"		oneshot 100 1800	/*Counter Battery Radar Completed*/
	audio	"sit-batcomp.ogg"		oneshot 100 1800	/*Battery Completed*/
	audio	"sit-cmdatk.ogg"		oneshot 100 1800	/*Commander under attack*/
 
/* .... and lots of other audio files .... */
}

(warning) Do not modify the first two lines or last line in the file.

Text between /* and */ is a comment and does not get processed - it's just there for descriptive purposes.

The file uses a convention of grouping audio files together based on the folder they are in, with a comment at the start of each block saying what the folder name is (eg. "/* sitrepmod */" in the example above).

Properties

As you can see from the fist comment in the file, each line defines the following properties:

  • audio - this keyword must appear at the start of each line that defines audio file settings
  • filename - the file name of the audio file, enclosed in "quotes"
  • oneshot loop - most audio files are "oneshot" which means they play once and then stop.
  • volumne - a number between 0 and 100 defining the volume of the audio
  • range - ??? it's not clear what this is for - use 1800 as that is what everything else uses

An example of a looping audio file is bldloop.ogg - the sound made by construction droids when they are building:

	audio	"bldloop.ogg"	loop	 20 1800

Avoid using "loop" because it's not possible to stop looping sounds via the Javasrcipt API - they'd just play forever.

See also

  • audio.wrf - this defines the locations of audio files
  • Audio (Sound) – audio modding guides and directory of all audio supplied with Warzone
  • playSound() – JS API function to play an audio file
Define audio file locations in audio.wrf first.

File location

The "audio.cfg" that comes with Warzone can be found here:

base.wz or base

audio

audio.cfg

If you want an "audio.cfg" in your mod, it should be stored here:

 <your mod>.wz or <your mod>

 audio

audio.cfg

Availability

Warzone 3.1 and earlier, and possibly Warzone 3.2 and above (not checked 3.2 yet).