Modding, Mission Design, and Coding > FS2 Open Coding - The Source Code Project (SCP)

Sound modularity (departure from sounds.tbl)

(1/3) > >>

TrashMan:
Most things in SCP are highly modular.

I can make a ship and supply a -shp.tbm file and anyone can just drag and drop it (+ models and maps) into any active mod and it will work.
If it uses custom weapons, make a -wpn.tbm and drop hat in and it will work.
Custom weapon effects? Supply them, drag and drop!

But not with sounds. Sounds are cumbersome, since you constantly have to reference the numerical ID instead of actual file names AND because you have a singular file that is not conductive to multiple mods.

I suggests that one can reference sounds directly by name as well as by sounds.tbl ID (for backwards compability).

For example, I can say
$LaunchSnd:                             93

OR

$LaunchSnd:       "trp_photon_muzzle.wav"


This not only makes the entire system more modular, but also makes modding easier, since you don't have to do cross-references with the sounds.tbl, and is easier to read a a glance.

m!m:
Everything you described is already possible :nervous:

The wiki article has documentation for all the features but if you use one of the two new sound entry formats you can assign an arbitrary name to a sound entry and then reference the sound with that name. The reason you can't just put the file name in the tables is that the file name alone is not enough information for a full sound entry.

TrashMan:

--- Quote from: m!m on December 30, 2017, 05:27:49 am ---Everything you described is already possible :nervous:

The wiki article has documentation for all the features but if you use one of the two new sound entry formats you can assign an arbitrary name to a sound entry and then reference the sound with that name. The reason you can't just put the file name in the tables is that the file name alone is not enough information for a full sound entry.

--- End quote ---

So?
Set other values to defaults.

m!m:
In most cases there are no "default" values. For example, some times you need a 3D sound and some times you need a 2D sound. In your example which uses $LaunchSnd a 3D sound would be appropriate but in the case of a HUD sound a 2D sound is needed (which can then contain stereo sound). FSO cannot determine at the point at which the sound file name is parsed if the sound should be a 2D or 3D sound except if a preference would be hard-coded into the parser code and I am strongly opposed to that since it would require a lot of work for practically no benefit.

TrashMan:
Then add that value in too

$LaunchSnd:       "trp_photon_muzzle.wav"
+3DSound:          YES

Navigation

[0] Message Index

[#] Next page

Go to full version