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

audio.wrf

Before an audio file can be used in the game, it's location must be defined in the audio.wrf file.

 

File format

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

/***********************************************************/
/*  You may have to modify this file for it to be correct! */ 
/*******************    WRF\audio.wrf    *******************/
directory	"audio/sitrepmod"
file		WAV	"sit-lasactiv.ogg"
file		WAV	"sit-lascomp.ogg"
file		WAV	"sit-cbcomp.ogg"
file		WAV	"sit-batcomp.ogg"
file		WAV	"sit-cmdatk.ogg"
directory	"audio/memressp/desnseq"
file		WAV	"pcv331.ogg"
file		WAV	"pcv332.ogg"


/* .... then lots more .... */
 
directory	"audio"
file		AUDIOCFG	"audio.cfg"

(warning) Do not modify the last two lines in this file, they define where audio.cfg is located.

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. You can see examples on the "directory" lines above.

Properties

The first word on each line defines what sort of data the line represents.

directory

A 'directory' line specifies a the relative path, from the .wz file or your mod folder, to the audio files that follow.

For example:

 

directory	"audio/sitrepmod"

There should be a tab character between 'directory' and the folder path. The folder path must be enclosed in quotes.

file

A 'file' line specfies a file type and file name.

The file name must exist within the folder specified by the first 'directory' line found above the 'file' line.

For example:

file		WAV	"sit-batcomp.ogg"

This indicates that there is a WAVe (audio) file called "sit-batcomp.ogg" in the "audio/sitrepmod" folder.

See also

  • audio.cfg - this defines the volume and other settings for each audio file
  • Audio (Sound) – audio modding guides and directory of all audio supplied with Warzone
  • playSound() – JS API function to play an audio file
You also need to update audio.cfg.

File location

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

base.wz or base

wrf

audio.wrf

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

 <your mod>.wz or <your mod>

 wrf

audio.wrf

Availability

Warzone 3.1 and earlier.

I've not checked v3.2 yet.