Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ================ Audio Events ================
- ==== EventVol.dat
- This file contains the volume for each audio event.
- The game has 45402 hard-coded audio events that ends up reproducing a serie of sounds, a looping sound or other behaviour... in other words, a hard-coded event.
- The file format is a dump of array of signed bytes:
- int8_t volume[45402]
- Some volume values on specific conditions tell something to the game instead of telling the actual volume.
- For example, if the script slot used to store a event is 1 or 2 and the event volume is -128 the volume will be tweaked to a proper level for voices (equal to 6 in the final game build).
- ==== Script audio events
- The first 1000 events (0-999) are reserved for the game hard-coding itself and the rest for script usage.
- The events 1000-45400 can be found in a human-readable-macro format at the file data/AudioEvents.txt
- The audio events between 1000-1799 are hard-coded events for scripts that can be used with the opcodes 097A, 097B, 09F1, 09F7.
- The audio events between 1800-1999 are used for bank loading from a script and should be used with the opcode 03CF
- The audio events between 2000-45400 are used to load sounds from the SCRIPT sfx pak file and should be used with the opcodes 03CF
- The algorithm used to find the bank and sound index at SCRIPT pak from the events 2000-45400 is as follow:
- ScriptBank = floor((Event - 2000) / 200); // On each range of 200 increase the bank by 1
- GlobalBank = ScriptBank + 147; // Apply offset to reach SCRIPT banks
- SoundIndex = (Event - 2000) % 200 // On each range of 200, the sound index restart from 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement