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
![Very Happy :D](./images/smilies/icon_biggrin.gif)