Page 1 of 2
Problems with adding custom sounds [Solved]
Posted: Fri Jul 25, 2014 8:12 pm
by thelegend
Hey all,
I keep my problem short but detailed:
I have followed Rend´s tutorial in adding sounds and the other one of adding custom sounds. But If I munge I always get this error:soundflmunge.exe :
I just munge with sound and sound only checked. But I think this error is not really important.
If I go to my _LVL_PC folder my sound.lvl is just 3kb file size.
Here are my sound files:
lc1.asfx:
lc1.req:
my lc1.sfx:
and my lc1cw.req:
and here my weaponsounds.snd:
Note: All files are in my sound/worlds/lc1 folder.
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 5:01 am
by Anakin
Are these files all you have in your sound folder?? beacuse you wrote you added these files to you req
"lc1.asfx"
"lc1"
"align=2048"
"lc1cw"
if you only want to add the one sound and nothing else it need to be
"align=2048"
"lc1"
and for the config section:
"config"
"weaponsounds"
if you have problems with your sound munge bat try this:
http://www.gametoast.com/viewtopic.php?f=64&t=30282
You wrote you munged with the Modtools VisualMunge.exe If so there is the next misstake. you need to run the bat manuel.
about the shell errors. you don't have the shell sound files in your sound folder but have this line
@call soundmungedir _BUILD\sound\shell\%MUNGE_DIR% sound\shell sound\shell\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound shell
in your soundmunge.bat file.
i hope this helped
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 8:07 am
by thelegend
ok I got one sound to work. But how or what are the steps to add more than one sound file?
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 8:23 am
by Anakin
ASFXNAME.asfx:
LVLNAME.req:
SOUNDGROUPE1.req:
SOUNDNAMES1.snd:
SOUNDNAMES2.snd:
SOUNDGROUPE2.req:
SOUNDNAMES3.snd:
You load the lvls that way:
ReadDataFile(""dc:PATH\\TO\\LVLFILE\\LVLNAME.lvl", "SOUNDGROUPE1")
ReadDataFile(""dc:PATH\\TO\\LVLFILE\\LVLNAME.lvl", "SOUNDGROUPE2")
in your effects folder (sound directory) need to be the mySoundFile.wav files.
in the odf you call mySoundName1, mySoundName2, mySoundName3, mySoundName4.
If you use the names 1 to 3 you need to load in the lua the SOUNDGROUPE1. if you want to use the name 4 you need to call SOUNDGROUPE2 in the lua.
Th SOUNDNAMES are just to make it easyer for you to group the files. e.g. all vehicle sounds, all weapon sounds,... the SOUNDGROUPE's are than for example the eras lc1cw or lc1gcw.
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 10:40 am
by thelegend
Ah ok. And I load 2 sounds in one group? So a little bit like the "tree system"? Or can I load more than 2 sounds in one group?
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 11:25 am
by Anakin
you can load as many as you like. But you can also load in the SOUNDNAMES.snd file more than one sound. I did this in this example in the SOUNDNAMES1.snd file
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 12:11 pm
by thelegend
I did exactly (not 100% exactly but so as you said) what you said.
In my lc1.req:
I put the name of the group where I load my my snd anf asfx file:
lc1sounds.req:
And in my .asfx file I put:
Code: Select all
effects\9mm_shot.wav -resample xbox 22050 pc 22050
And in weaponsounds.snd:
And in my lua I added the readdatafile line for my sounds:
Code: Select all
ReadDataFile("dc:sound\\lc1.lvl;lici")
After that I munged with the munge.bat in _BUILD/ Sound.
I have moved the lc1.req to my sound folder in my addon directory but in game there is no one sound.
What I did wrong?
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 12:36 pm
by Anakin
1. req files in the SWBF addon directory is always a bad idea. BF can only handel lvl files and things like that. So munged files. But i'm prety sure you mean you put your sound lvl file in the directory.
2. I marked parts in your code red (look in the hide tags). compare them carfully with my example (marked, too).
thelegend wrote:I did exactly (not 100% exactly but so as you said) what you said.
In my lc1.req:
I put the name of the group where I load my my snd anf asfx file:
lc1sounds.req:
And in my .asfx file I put:
Code: Select all
effects\9mm_shot.wav -resample xbox 22050 pc 22050
And in weaponsounds.snd:
And in my lua I added the readdatafile line for my sounds:
Code: Select all
ReadDataFile("dc:sound\\lc1.lvl;lici")
[/color]
After that I munged with the munge.bat in _BUILD/ Sound.
I have moved the lc1.req to my sound folder in my addon directory but in game there is no one sound.
What I did wrong?
Anakin wrote:ASFXNAME.asfx:
LVLNAME.req:
SOUNDGROUPE1.req:
SOUNDNAMES1.snd:
SOUNDNAMES2.snd:
SOUNDGROUPE2.req:
SOUNDNAMES3.snd:
You load the lvls that way:
ReadDataFile(""dc:PATH\\TO\\LVLFILE\\LVLNAME.lvl", "
SOUNDGROUPE1")
ReadDataFile(""dc:PATH\\TO\\LVLFILE\\LVLNAME.lvl", "SOUNDGROUPE2")
in your effects folder (sound directory) need to be the mySoundFile.wav files.
in the odf you call mySoundName1, mySoundName2, mySoundName3, mySoundName4.
If you use the names 1 to 3 you need to load in the lua the SOUNDGROUPE1. if you want to use the name 4 you need to call SOUNDGROUPE2 in the lua.
Th SOUNDNAMES are just to make it easyer for you to group the files. e.g. all vehicle sounds, all weapon sounds,... the SOUNDGROUPE's are than for example the eras lc1cw or lc1gcw.
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 1:34 pm
by thelegend
Ok. One new sound works. But If I want to add more sounds (all in different soundgroups and snd files; as you said) I get this error:
Code: Select all
ERROR[levelpack lc1.req]:Expecting bracket, but none was found.
File : d:\bf2_modtools\data_lc1\_build\sound\worlds\lc1\munged\pc\lc1sounds.lvl.
req(1)...
ucft <--
ERROR[levelpack lc1.req]:Expecting bracket, but none was found.
File : d:\bf2_modtools\data_lc1\_build\sound\worlds\lc1\munged\pc\lc1sounds.lvl.
req(1)...
ucft <--
2 Errors 0 Warnings
in my black box that munged other files.
And in my _LVL_PC there are a lc1.lvl (1kb) and a lc1.lvl.req file (also 1kb).
Edit: I have added them in the groups you have explained me but it still doesn`t work. I always get this error message.
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 6:05 pm
by Anakin
Mh it says something about brakets missing. This often happens if you have forgotten an braket, or a file is missing, the bat stopps munging and the next process find a file with the missing braket.
What soundfiles do you have?? (a list of all files you want to add)
Re: Problems with adding custom sounds
Posted: Sat Jul 26, 2014 6:45 pm
by thelegend
I just want to add 5 weapons soudns and a few vehicle sounds.
I have got 5 in my effects folder (because of 5 customized weapons). The vehicles will be muged later.
I made two snd files:
weaponsounds.snd:
weaponsounds2.snd:
My soundgroup req files:
lc1sounds.req:
lc2sounds.req:
And in my req file:
In my asfx file I load the uzi.wav and the 9mm_shot.wav.
I really don't know where a missing bracket could be.
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 4:40 am
by Anakin
I had an simular problem with an bad wav file. You may want take an other wav to test. You sayed the uzi sound worked? So take this and an other one but not the 9mm
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 7:20 am
by thelegend
The problem is more if I add more than one sound to my effects folder (and to my files) I got 2 error messages. And the soundlvl is just 1kb size.
I tried it two days ago and the 9mm shot sound worked but If I tried to add one more sound I got this problems. And if I clean the lvl and the munged stuff and munge again (with 2 sounds saved in my folders) I get this errors again.
Edit: Ah wait wait. I found an other way. I just create more .lvl files with my sounds. My lua reads them all and I create more sound levels. I tired it out with 2 .lvl files and it works.
Edit2: ok. It just works with 2 dc: sound lvl files. But I found out I always errors that say expending brackets were not found and my lc2.req and lc2sounds.req is not an binary ucft file. I just added a new sound line in my asfx file.
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 8:26 am
by Anakin
can you upload your sound files for me?? So i can try if it works on my munge bats.
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 11:06 am
by Marth8880
You don't need a new lvl file for each sound - it's bad practice to do so anyways. Just fit all of your sound properties inside one .snd file and all of the .wav files inside one .asfx file, and shove 'em all into one REQ. It's not *that* complicated. :p
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 11:13 am
by Anakin
he send me the wav files and i could make an lvl file of them. I reuploaded my snd, req, asfx,... files, so he can see where his problem was.
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 11:15 am
by Marth8880
While that's all great and dandy, he should *also* learn how to do it himself so there's more than just like three or four of us who actually know how to do this sort of thing.
Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 11:33 am
by Anakin
that's why i just munged the weapon sounds for him, gave him the source back, so he can make his vehicle sounds by himselfe

Re: Problems with adding custom sounds
Posted: Sun Jul 27, 2014 11:34 am
by Marth8880
Ah. Alright. Great.

Re: Problems with adding custom sounds
Posted: Wed Jul 30, 2014 12:44 pm
by thelegend
Ok. Thanks all. I know how to add the sounds. I know what I have to do and which files I have to edit. My only problem is that if I munge the sounds I always get this errors:
And I use the same source I got by anakin. If I add one more line to my asfx file I get this errors. But if there us just one line it works well.