Advertisement
thelink2012

EventVol.txt

Jan 27th, 2014
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. ================ Audio Events ================
  2.  
  3. ==== EventVol.dat
  4.  
  5. This file contains the volume for each audio event.
  6. 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.
  7.  
  8. The file format is a dump of array of signed bytes:
  9. int8_t volume[45402]
  10.  
  11. Some volume values on specific conditions tell something to the game instead of telling the actual volume.
  12. 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).
  13.  
  14. ==== Script audio events
  15.  
  16. The first 1000 events (0-999) are reserved for the game hard-coding itself and the rest for script usage.
  17. The events 1000-45400 can be found in a human-readable-macro format at the file data/AudioEvents.txt
  18.  
  19. The audio events between 1000-1799 are hard-coded events for scripts that can be used with the opcodes 097A, 097B, 09F1, 09F7.
  20. The audio events between 1800-1999 are used for bank loading from a script and should be used with the opcode 03CF
  21. 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
  22.  
  23. The algorithm used to find the bank and sound index at SCRIPT pak from the events 2000-45400 is as follow:
  24. ScriptBank = floor((Event - 2000) / 200); // On each range of 200 increase the bank by 1
  25. GlobalBank = ScriptBank + 147; // Apply offset to reach SCRIPT banks
  26. 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