This page is incomplete! You can contribute information using GitHub issues or pull requests.

...

Structure and fields

FieldTypeComments
flagsbitfield
FlagMaskComments
fit to adpcm blocksize0x1
split long sound into permutations0x2
sound classenum

Determines the "type" of sound and how it is treated by the engine. For example, weapon sounds can wake sleeping Grunts and music volume can be adjusted independently. The engine is only capable of playing up to 4 sounds of a sound class simultaneously on high sound settings.

OptionValueComments
projectile impact0x0
projectile detonation0x1
unused0x2
unused10x3
weapon fire0x4
weapon ready0x5
weapon reload0x6
weapon empty0x7
weapon charge0x8
weapon overheat0x9
weapon idle0xA
unused20xB
unused30xC
object impacts0xD
particle impacts0xE
slow particle impacts0xF
unused40x10
unused50x11
unit footsteps0x12
unit dialog0x13
unused60x14
unused70x15
vehicle collision0x16
vehicle engine0x17
unused80x18
unused90x19
device door0x1A
device force field0x1B
device machinery0x1C
device nature0x1D
device computers0x1E
unused100x1F
music0x20
ambient nature0x21
ambient machinery0x22
ambient computers0x23
unused110x24
unused120x25
unused130x26
first person damage0x27
unused140x28
unused150x29
unused160x2A
unused170x2B
scripted dialog player0x2C
scripted effect0x2D
scripted dialog other0x2E
scripted dialog force unspatialized0x2F
unused180x30
unused190x31
game event0x32
sample rateenum
  • Read-only
OptionValueComments
22050 Hz0x0
44100 Hz0x1
minimum distancefloat
  • Unit: world units
maximum distancefloat
  • Unit: world units
skip fractionfloat
random pitch boundsBounds
  • Default: 1,1

This is the base playback rate of the sound, affecting tempo and pitch.

FieldTypeComments
minfloat
maxfloat
inner cone anglefloat
  • Default: 6.28318548202515
outer cone anglefloat
  • Default: 6.28318548202515
outer cone gainfloat
  • Default: 1
random gain modifierfloat
  • Default: 1
  • Max: 1
  • Min: 0

Warning: Legacy Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range.

maximum bend per secondfloat
zero skip fraction modifierfloat
zero gain modifierfloat
  • Max: 1
  • Min: 0

Warning: Legacy Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range.

zero pitch modifierfloat
one skip fraction modifierfloat
one gain modifierfloat
  • Max: 1
  • Min: 0

Warning: Legacy Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range.

one pitch modifierfloat
channel countenum
  • Read-only
OptionValueComments
mono0x0
stereo0x1
formatenum
  • Read-only
OptionValueComments
16-bit PCM0x0
Xbox ADPCM0x1
IMA ADPCM0x2
Ogg Vorbis0x3
FLAC0x4
promotion soundTagDependency: sound
promotion countuint16
longest permutation lengthuint32
  • Cache only
  • Hidden

natural pitch * seconds * 1100; not set if pitch modifier is set to anything besides 1; not accurate since increasing natural pitch decreases the length uses the 'buffer size' value for 16-bit PCM and Ogg Vorbis (divide by 2 * channel count to get sample count); uses entire size of samples for ADPCM (multiply by 130 / 36 * channel count to get sample count)

unknown ffffffff 0uint32
  • Cache only
unknown ffffffff 1uint32
  • Cache only
pitch rangesBlock
  • HEK max count: 8
  • Read-only
  • Processed during compile
FieldTypeComments
nameTagString
natural pitchfloat
  • Default: 1

This is the base pitch for this pitch range. When the pitch bend is equal to this, then the audio is played at normal pitch and speed. Note that 0 defaults to 1.

bend boundsBounds?

This is the minimum and maximum bend in which this pitch range will be used. If the lower bound is higher than natural pitch, then it will be set to natural pitch. Also, if the higher bound is lower than natural pitch, then it will be set to natural pitch.

actual permutation countuint16
  • Read-only

This is the number of actual permutations in the pitch range, not including chunks due to splitting.

playback ratefloat
  • Cache only
unknown ffffffff 0uint32
  • Cache only
unknown ffffffff 1uint32
  • Cache only
permutationsBlock
  • HEK max count: 256
  • Read-only
  • Processed during compile
FieldTypeComments
nameTagString
  • Read-only
skip fractionfloat
  • Min: 0
  • Max: 1
gainfloat
  • Min: 0
  • Max: 1
  • Default: 1
formatenum?
  • Read-only
next permutation indexuint16
  • Read-only
samples pointeruint32
  • Cache only
tag id 0uint32
  • Cache only

Set to the sound tag's tag ID

buffer sizeuint32
  • Read-only

this is the buffer size used to hold (and, for Vorbis, decompress) the 16-bit PCM data (unused in Xbox ADPCM)

tag id 1uint32
  • Cache only

Set to the sound tag's tag ID

samplesTagDataOffset
  • Read-only
FieldTypeComments
sizeuint32
externaluint32
file offsetuint32
pointerptr64
mouth dataTagDataOffset?
  • Read-only
subtitle dataTagDataOffset?
  • Read-only

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)