This page needs help! Please submit any missing information via GitHub issues or pull requests.

...

Structure and fields

Field Type Comments
flags bitfield
Flag Mask Comments
fit to adpcm blocksize 0x1
split long sound into permutations 0x2
sound class enum

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.

Option Value Comments
projectile impact 0x0
projectile detonation 0x1
unused 0x2
unused1 0x3
weapon fire 0x4
weapon ready 0x5
weapon reload 0x6
weapon empty 0x7
weapon charge 0x8
weapon overheat 0x9
weapon idle 0xA
unused2 0xB
unused3 0xC
object impacts 0xD
particle impacts 0xE
slow particle impacts 0xF
unused4 0x10
unused5 0x11
unit footsteps 0x12
unit dialog 0x13
unused6 0x14
unused7 0x15
vehicle collision 0x16
vehicle engine 0x17
unused8 0x18
unused9 0x19
device door 0x1A
device force field 0x1B
device machinery 0x1C
device nature 0x1D
device computers 0x1E
unused10 0x1F
music 0x20
ambient nature 0x21
ambient machinery 0x22
ambient computers 0x23
unused11 0x24
unused12 0x25
unused13 0x26
first person damage 0x27
unused14 0x28
unused15 0x29
unused16 0x2A
unused17 0x2B
scripted dialog player 0x2C
scripted effect 0x2D
scripted dialog other 0x2E
scripted dialog force unspatialized 0x2F
unused18 0x30
unused19 0x31
game event 0x32
sample rate enum
  • Read-only
Option Value Comments
22050 Hz 0x0
44100 Hz 0x1
minimum distance float
  • Unit: world units
maximum distance float
  • Unit: world units
skip fraction float
random pitch bounds Bounds
  • Default: 1,1

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

Field Type Comments
min float
max float
inner cone angle float
  • Default: 6.28318548202515
outer cone angle float
  • Default: 6.28318548202515
outer cone gain float
  • Default: 1
random gain modifier float
  • 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 second float
zero skip fraction modifier float
zero gain modifier float
  • 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 modifier float
one skip fraction modifier float
one gain modifier float
  • 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 modifier float
channel count enum
  • Read-only
Option Value Comments
mono 0x0
stereo 0x1
format enum
  • Read-only
Option Value Comments
16-bit PCM 0x0
Xbox ADPCM 0x1
IMA ADPCM 0x2
Ogg Vorbis 0x3
FLAC 0x4
promotion sound

TagDependency: sound

promotion count uint16
longest permutation length uint32
  • 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 0 uint32
  • Cache only
unknown ffffffff 1 uint32
  • Cache only
pitch ranges Block
  • HEK max count: 8
  • Read-only
  • Processed during compile
Field Type Comments
name TagString
Field Type Comments
buffer char[32]

Null-terminated string in 32-char buffer.

natural pitch float
  • 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 bounds Bounds?

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 count uint16
  • Read-only

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

playback rate float
  • Cache only
unknown ffffffff 0 uint32
  • Cache only
unknown ffffffff 1 uint32
  • Cache only
permutations Block
  • HEK max count: 256
  • Read-only
  • Processed during compile
Field Type Comments
name TagString?
  • Read-only
skip fraction float
  • Min: 0
  • Max: 1
gain float
  • Min: 0
  • Max: 1
  • Default: 1
format enum?
  • Read-only
next permutation index uint16
  • Read-only
samples pointer uint32
  • Cache only
tag id 0 uint32
  • Cache only

Set to the sound tag's tag ID

buffer size uint32
  • 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 1 uint32
  • Cache only

Set to the sound tag's tag ID

samples TagDataOffset
  • Read-only
Field Type Comments
size uint32
external uint32
file offset uint32
pointer ptr64
mouth data TagDataOffset?
  • Read-only
subtitle data TagDataOffset?
  • Read-only

Acknowledgements

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

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