[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS :: View topic - more Sound issues
Battlefield Modding Tutorials BFMODS
https://battlefieldmodding.com/ssm/phpBB3/

more Sound issues
https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=3&t=4856
Page 1 of 2

Author:  mrhowdoimod [ Wed Apr 15, 2009 6:01 pm ]
Post subject:  more Sound issues

hey. i'd like to know if anyone here has any experience in the sound editor. there's a couple sound i'd like to make but I have absolutely no idea where to start. there's a few templates to start with with in the editor as it is but those are either guns or engines and my sound idea's are no where near one of those. so if anyone has created new sounds could anyone point me in the right direction for making new sounds. do I even need to use the sound editor? thanks

Author:  Losnar [ Wed Apr 15, 2009 6:18 pm ]
Post subject:  Re: more Sound issues

http://www.freewebs.com/death-321/Battl ... Editor.pdf

http://www.freewebs.com/death-321/Battl ... CRIPTS.mht

Author:  Archimonde0_0 [ Wed Apr 15, 2009 7:02 pm ]
Post subject:  Re: more Sound issues

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

Author:  Apache Thunder [ Thu Apr 16, 2009 6:29 pm ]
Post subject:  Re: more Sound issues


Author:  freddy [ Thu Apr 16, 2009 9:50 pm ]
Post subject:  Re: more Sound issues

i changed the environment sounds in the chopper coral map, and the debugger always reported something bout this, but i didnt notice any problem ingame. however when theres many players in the cobra nosegun sound often cuts out, maybe this is related.

i think the environment sound i used is in stereo.

Author:  Sheppard [ Thu Apr 16, 2009 10:11 pm ]
Post subject:  Re: more Sound issues

Yeah I noticed that, when the bots use it sometimes theres no sound.

Author:  Apache Thunder [ Fri Apr 17, 2009 12:00 am ]
Post subject:  Re: more Sound issues

The weapon sounds not working was mostly caused by stereo ambient sounds. But the global ambient that I had (also in stereo) didn't really cause it.

Author:  mrhowdoimod [ Sat Apr 18, 2009 4:04 am ]
Post subject:  Re: more Sound issues


Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/