Ah yes, sound scripting. First off, forget the editor, just use notepad easier.
Now onto the explanation of .WAV files. In battlefield 1942 they use specific codecs for first person and third person. Both are PCIM 16 bit 44100khz codecs, but first person sounds must be saved in the Stereo version of this codec, and Third Person sounds in the Mono format. If this is not done, the sounds will either A.) Sound wierd or B.) not play at all.
Now in Battlefield 2 they use loop markers, but in bf1942 this isn't true, so you have to make a sound which is short enough to loop at the right speed, in other words if you have the BAR which in bf1942 fires about 480 rounds per minute, you would need a sound which is only 0.125 seconds in length, for it to properly loop at speed with the rounds, and you can adjust these settings depending on which sound you use.
So onto the scripts, here is a basic BF1942 Sound script:
############## ### Stereo ### ############## load @ROOT/Sound/@RTD/M1Garand_Fire_4.wav <---- This defines where to locate the sound volume 10 <--- This defines how loud it is in a percentage, 0 is silent 1 is 100 percent, this one is at 10, which is 1000 percent volume. stereo <--- This tells the game it is a first person sound dopplerOff <---- This makes sure the sound does not echo priority 5 <----This is important, setting each sounds priority is important, so that the game does not get overwhelmed with sounds. Sounds that are heard more should have higher prioritys while sounds heard less often or are quiter get lower priority. Priority can go negative if needed.
Now the effects, there is a number of different effects, the most common of which is the Distance Volume effect. The controlDestination tells this effect that the Volume Should be modified. The controlsource says that Distance will be the controller, and the Envelope tells us that the volume will Ramp down as you get farther away, in other words, it'll get quieter. *** Distance Volume *** beginEffect controlDestination Volume controlSource Distance envelope Ramp param 1 <---Parameter 1 represents the first distance param 1 <----Parameter 2 represents the second distance param 1 <----Parameter 3 is the Volume of the sound (in percentage) at Distance 1 Parameter 1. In this case 100%. param -1 <----Parameter 4 is the Volume of the sound at Distance 2 Parameter 2. It is set as -1, and this is important, this cancels the sound out. Each and every sound must have one of these! If not, there will be problems. endEffect
This is the most common one you'll be using, other effects are explained in detail on the Modding Toolkit Site, but this is the one you will want to get use to using.
If I wanted to do a 3rd Person sound, I would just copy the code above and remove "Stereo" from it, edit the Effect so the distances are modified, and Viola, 3rd Person sound.
Now an automatic weapon:
load @ROOT/Sound/@RTD/mp18lrlp.wav <---First Person sound minDistance 6 <--- Minimum distance you need to be from the sound to hear it stereo <--- First Person loop <---- Loop this sound, Automatic weapon stop FinishSample <---Finish the sound sample when trigger is released, or you can end it, but Finish sounds better. dopplerOff <---- No Echo randomStartPitch 0.05 / 0.0 <---- Random pitch for the sound priority 10 *** Distance Volume *** <----First person effect beginEffect controlDestination Volume controlSource Distance envelope Ramp param 1 param 1 param 1 param -1 endEffect
load @ROOT/Sound/@RTD/mp18mlp.wav minDistance 200 loop stop FinishSample dopplerOff randomStartPitch 0.05 / 0.0 priority 8 *** Distance Volume *** < ---- 3rd Person Effect beginEffect controlDestination Volume controlSource Distance envelope Ramp param 1 param 1 param 0 param 1 endEffect
*** Distance Volume *** beginEffect controlDestination Volume controlSource Distance envelope Ramp param 1 param 170 <---- At 170 meters this sound cuts out, and the MGdist sound I made would cut in. param 1 param -1 endEffect
load @ROOT/Sound/@RTD/mp1dist.wav minDistance 1600 <----- This was my early mistakes, this can be as low as 0 loop stop FinishSample dopplerOff priority 2 <--- Low priority, quieter
*** Distance Volume *** beginEffect controlDestination Volume controlSource Distance envelope Ramp param 170 <--- At 170 meters its silent, because its taking over for the 3rd Person MP18 sound param 171 <---- by 171 meters it is fully heard param 0 param 1 endEffect
*** Distance Volume *** beginEffect controlDestination Volume controlSource Distance envelope Ramp param 171 <--- Then ramp it down, 171 meters fully heard param 1600 <---- Cancels out at 1600 meters. param 1 param -1 endEffect
|