[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/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 - Add music map based

Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Tue Apr 16, 2024 7:03 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Add music map based
PostPosted: Wed Sep 13, 2006 8:43 pm 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot
We can add .wav files to be played in-game, as long as these .wav files have a bitrate around 180kbits. I ve been able to use one with 256kbits, with 6 Mb size but thats a gamble, hence the name of the song:
"The Gambler"
I used EZ MP3 TO WAV Converter to create this wav file by repeatedly converting back and forth until i had a file that would play.
Check the bitrate, most files used by BF1942 use 176Kbits for medium sound settings.

so here it goes, required code to be added is marked red.

1.) unpack desired map to desktop using WinRFA , i will use gazala in this example, u can extract to another loaction, important here is that u know where its at. :)

2.) the unpacked directory is "bf1942". open it, open"levels" till u have opened "Gazala" . Here create a new folder named "Sounds", we will need it later and a folder named "csmradio" in which we will put our 2 example files gambler.wav and america.wav.

3.) now find the "ObjectSpawns.con" file in your prefered gamemode folder, I used "Conquest"

4.) open ObjectSpawns.con and create ur "Radio", like so. on the bottom of the file

ObjectTemplate.create SimpleObject CSM_Radio_tune1
objectTemplate.loadSoundScript ../Sounds/Radio_tune1.ssc


for a second tune add another, like
ObjectTemplate.create SimpleObject DCR_Radio_tune2
objectTemplate.loadSoundScript ../Sounds/Radio_tune2.ssc


and so on. Then save the file. Make sure the path to the soundfile is entered as shown, containing the .. (dots)

we have thereby layed a path to the "sounds" folder we created earlier.

5.) open the "sounds" folder and create, e.g. with editor, a file called

Radio_tune1.ssc, in this file goes this:

#templateLevel HIGH

newPatch
############
### Near ###
############
load @ROOT/bf1942/levels/gazala/csmradio/gambler.wav
loop
minDistance 5
relativePosition 0/1/0
volume 1
dopplerOff
priority -5
*** Distance Volume ***
beginEffect
controlDestination Volume
controlSource Distance
envelope Ramp
param 20
param 50
param 0.75
param -1
endEffect


#templateLevel MEDIUM

newPatch
############
### Near ###
############
load @ROOT/bf1942/levels/gazala/csmradio/gambler.wav
loop
minDistance 5
relativePosition 0/1/0
volume 1
dopplerOff
priority -9
*** Distance Volume ***
beginEffect
controlDestination Volume
controlSource Distance
envelope Ramp
param 20
param 50
param 0.75
param -1
endEffect


save !
repeat this with every "Radio" u have created naming the ssc file accordingly, like for the 2nd tune it looks like this:
create this file Radio_tune2.ssc,
in this file goes this:

#templateLevel HIGH

newPatch
############
### Near ###
############
load @ROOT/bf1942/levels/gazala/csmradio/america.wav
loop
minDistance 5
relativePosition 0/1/0
volume 1
dopplerOff
priority -5
*** Distance Volume ***
beginEffect
controlDestination Volume
controlSource Distance
envelope Ramp
param 20
param 50
param 0.75
param -1
endEffect


#templateLevel MEDIUM

newPatch
############
### Near ###
############
load @ROOT/bf1942/levels/gazala/csmradio/america.wav
loop
minDistance 5
relativePosition 0/1/0
volume 1
dopplerOff
priority -9
*** Distance Volume ***
beginEffect
controlDestination Volume
controlSource Distance
envelope Ramp
param 20
param 50
param 0.75
param -1
endEffect


save the file
this code is original BF1942, we need it to be able to hear our sounds in game, in there i just changed the path to the wav.file to be in our map.

6.) on the bottom of ObjectSpawnTemplates.con we put this:

ObjectTemplate.active Mi24DGGunMount
ObjectTemplate.addTemplate DCR_Radio_tune1

ObjectTemplate.active AH64M230Rotation
ObjectTemplate.addTemplate DCR_Radio_tune2


now the heligunners willl be entertained. save the file.
U can add ur radio to any template

7.) make a copy of ur map, in this case "gazala.rfa" and put it somewhere for backup purposes.

8.) pack the directory "bf1942" and save over Gazala.rfa using WinRfa.

8a.)delete the all but "Sounds", "csmradio", and "conquest" folders and
pack and save as gazala_001.rfa and put into ur mods folder.

thats it. i perfer bionic in my turret :D


Last edited by Zaitsef on Fri Mar 23, 2007 9:28 pm, edited 1 time in total.

Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 9:38 pm 
Offline

Joined: Tue May 16, 2006 12:00 am
Posts: 130
sounds like something I'm going to need to try...good find :)


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 10:19 pm 
Offline

Joined: Mon Aug 16, 2004 12:00 am
Posts: 2120
Good guide! Thanks for sharing.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 5:03 am 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 3:54 am 
Offline

Joined: Tue May 16, 2006 12:00 am
Posts: 130


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 1:23 pm 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot
correct on the high pitch beep, thats what happens if the file doesnt want to be played, try to convert it again.

I use EZ Mp3 converter, keeping the bitrate settings on the wav-to-mp3 at 32

then i check with a radio soundscript like the one posted.

the pitch on the tune u have is due to the soundscript not being tweaked correctly.

in order to help u with that i d have to see the soundscript.

on the topgun add on we ran into the same problem, what we did was "choke" the sound off for distant listener.

load @ROOT/bf1942/levels/wake/carstereo/danger.wav
loop
minDistance 5
relativePosition 1/0/5.5
priority 1
*** Speed Volume ***
beginEffect
controlDestination Volume
controlSource Speed
envelope Ramp
param 30
param 60
param 0
param 1
param 2
param 2.5
endEffect

*** Distance Volume ***
beginEffect
controlDestination Volume
controlSource Distance <== lookie here
envelope Ramp
param 80
param 180 <== this up choked it
param 1
param -1
endEffect

*** Engine stop ***
beginEffect
controlDestination Volume
controlSource TimeRelease
envelope Ramp
param 0
param 0.2
param 1
param -1
endEffect


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 2:36 pm 
Offline

Joined: Tue May 16, 2006 12:00 am
Posts: 130
you're the only sound guy I've noticed on this website...the code for my sound is 100% the same as what's in your first post (except the name of the files I used).

alright - haven't figured out how to fix yet. I'm going to post my discoveries first.

edit - hmm, at first it seemed like this: The first param number tells the game at what distance to start playing the sound (in meters), and the max distance you can hear it. So if it's 5, when you're 5 feet away, you start hearing it play from the beginning.

but I changed it and it's the same as before. Proof that I'm only ALMOST perfect :lol:

That's all for now, I'll edit my post as I find.


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 8:51 pm 
Offline

Joined: Mon Nov 15, 2004 12:00 am
Posts: 696
Location: Germany, US Depot


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group