Genie sound data

From GenieWiki

Jump to: navigation, search

Like the graphic data, objects that use sounds (such as units) do not directly access the sound resources from the DRS file. Instead, the main datafile contains sound "slots" or indexes used by the units that in turn access the sound resources themselves. Ensemble Studios most likely set Genie up this way to make different sounds associated with the same action. An example is selecting a horse unit, one out of a possible three sounds will play.

Here is the C-style structure used for the sounds:

struct genie_sound
{
	long id;
	short item_count;
	long unknown1;	//always 300000
};

struct genie_sounditem
{
	char filename[13];
	long id_resource;
	short probability, civ, unknown2;
};

The genie_sounditems structures directly follow the genie_sound structures.

Contents

id

The identifying number used throughout the rest of the datafile.

filename

The filename of the Wave file referenced by the item. MP3 playback might be possible, but has not been tested yet.

id_resource

The resource ID of the sound file in the DRS file.

probability

The probability out of 100 that this item will be played. Naturally, the acceptable range for this value is 1-100.

Personal tools