Author Topic: Sound.tbl VS .tbm  (Read 1252 times)

0 Members and 1 Guest are viewing this topic.

Alright, so I finally got around to adding some weapons to my campaign. However, the sound effect that's supposed to play along with it doesn't work with the .tbm file I've attached below. I believe I've isolated the problem to the .tbm file, since I can force the sound to play using the play-sound-from-file SEXP. The weapon table that uses the sound works (minus the sound).

Code: [Select]
#Game Sounds Start
$Name: 192 sound.ogg, 0, 0.80, 1, 2000, 3000
$Name: 193 smallexplosion1.ogg, 0, 0.80, 1, 500, 1000

#Game Sounds End

I looked at other mods to see what they did - It looks like they just outright replace the .tbl file with their own. When I tried adding the above entry to the appropriate section in the copied sound.tbl, I ended up generating 270 errors. I feel like I'm just missing something here. :nervous: Would anybody care to help me out?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Sounds tbms are quite new, so most mods probably just haven't used it yet.

The hard part is that the tbm has a different format than the old sounds.tbl. With the TBM, your entry should look like this.

Code: [Select]
$Name: SOMESTRING1
    +Filename: sound.ogg
    +Preload: no
    +Volume: 0.80
    +3D Sound:
        +Attenuation start: 2000
        +Attenuation end: 3000

$Name: SOMESTRING2
    +Filename: smallexplosion1.ogg
    +Preload: no
    +Volume: 0.80
    +3D Sound:
        +Attenuation start: 500
        +Attenuation end: 1000

With a tbm, you don't need to specify a number/sound index, you can just name the sound as a string and call it elsewhere with that.

Additional information about the sounds.tbl and sounds.tbm can be found on the Wiki. Hope that helps.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

  
That worked like a charm. Much thanks! :D