Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
Karnage
Commander Randomtoast
Posts: 947
Joined: Sun Oct 23, 2005 9:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set
Location: Wherever there is shenanigannery.

Post by Karnage »

That didn't work. How did you get the custom music in your Legend of Zelda: Hyrule Field map in?
User avatar
PR-0927
Old School Staff
Posts: 844
Joined: Fri Dec 31, 2004 9:15 pm
Location: Kent, OH, U.S.A.

Post by PR-0927 »

He used the SWBF mod tools instead of the SWBF II mod tools, but that means that you cannot add "missing" sounds.

- Majin Revan
User avatar
Karnage
Commander Randomtoast
Posts: 947
Joined: Sun Oct 23, 2005 9:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set
Location: Wherever there is shenanigannery.

Post by Karnage »

MajinRevan do you know how to add custom music with the BF2 mod tools?
User avatar
PR-0927
Old School Staff
Posts: 844
Joined: Fri Dec 31, 2004 9:15 pm
Location: Kent, OH, U.S.A.

Post by PR-0927 »

Nope, I have tried it multiple times for SWBF to no avial.

I haven't tried it recently with these tools though, but it works the same way.

- Majin Revan
Vyse
General
General
Posts: 776
Joined: Sun Aug 28, 2005 5:01 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Vyse »

Karnage wrote:That didn't work. How did you get the custom music in your Legend of Zelda: Hyrule Field map in?
I used the Battlefront 1 mod tools, set everything up the same as Majin siad in the first post and munged, then cut the .lvl it munged and put it in my BF2 maps munged folder. (Like what you did from the BF2 lv_Pc folder in Majin's tutorial) For the music I cut the whole ambient lines from the LUA then added soundstreams. (There just ambient regoins or something in the .snd.) Soundstreams work off of regions in ZE. Make a sphere region change the type to soundstream, reference the name from what you called it in the .snd and give it a min distance divisor of 2.

Look at all the shipped sound worlds for ambient sound streams in there .snd's for the correct line of code, if you want to do it that way. It's a constant stream of sound ment for bird chirping etc. but like I did, you can use it to project music. ;)
User avatar
Karnage
Commander Randomtoast
Posts: 947
Joined: Sun Oct 23, 2005 9:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set
Location: Wherever there is shenanigannery.

Post by Karnage »

So do I place my .wav files in the streams folder or leave it in the effects folder?

How do I add soundstreams in the LUA?
Vyse
General
General
Posts: 776
Joined: Sun Aug 28, 2005 5:01 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Vyse »

Karnage wrote:So do I place my .wav files in the streams folder or leave it in the effects folder?

How do I add soundstreams in the LUA?
Sound Streams sounds go in the Streams folder.

Your not really opening the soundstream in your LUA your opening the .ST4

You add 2 lines like below, where one hfz is your sound.lvl and the other is the name of the .ST4

Don't forget the readdatafiledc: stuff above a few posts

OpenAudioStream("dc:sound\\HFZ.lvl", "HFZ");
OpenAudioStream("dc:sound\\HFZ.lvl", "HFZ");
User avatar
Karnage
Commander Randomtoast
Posts: 947
Joined: Sun Oct 23, 2005 9:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set
Location: Wherever there is shenanigannery.

Post by Karnage »

So here's what I did.

1. I place my stream in the Streams folder called opening.wav

2. Edited my TESc_con.lua to look like this like this.

ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:sound\\tes.lvl;tescw").......

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")
OpenAudioStream("dc:sound\\tes.lvl", "tes");
OpenAudioStream("dc:sound\\tes.lvl", "tes");
3. Made a file called tescw_music.mus
Music()
{
Name("thememusic");
Priority(1.0);
FadeInTime(0.0);
FadeOutTime(1.5);
MinPlaybackTime(20.0);
MaxPlaybackTime(180.0);
MinInactiveTime(15.0);
SoundStream("opening");
}
4. In my tescw.req I put
ucft
{
REQN
{
"bnk"
"align=2048"
"tescw"
"tes"
}

REQN
{
"config"
"intro"
"imp_walk_atst"
}
}
5. Made a soundstream region with Min Distance Divisor of 2.
Image

6. In my tes.st4 I put
streams\opening.wav background
Is this all I need to do?
Vyse
General
General
Posts: 776
Joined: Sun Aug 28, 2005 5:01 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Vyse »

Yes, that all looks right. Except your .ST4 is going to be pulling 2 .wav files. The Soundstream needs a in and out .wav. So just copy the .wav file in your streams folder and then add it below your current .ST4

Example:

streams\ending.wav end
streams\ender.wav


ending.wav and ender.wav are both the same .wav just with different names for in and out.

The only problem you might have is in your .req. Not sure if the .st4 is on the bottom or not. I name my .asfx and .st4 and .req the same name so I don't have to worry about where they go lol. I forget which is actually being called out in the .req. :oops:
Leonhart_501

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by Leonhart_501 »

10. Get a .snd file. Copy one from other sound folders and rename to whatever you would like. Mine is called swrcweapons.snd. In it (I will not teach you how to put stuff in it), mine says this for that above .wav:

Code:
SoundProperties()
{
Name("rifledc17");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("dc17_rifle", 1.0);
}
}


11. In your MODIDgcw.req/MODIDcw.req for sound, list the name of your .asfx file under the "bnk" section. List the name of your .snd file under the "config" part.




I don't understand 10 and 11 steps, i don't find MODIDcw.req ,MODIDgcw.req
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by AQT »

Leonhart_501

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by Leonhart_501 »

it is the PC_mungelog after make the munge

soundflmunge.exe : Error : Unable to open file C:\BF2_ModTools\data_SEL\Sound\shell\effects\whooshl3.wav - while munging C:\BF2_ModTools\data_SEL\Sound\shell\shell.sfx
soundflmunge.exe : Error : Unable to open file C:\BF2_ModTools\data_SEL\Sound\shell\effects\whooshl3.wav, format may be invalid - while munging C:\BF2_ModTools\data_SEL\Sound\shell\shell.sfx
soundflmunge.exe : Error : Unable to read file list C:\BF2_ModTools\data_SEL\Sound\shell\shell.sfx - while munging C:\BF2_ModTools\data_SEL\Sound\shell\shell.sfx

:S help me please, my e-mail is [email protected]

what i do more?

i put this archives >> .snd and asfx << in C:\BF2_ModTools\data_SEL\Sound\worlds\SEL
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by swado95 »

sry i know how to open and stuff but you lost me at

10. Get a .snd file. Copy one from other sound folders and rename to whatever you would like. Mine is called swrcweapons.snd. In it (I will not teach you how to put stuff in it), mine says this for that above .wav:

Code:
SoundProperties()
{
Name("rifledc17");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("dc17_rifle", 1.0);
}
}


11. In your MODIDgcw.req/MODIDcw.req for sound, list the name of your .asfx file under the "bnk" section. List the name of your .snd file under the "config" part.

12. Test the map, and make sure you reference the name of the sound in the weapon ODF or whatever. In my ODF file, look above, I used the "rifledc17" part as my fire sound for the weapon.
i renamed the snd m16 and opened it and found nothing... do i have to get stuff from a diffrent folder other then test? im trying to get a m16 gun nosie on the model i got off of here.
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by Xavious »

swado95 wrote:
Hidden/Spoiler:
sry i know how to open and stuff but you lost me at [quote]

10. Get a .snd file. Copy one from other sound folders and rename to whatever you would like. Mine is called swrcweapons.snd. In it (I will not teach you how to put stuff in it), mine says this for that above .wav:

Code:
SoundProperties()
{
Name("rifledc17");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("dc17_rifle", 1.0);
}
}


11. In your MODIDgcw.req/MODIDcw.req for sound, list the name of your .asfx file under the "bnk" section. List the name of your .snd file under the "config" part.

12. Test the map, and make sure you reference the name of the sound in the weapon ODF or whatever. In my ODF file, look above, I used the "rifledc17" part as my fire sound for the weapon.
i renamed the snd m16 and opened it and found nothing... do i have to get stuff from a diffrent folder other then test? im trying to get a m16 gun nosie on the model i got off of here.[/quote]

It doesn't matter if the .snd file is empty, as you would remove everything in it anyways to add your own sounds. All you need to do is copy and paste the example .snd file contents shown above into your .snd file and edit as necessary.
User avatar
swado95
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 304
Joined: Wed Apr 08, 2009 7:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Where I whant to be.

Re: Mini-Tut on How to Add Custom Sounds to SWBF II Maps (FAQ)

Post by swado95 »

Would it look something like this?

SoundProperties()
{
Name(machinegun-01"); <- name of wav file
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("dc17_rifle", 1.0); name of weapon im putting on?
}
}
Post Reply