6648e2af5d044

6648e2af5d65b
1 Guest is here.
 

6648e2af5dab9Diego137

6648e2af5db2c
For instance, the pistol has three different 'firing' sound files. I've located the files - WAVs - and I know how to overwrite them with my own. However, is it possible for me to modify the game so that it plays one of four versions I've personally added to the archive rather than just the three? Thanks for any help.

6648e2af5dcffvoodoo47

6648e2af5dd53
again, sound schemas. avoid, if for nothing else then just for the fact that your mod would become incompatible with all gamesys mods.

6648e2af5df6aDiego137

6648e2af5dfc7
voodoo47
Oh, I see -- that's a shame. Oh well.  ¯\_(ツ)_/¯

6648e2af5e180Diego137

6648e2af5e1d0
voodoo47
Hey, for what it's worth, I managed to find a workaround. It's not perfect, but it will produce the same basic effect, and has nothing to do with sound schemas.  :thumb:

6648e2af5f071sarge945

6648e2af5f0d5
voodoo47
Hey, for what it's worth, I managed to find a workaround. It's not perfect, but it will produce the same basic effect, and has nothing to do with sound schemas.  :thumb:
You can't just say that and then not tell us what it is.

Having random sounds in SS2 without sound schemas would be BIG if true

6648e2af5f418CyberneticGeneral

6648e2af5f46f
sarge945
Hey. Sorry for missing your message - I posted this question as a guest before I registered. No, it's nothing that special. It just involves replacing the ambience files with custom sound effect tracks that the game automatically loops. It's not exactly 'randomized', since restarting a save will automatically restart the sound effect track loop, but it suits my purpose.
« Last Edit: 20. June 2023, 14:17:47 by CyberneticGeneral »

6648e2af5f6f4dp_flint

6648e2af5f755
voodoo47
Why? Is there some kind of limitation? Could you explain in details about it?

6648e2af5f805voodoo47

6648e2af5f858
yes, around 256 max schemas. that is not a lot.

6648e2af5fc2dZylonBane

6648e2af5fc8f
Dark Engine games can't play arbitrary WAV files. All sounds are wrapped in data structures called schemas. Schemas describe a concept instead of a specific sound. Schema definitions include a sound's volume, looping behavior, left/right panning, whether it alerts AIs and how much, and lists of WAV files that can be randomly selected from, among other things.
Code: [Select]
schema fire_pistol_std
archetype WEAPON_FIRE
volume -100
f_pist1 f_pist2 f_pist3
env_tag (Event Shoot) (WeaponType Pistol) (AmmoType Std) (WeaponMode 0 1)

schema exp_std
archetype EXPLO_SCH
expstd1 expstd2 expstd3
env_tag (Event Create) (ExplosionType ExpStd)

schema elec_sparks
archetype AMB_SCH
volume -500
poly_loop 2 1500 1900
elecspk1 elecspk2 elecspk3 elecspk4 elecspk5 elecspk6
With this, the engine can request a high-level concept like "big_robot_explosion", and the schema definition will take care of the low-level details. It's all very object-oriented.

The downside is that the sound schemas are baked directly into the gamesys. The gamesys is the file that ends with ".gam". It's a big binary blob that contains the data for how every object in the game behaves. While most object properties can be modified at runtime via scripts and DMLs, the sound schema system is a highly complex metadata tag soup, so sound schemas can only be added, removed, and modified using DromEd, the editor.

So the only way to make a mod that uses custom schemas would be to use a custom gamesys, which would make the mod incompatible with all other mods that use a custom gamesys. That's why minor mods don't use a custom gamesys.

yes, around 256 max schemas. that is not a lot.
You can have thousands of schemas. The 256 limit is on concept tags. Surface types, AI types, weapon types, gizmo types, etc.

6648e2af5fd48voodoo47

6648e2af5fd97
knew there was a 8bit limit on something.

anyway, the most important part of the message has been conveyed - don't touch the sound schemas unless there is no other option. to make it short, gamesys mods and fan missions only.
« Last Edit: 21. June 2023, 20:33:32 by voodoo47 »

6648e2af5fe8bZylonBane

6648e2af5fee3
Probably the 8-bit limit is because it has to basically do realtime database queries every time a sound is played. SELECT * FROM sounds WHERE event == "shoot" AND weaponType == "pistol" AND ammoType == "std" AND weaponMode == ("0" OR "1"). I imagine they really optimized this by limiting things to a single 256-entry table.

The env_tag system is kind of similar to CSS, now that I think about it, where higher-specificity schemas take precedence over lower-specificity ones.

Your name:
This box must be left blank:

Replicator restrictions are in place for the good of whom?:
1 Guest is here.
The astronauts were allowed a small amount of personal material, subject to weight restrictions.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6648e2af5fff5