PDA

View Full Version : sh3.sdl and DSD files demystified and explained


TheDarkWraith
11-07-07, 12:19 PM
What is the purpose of Sh3.sdl you may ask. Where is it located? What are DSD files are what are their purpose?
Sh3.sdl is the sound mixer or master sound controller as I refer to it. It appears currently that only one *.sdl file is used by the game (which now sparks something I have to try :hmm: - an idea just hit me) and that file is Sh3.sdl. It is located in \data\Sound. Why is this file needed? Any sound used by the game must be registered. The game needs to know it's alias, the actual soundfile, and some settings that go with it. I will explain what those settings are, or will attempt to at least.

Let's look at one entry in the Sh3.sdl file. This one is for the torpedo tube opening sound:

0000C08A 26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
0000C09A 18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..
0000C0EA 06 00 00 00 4C 6F 6F 70 00 00 06 00 00 00 50 6C ....Loop......Pl
0000C0FA 61 79 00 00 0B 00 00 00 56 6F 6C 75 6D 65 00 00 ay......Volume..
0000C10A 00 C2 42 0E 00 00 00 56 6F 6C 75 6D 65 56 61 72 ..B....VolumeVar
0000C11A 00 00 00 00 00 0A 00 00 00 50 69 74 63 68 00 00 .........Pitch..
0000C12A 00 80 3F 0D 00 00 00 50 69 74 63 68 56 61 72 00 ..?....PitchVar.
0000C13A 00 00 00 00 06 00 00 00 49 73 33 44 00 01 12 00 ........Is3D....
0000C14A 00 00 44 6F 70 70 6C 65 72 46 61 63 74 6F 72 00 ..DopplerFactor.
0000C15A 00 00 00 00 0E 00 00 00 4D 69 6E 52 61 64 69 75 ........MinRadiu
0000C16A 73 00 00 00 A0 40 0E 00 00 00 4D 61 78 52 61 64 s....@....MaxRad
0000C17A 69 75 73 00 00 00 C8 42 0D 00 00 00 43 61 74 65 ius....B....Cate
0000C18A 67 6F 72 79 00 04 00 00 00 0D 00 00 00 50 72 69 gory.........Pri
0000C19A 6F 72 69 74 79 00 80 00 00 00 0A 00 00 00 44 65 ority.........De
0000C1AA 6C 61 79 00 00 00 00 00 lay.....

Looks scary huh? Really, it's very simple. Let's break it down:

26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..
06 00 00 00 4C 6F 6F 70 00 00 06 00 00 00 50 6C ....Loop......Pl
61 79 00 00 0B 00 00 00 56 6F 6C 75 6D 65 00 00 ay......Volume..
00 C2 42 0E 00 00 00 56 6F 6C 75 6D 65 56 61 72 ..B....VolumeVar
00 00 00 00 00 0A 00 00 00 50 69 74 63 68 00 00 .........Pitch..
00 80 3F 0D 00 00 00 50 69 74 63 68 56 61 72 00 ..?....PitchVar.
00 00 00 00 06 00 00 00 49 73 33 44 00 01 12 00 ........Is3D....
00 00 44 6F 70 70 6C 65 72 46 61 63 74 6F 72 00 ..DopplerFactor.
00 00 00 00 0E 00 00 00 4D 69 6E 52 61 64 69 75 ........MinRadiu
73 00 00 00 A0 40 0E 00 00 00 4D 61 78 52 61 64 s....@....MaxRad
69 75 73 00 00 00 C8 42 0D 00 00 00 43 61 74 65 ius....B....Cate
67 6F 72 79 00 04 00 00 00 0D 00 00 00 50 72 69 gory.........Pri
6F 72 69 74 79 00 80 00 00 00 0A 00 00 00 44 65 ority.........De
6C 61 79 00 00 00 00 00 lay.....

26 01 this is the size of this entry. If I were to select all the yellow highlighted in a hex editor the size of this yellow highlight would be 0126h bytes. This tells the game here is the size of my next entry and it contains everything you need to know about the sound I want to add and use. Because the memory model is Intel-hex like you have to read values and hex entries from right to left.

26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..
06 00 00 00 4C 6F 6F 70 00 00 06 00 00 00 50 6C ....Loop......Pl
61 79 00 00 0B 00 00 00 56 6F 6C 75 6D 65 00 00 ay......Volume..
00 C2 42 0E 00 00 00 56 6F 6C 75 6D 65 56 61 72 ..B....VolumeVar
00 00 00 00 00 0A 00 00 00 50 69 74 63 68 00 00 .........Pitch..
00 80 3F 0D 00 00 00 50 69 74 63 68 56 61 72 00 ..?....PitchVar.
00 00 00 00 06 00 00 00 49 73 33 44 00 01 12 00 ........Is3D....
00 00 44 6F 70 70 6C 65 72 46 61 63 74 6F 72 00 ..DopplerFactor.
00 00 00 00 0E 00 00 00 4D 69 6E 52 61 64 69 75 ........MinRadiu
73 00 00 00 A0 40 0E 00 00 00 4D 61 78 52 61 64 s....@....MaxRad
69 75 73 00 00 00 C8 42 0D 00 00 00 43 61 74 65 ius....B....Cate
67 6F 72 79 00 04 00 00 00 0D 00 00 00 50 72 69 gory.........Pri
6F 72 69 74 79 00 80 00 00 00 0A 00 00 00 44 65 ority.........De
6C 61 79 00 00 00 00 00 lay.....

22 01 00 00 this is the start of the 'record' as I call it and defines the size of the record. This says everything contained inside this value pertains to the new entry. The size of this record is 00000122h bytes (notice it's 4 bytes less from the first - this will ALWAYS be the case). This 'record' is called SoundInfo. This lets the game now we want to introduce a new sound to it to use. SoundInfo is hard coded in the game, to the game it means here is a new sound the user wants to use. Everything after this describes the new SoundInfo.

0000C08A 26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
0000C09A 18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..
0000C0EA 06 00 00 00 4C 6F 6F 70 00 00 06 00 00 00 50 6C ....Loop......Pl
0000C0FA 61 79 00 00 0B 00 00 00 56 6F 6C 75 6D 65 00 00 ay......Volume..
0000C10A 00 C2 42 0E 00 00 00 56 6F 6C 75 6D 65 56 61 72 ..B....VolumeVar
0000C11A 00 00 00 00 00 0A 00 00 00 50 69 74 63 68 00 00 .........Pitch..
0000C12A 00 80 3F 0D 00 00 00 50 69 74 63 68 56 61 72 00 ..?....PitchVar.
0000C13A 00 00 00 00 06 00 00 00 49 73 33 44 00 01 12 00 ........Is3D....
0000C14A 00 00 44 6F 70 70 6C 65 72 46 61 63 74 6F 72 00 ..DopplerFactor.
0000C15A 00 00 00 00 0E 00 00 00 4D 69 6E 52 61 64 69 75 ........MinRadiu
0000C16A 73 00 00 00 A0 40 0E 00 00 00 4D 61 78 52 61 64 s....@....MaxRad
0000C17A 69 75 73 00 00 00 C8 42 0D 00 00 00 43 61 74 65 ius....B....Cate
0000C18A 67 6F 72 79 00 04 00 00 00 0D 00 00 00 50 72 69 gory.........Pri
0000C19A 6F 72 69 74 79 00 80 00 00 00 0A 00 00 00 44 65 ority.........De
0000C1AA 6C 61 79 00 00 00 00 00 lay.....

00 these are null termination characters. They signify the end of a string. If you are familiar with C programming then you know exactly what I mean. Anytime there is a string (a string is a name or characters used to define something) you will have a null termination character following it.

Now the game needs to know how to read the record. The record contains 'fields' sort of like a database is arranged. It does this by first having the file define a size for the 'field', a descriptor for the field, and then any values needed for the field. Let's look at an example of this:

0000C08A 26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
0000C09A 18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..

18 00 00 00 is the size of this field
4E 61 6D 65 00 53 75 62 6D 61 72 69 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 are the contents of this field

0000C08A 26 01 22 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
0000C09A 18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari
0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..

4E 61 6D 65 is the descriptor for this field which is 'Name'. This is hardcoded and is required by the game.
00 is the null termination character
53 75 62 6D 61 72 69 6E 65 2E 54 6F 72 70 44 6F 6F 72 is the alias, or name, you are going to call your new sound entry. This is the data for the descriptor. There is a caveat to this but it deals with ambients and all which is not important currently. We are telling the game that we are going to call and refer to our new sound entry as 'Submarine.TorpDoor'. This is kind of a poor example because Submarine tells the game it deals with submarines and TorpDoor says it deals with the torp doors on the submarines. You could've called this 'my new sound' if you wanted to.
00 is the null termination character

0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..

22 00 00 00 is the size of the next field
57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F
20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61
76 00 are the contents of this next field

0000C0AA 6E 65 2E 54 6F 72 70 44 6F 6F 72 00 22 00 00 00 ne.TorpDoor."...
0000C0BA 57 61 76 65 4E 61 6D 65 00 54 6F 72 70 65 64 6F WaveName.Torpedo
0000C0CA 20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61 tube opening.wa
0000C0DA 76 00 0A 00 00 00 49 73 46 6F 6C 64 65 72 00 00 v.....IsFolder..

57 61 76 65 4E 61 6D 65 is the descriptor for this field, which is WaveName. This is hardcoded and is required. This descriptor informs the game of the actual name of your soundfile.
00 is null termination character
54 6F 72 70 65 64 6F
20 74 75 62 65 20 6F 70 65 6E 69 6E 67 2E 77 61
76 is the data for the descriptor. Since the descriptor was WaveName the game is looking for the actual filename for this new sound. We are telling the game that the new filename is 'Torpedo tube opening.wav'
00 is the null termination character.

so let's say you want to change the field 'Name' data above from 'Submarine.TorpDoor' to 'My_New_Sound'. How would we do this? First we have to determine the total length of the new field with this change. So if we edit the hex file with the new name we get:

0000C090 53 6F 75 6E 64 49 6E 66 6F 00 18 00 00 00 4E 61 SoundInfo.....Na
0000C0A0 6D 65 00 4D 79 5F 4E 65 77 5F 53 6F 75 6E 64 00 me.My_New_Sound.
0000C0B0 22 00 00 00 57 61 76 65 4E 61 6D 65 00 54 6F 72 "...WaveName.Tor

the yellow highlight is the new name we want the game to use for our new sound. This is all fine and dandy but the game will not use it. Why? Because the length of the field is incorrect! We have to recalculate the length.

0000C090 53 6F 75 6E 64 49 6E 66 6F 00 18 00 00 00 4E 61 SoundInfo.....Na
0000C0A0 6D 65 00 4D 79 5F 4E 65 77 5F 53 6F 75 6E 64 00 me.My_New_Sound.
0000C0B0 22 00 00 00 57 61 76 65 4E 61 6D 65 00 54 6F 72 "...WaveName.Tor

We have to take into account the entire field, the decriptor and it's data, which is everything highlighted in yellow above. The total bytes highlighted above is 12h bytes (which is 18 bytes decimal). So that 18 00 00 00 right before the yellow highlight has to be changed to 12 00 00 00. Now since we changed the total length of the record by 6h bytes we have to go back to the beginning of the record and subtract 6h bytes from the two leading values. So the beginning of the record would now read:

0000C08A 20 01 1C 01 00 00 53 6F 75 6E 64 49 6E 66 6F 00 &."...SoundInfo.
0000C09A 18 00 00 00 4E 61 6D 65 00 53 75 62 6D 61 72 69 ....Name.Submari

Now the game will refer and we'll be able to refer to this new sound as 'My_New_Sound'. You will still not be able to hear it though as changes need to be made to the DSD file where this sound is used! Here is what it looks like correctly:

0000C090 53 6F 75 6E 64 49 6E 66 6F 00 12 00 00 00 4E 61 SoundInfo.....Na
0000C0A0 6D 65 00 4D 79 5F 4E 65 77 5F 53 6F 75 6E 64 00 me.My_New_Sound.
0000C0B0 22 00 00 00 57 61 76 65 4E 61 6D 65 00 54 6F 72 "...WaveName.Tor

You would do the same thing for 'WaveName' if you wanted to change it.

so to recap, the fields in this record follow this pattern:

xx xx xx xx yyyyyyyyyyy zzzzzzzzzzzzzzzzzz

x = the size of the field
y = the descriptor name
z = the data for the descriptor

let's talk about the remaining entries in this record.

IsFolder - possible values are 00 or 01. This denotes whether the sounds are contained in a folder. You will probably never make a new entry using 01 as a value.
Loop - possible values are 00 or 01. If this value is 01 then when the sound is called for it will continuously loop (while the object or event is active). If value is 00 then the sound will be played and then stop.
Play - this one is tricky. Possible values are 00 or 01. With a value of 01 it means the sound will be played, a value of 00 means it won't be played. This applies to sounds for above water. Once you start playing with underwater sounds it's different.
Volume - this is a float32 value. Range is from 0 to 100
VolumeVar - this is a float32 value. Adds randomness to volume. I believe possibly values are 0 to 1 (this would equate to 0% to 100% - so a value of .5 (which would be 0000003Fh) would be 50%
Pitch - this is a float32 value. Should be same as above as far as values.
PitchVar - this is a float32 value. Should be same as above as far as values. Adds randomness to pitch.
Is3D - is the sound to be modeled as 3D? Possible values are 00 or 01. For above water sounds you can have 00 or 01 as value. For underwater sounds you need to use 00 for the value.
DopplerFactor - this is a float32 value. Possible values are same as mentioned in VolumeVar. The best way to describe what this does is listen to the airplanes as they approach your ship. Notice how the sound changes as they approach you, fly over you, and depart.
MinRadius - a float32 value. From my testing this appears to be the radius (in meters) from the sound source where the volume of the sound doesn't diminish in strength. After this radius it starts to diminish in strength to maxradius.
MaxRadius - a float32 value. From my testing this appears to be the radius (in meters) from the sound source where the volume of the sound is 0 (can't be heard).
Category - possible values are 00,01,02,03,04,05,06,07,08, and 09. These correspond to:

MUSIC = 0
MENU = 1
AMBIENT = 2
SPEECH = 3
FXMAIN = 4
FXSECONDARY = 5
FX3 = 6
FX4 = 7
FX5 = 8
FX6 = 9
Priority - only seen possible values of 01, 80 with 01 being the highest priority
Delay - this is a float32 value. This value will determine the time in seconds to wait before playing the sound when it's asked for.

Well that sums up the .sdl file.

Samwolf
11-07-07, 12:29 PM
Just what I've been trying to understand. Did some real basic editing of this file but didn't know about the relationship to the .dsd file. Thanks. Now i can try and get the depth charge firing sound to be different from the deck gun sound.

Thanks.

onelifecrisis
11-07-07, 12:31 PM
TOP STUFF! :rock:

Thanks mate :D

TheDarkWraith
11-07-07, 12:33 PM
Just what I've been trying to understand. Did some real basic editing of this file but didn't know about the relationship to the .dsd file. Thanks. Now i can try and get the depth charge firing sound to be different from the deck gun sound.

Thanks.

there is more to come. When I return from lunch and over the next couple of days I will break down the sdl file and DSD files and explain how they relate to one another :yep:

Myxale
11-07-07, 01:00 PM
Holy crap RB that modding stuff got you bad! Are you still human!;)

TheDarkWraith
11-07-07, 01:56 PM
Holy crap RB that modding stuff got you bad! Are you still human!;)

that's just the tip of the iceberg and only one of the files and none of the controllers or anything else :doh:

Wolfehunter
11-07-07, 04:04 PM
Hmmm I think I'm starting to see what you see Racerboy. Thanks for that. I now know what to do.:up: I will wait for more of your education. I still need more to digest and savour the flavour.:yep:

Rubini
11-07-07, 04:39 PM
Thanks RB for the tip.

Let's say that I just cloned a particle, The oil explosion for an example. I called it oil_explosion_B on the particles.dat file and let's assume that the clone process is absolutelly right (all the IDs and new names for the nodes). How I add a sound for it? Is it just a matter to create a new entry with the new name oil_explosion_B on the Sh3.sdl following your instructions? Is this the way to put new sounds on the game?:hmm:

Thanks for any advice!

TheDarkWraith
11-07-07, 05:58 PM
Thanks RB for the tip.

Let's say that I just cloned a particle, The oil explosion for an example. I called it oil_explosion_B on the particles.dat file and let's assume that the clone process is absolutelly right (all the IDs and new names for the nodes). How I add a sound for it? Is it just a matter to create a new entry with the new name oil_explosion_B on the Sh3.sdl following your instructions? Is this the way to put new sounds on the game?:hmm:

Thanks for any advice!

If you want to use the soundfile from the original oil_explosion then no, you don't have to register a new sound for it. What you will have to do is add new entries in a DSD file for it (particles.dsd or create your own).
What you have to do is find the ID for the oil_explosion event. This ID will be found in the particles.dat file for the oil_explosion event. It's the next 8 bytes that follow the 0400000064000000xxxxxxxx for the oil explosion event. The next 8 bytes after it's ID should be 0000000000000000 denoting it has no parent.
After you find this ID open up the particles.dsd file and search for all instances of this ID. You'll find that this ID is the parent ID of some entries in this file (ambientvolume,soundsource, and maybe sonartarget). Everything that was indentified with this parent ID will have to be cloned and added as new entries in the particles.dsd file.
Now whatever new ID you gave to the cloned oil_explosion_B event will become the new parent ID to the cloned entries in particles.dsd. This is how sounds get hooked onto events.

johnno74
11-07-07, 06:12 PM
Hi Racerboy, really top stuff you are doing here. Wish I had time to get into modding... I haven't even actually *played* SH3 for several weeks now....

Anyway, I strongly feel you should be putting this stuff into the SH3 community manual wiki. If everything all of the SH3/4 modders have worked out was documented in one place, it would be as good as the official SDK.

The community manual is here:
http://www.mysh3.info/shiii/index.php?title=Main_Page

It seems anonymous editing has been disabled, unfortunately you'll have to create an account. Hopefully that isn't too much of a pain.
Create a new page on "sound moddong" or something, paste the info from this thread in and link it to the main contents....

If all the modders out there documented what they have learnt in the community manual it would become a fantastic resource for those wanting to get into modding. It can be a pain to find things on the subsim forums.

Just think, if all the fantastic work you and the other modders have done in working out the data structures in the game files was easily accessable to all, who knows what new mods would come of it? :rock::rock:

MONOLITH
11-07-07, 07:23 PM
Nice job Racer. :|\\

Rubini
11-07-07, 08:36 PM
Thanks RB for the tip.

Let's say that I just cloned a particle, The oil explosion for an example. I called it oil_explosion_B on the particles.dat file and let's assume that the clone process is absolutelly right (all the IDs and new names for the nodes). How I add a sound for it? Is it just a matter to create a new entry with the new name oil_explosion_B on the Sh3.sdl following your instructions? Is this the way to put new sounds on the game?:hmm:

Thanks for any advice!

If you want to use the soundfile from the original oil_explosion then no, you don't have to register a new sound for it. What you will have to do is add new entries in a DSD file for it (particles.dsd or create your own).
What you have to do is find the ID for the oil_explosion event. This ID will be found in the particles.dat file for the oil_explosion event. It's the next 8 bytes that follow the 0400000064000000xxxxxxxx for the oil explosion event. The next 8 bytes after it's ID should be 0000000000000000 denoting it has no parent.
After you find this ID open up the particles.dsd file and search for all instances of this ID. You'll find that this ID is the parent ID of some entries in this file (ambientvolume,soundsource, and maybe sonartarget). Everything that was indentified with this parent ID will have to be cloned and added as new entries in the particles.dsd file.
Now whatever new ID you gave to the cloned oil_explosion_B event will become the new parent ID to the cloned entries in particles.dsd. This is how sounds get hooked onto events.

Thanks RB!
I will try it and will let you know the result!:up:

Rubini
11-07-07, 09:33 PM
Thanks RB for the tip.

Let's say that I just cloned a particle, The oil explosion for an example. I called it oil_explosion_B on the particles.dat file and let's assume that the clone process is absolutelly right (all the IDs and new names for the nodes). How I add a sound for it? Is it just a matter to create a new entry with the new name oil_explosion_B on the Sh3.sdl following your instructions? Is this the way to put new sounds on the game?:hmm:

Thanks for any advice!

If you want to use the soundfile from the original oil_explosion then no, you don't have to register a new sound for it. What you will have to do is add new entries in a DSD file for it (particles.dsd or create your own).
What you have to do is find the ID for the oil_explosion event. This ID will be found in the particles.dat file for the oil_explosion event. It's the next 8 bytes that follow the 0400000064000000xxxxxxxx for the oil explosion event. The next 8 bytes after it's ID should be 0000000000000000 denoting it has no parent.
After you find this ID open up the particles.dsd file and search for all instances of this ID. You'll find that this ID is the parent ID of some entries in this file (ambientvolume,soundsource, and maybe sonartarget). Everything that was indentified with this parent ID will have to be cloned and added as new entries in the particles.dsd file.
Now whatever new ID you gave to the cloned oil_explosion_B event will become the new parent ID to the cloned entries in particles.dsd. This is how sounds get hooked onto events.

Thanks RB!
I will try it and will let you know the result!:up:

Worked!!!:arrgh!: :sunny: :arrgh!:
Thanks RB!!

Canovaro
11-09-07, 02:30 AM
Thanks for the work invested in this :up: