Battlefield Modding Tutorials BFMODS https://battlefieldmodding.com/ssm/phpBB3/ |
|
Add music map based https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=4&t=2331 |
Page 1 of 2 |
Author: | Zaitsef [ Wed Sep 13, 2006 8:43 pm ] |
Post subject: | Add music map based |
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 |
Author: | sephiroth [ Wed Sep 13, 2006 9:38 pm ] |
Post subject: | |
sounds like something I'm going to need to try...good find |
Author: | Why Two Kay [ Wed Sep 13, 2006 10:19 pm ] |
Post subject: | |
Good guide! Thanks for sharing. |
Author: | Zaitsef [ Tue Sep 19, 2006 5:03 am ] |
Post subject: | |
Author: | sephiroth [ Sat Sep 23, 2006 3:54 am ] |
Post subject: | |
Author: | Zaitsef [ Sat Sep 23, 2006 1:23 pm ] |
Post subject: | |
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 |
Author: | sephiroth [ Sat Sep 23, 2006 2:36 pm ] |
Post subject: | |
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 That's all for now, I'll edit my post as I find. |
Author: | Zaitsef [ Sat Sep 23, 2006 8:51 pm ] |
Post subject: | |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |