Hello there,
I just thought I might share the way I am putting in custom sounds (like for weapons) into Battlefront 2.
It isn't too hard, but you will need a few things.
Things you'll need:
-The Battlefront 1 ModTools
-Audacity (free audio recorder/editor)
-a sound in wav format
-The Sound Assets
Okay, let's get going.
Create a new map with the BFBuilder.
Do that by open the BFBuilder.hta and select project/new project.
Name it as you wish, I will just call it sfx. (for sound effects :P)
After the folder is created, open it and go to sounds/worlds/sfx.
Put you weapon sound into the effects folder.
Now you need to copy/paste the files that came with the sound assets in there, replacing all files that are in the sfx folder.
Now that the files have been copied to your data files sound folder of your map open the SFX.req and make it look like this:
- Code:
-
ucft
{
REQN
{
"str"
"align=2048"
"SFX"
}
REQN
{
"lvl"
"SFXgcw"
"SFXcw"
}
}
Now open the SFX.asfx file. The .asfx is for you sound effects. Gun shots laser shots etc.
When you now open the asfx file with a text editor, you will see this:
- Code:
-
effects\shot.wav -resample pc 22050
Rename it to the name of your weapon sound (mine is atte_maingun_tcw.wav)
It should look like this now:
- Code:
-
effects\atte_maingun_tcw.wav -resample pc 22050
Now you need to reference the sound in the AU file, so open it with a text editor and change the name of the wav. Like this:
- Code:
-
SoundStreamProperties()
{
Name("Music");
Group("ambientenv");
Inherit("ambientfx_template");
Gain(10.25);
Stream("SFX");
SegmentList()
{
Segment("Music", 1.0);
}
}
SoundProperties()
{
Name("atte_maingun_tcw");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("shot", 1.0);
}
}
Last thing for configurating the sounds is to add them to their corresponding era layer, since the atte sound should go to the CW era I open up the SFXCW.req.
Make it look like this:
- Code:
-
ucft
{
REQN
{
"bnk"
"align=2048"
"SFX"
}
REQN
{
"config"
"Soundprop"
"SFX"
}
}
Okay, we are done.
Now go to the BFBuilder.hta and munge the map sfx.
Go to the Addon folder and open the sfx folder, go to Data/_lvl_pc/sound and copy the sfx.lvl somewhere you can easily find it. (I will just paste it to the Desktop.)
Now you need to load your sound in your lua, so open it and paste this over the stock yavin sound, so it looks like this:
- Code:
-
ReadDataFile("dc:sound\\sfx.lvl;sfxcw")
ReadDataFile("sound\\yav.lvl;yav1cw")
Save and close the lua.
Now open up the weapon odf you want to change the sound.
Search for the part that loads the sounds and change the firing sound, like this:
- Code:
-
FireSound = "atte_maingun_tcw"
save 'n close.
Now munge you bf2 map.
When it's done, got to the Gameroot/addon/***/data/lvl_pc and create a folder called sound there (if there is on alreday, you don't have to of course)
Take the sfx.lvl from your Desktop nd put it in there.
Now launch BF and enjoy. 8)