kiprobin wrote: ↑Sun Sep 27, 2020 8:39 pm
I still don't understand what's going on with the ABC lvl though, bc it def works when I had the hoth lvl loaded too. Xwing sounds, awing sounds, combatspeeder sounds, tiefighter sounds; all these things work fine and are not in the hoth lvl to my knowledge, but are in my ABC lvl, so how else if not through the ABC lvl would they be getting in game?
I could probably have explained better the point behind some of these tests. Back when I said to remove the hoth sound lvl, the whole point was to see if ABC.lvl worked on its own. It wasn't supposed to fix the problem, because you lose all of the hoth sound effects. I just wanted to confirm that the sounds in ABC.lvl work when you only load ABC.lvl. At the time I was actually worried that the config files might be conflicting between ABC.lvl and hot.lvl, but then you discovered that ABC.lvl doesn't work at all when you load it on its own. Going to make this its own line:
If you can't use the sounds from your ABC sound lvl when you load that sound lvl on its own, then your ABC sound lvl is
not working.
I don't have the first idea why it seems to work when you load the hoth sound lvl alongside it. But I don't really need to, because the fact that ABC.lvl doesn't work on its own shows that ABC.lvl has a problem somewhere.
kiprobin wrote: ↑Sun Sep 27, 2020 8:39 pm
I ran it with the kas lvl loaded, and the combatspeeder sounds worked but infantry sounds still didn't.
So for this test, yeah you lose every sound that isn't loaded in the stock Kashyyyk missions, so you will lose some sounds and I guess in this case you lost the infantry sounds. But that's not the point of the test. The idea was just to see if the imperial hovertank sounds still crashed when you load them from this sound lvl, instead of from ABC.lvl. You can kind of skip this now, because of the next thing I'm going to say.
kiprobin wrote: ↑Sun Sep 27, 2020 8:39 pm
The mem test said I still have around 680,000 in space left out of 33,000,000 or so capacity, so you're right that that's not the issue.
This number's never going to be 0. Basically what happens when you run out of space, is the game just fills up what it can, then starts skipping files which don't fit. So you always have a bit of free space left over, even if it's skipped a few files. 700 thousand out of 33 million is only like 2% free space. To me that looks too small, and if you haven't already hit the sound limit then you soon will. If you ever load a stock mission and do the same test, you will notice that they only fill about 2/3 of the sound memory (so free space might be 5 or 10 million). That's the sort of benchmark you should be aiming for. Because you're at this limit then there's only one sensible thing to do, and that's to munge every single sound that your mission uses (stock or not) into a single lvl file. I would recommend that at this stage, even if your mission wasn't crashing. But hopefully in doing so, you can also get to the bottom of what's crashing.
So... there's no nice tutorial on how to do the whole thing (and if there was, it would be huge). You're going to want to do this in stages (there are a few tutorials on how to do the individual stages, however). So I'll start with a few steps, and when you do them post it here and I'll move on to the next thing. First thing to understand is that you can divide all the stock sound effects into
global sounds, and
non-global sounds. And then each of those is divided into
effects, and
streams. Stage one will be munging all your
global effects. I'm going to start using
DEF.lvl instead of
ABC.lvl, because you might as well start from the beginning. This will also recap a lot of things you already know, I just want to explain everything at once.
EDIT: This next section has been updated because it originally contained incorrect information about when to use
.sfx and
.asfx.
Adding the global effects from Hoth (EDIT: use .sfx)
Note: There is a tutorial by Rends on the sticky which covers all the same stuff as this section, in a bit more detail. That's actually where I learned it. But in Rends' tutorial they only add a few sounds, and then load that new sound lvl before loading a different stock sound lvl (to get all the other mission sounds). What I actually want to explain is a more general way to use all the same techniques, to get every single sound effect that your mission uses into your new
DEF.lvl, until eventually it becomes the only sound lvl you need.
Note2: This is only about hoth sounds for now.
First things first, you need to create the folder
data_DEF\Sound\worlds\DEF if it doesn't exist already. It doesn't really matter if DEF is the same mod as the mission you want the sounds for, or a different mod. And in that folder you should start by making
DEF.req and optionally
DEFgcw.req. I'm going to assume that you do make
DEFgcw.req, and if you don't make one then you can figure out what the differences are on your own.
In
DEF.req, you need an empty streams section (streams are a later stage), and you need to point to your DEFgcw sublevel. So start with this:
Code: Select all
ucft
{
REQN
{
"str"
"align=2048"
}
REQN
{
"lvl"
"DEFgcw"
}
}
Note: Every time you see
"align =2048", it's important that you use that.
Then in
DEFgcw.req, start with an empty sound bank section, and empty config section. Which looks like this:
Code: Select all
ucft
{
REQN
{
"bnk"
"align=2048"
}
REQN
{
"config"
}
}
Next, you can start looking at the template files for hoth's sound lvl (located in
data_DEF\Sound\worlds\hot). If you open
hot.req, you can see that it has the sublevel
"hot1gcw" (under the
"lvl" header). That's the one you want to look at. Then you should open
hot1gcw.req to see what that sublevel contains. Under the
"bnk" header, you can see
"hot1gcw", which represents
hot1gcw.sfx. Ignore the
"config" header for now.
hot1gcw.sfx names the wav files for every sound effect,
global or
non-global, which the sublevel will load. I'm saying
effect, not
stream because the streams are listed somewhere else. At the moment, you're only trying to add the
global effects, so you need to be able to tell which ones they are. I'll colourize the first line to highlight different parts of it:
..\..\global\effects\saberon.wav saberon -resample ps2 16000 xbox 22050 pc 22050
In green, you have the resampling commands for different consoles. In blue, you have an alias which you can use in an odf or
.snd file instead of writing the wav file name. I don't have too much to say about those. But in yellow, you can see the folders which the sound effect is stored in (before in pink, you see the wav file itself). Those folders are the key. Some wav files are located into global locations like:
Code: Select all
..\..\global\effects\
..\..\global\streams\
which is the location of sounds munged into
sound\\global.lvl. This is a global sound lvl that the game engine can access in any mission without you asking to load it. Other examples include:
Code: Select all
..\..\cw\effects\
..\..\gcw\effects\
which locate sounds that were munged into
sound\\cw.lvl and
sound\\gcw.lvl respectively. There's also a
sound\\shell.lvl which I'm pretty sure is a global location, but I've never used it.
So the above is what the
global sound
effects look like in a
.sfx. Here's examples of what the
non-global sounds could start with:
Code: Select all
effects\
streams\
..\..\hot\effects\
..\..\hot\streams\
..\..\yav\effects\
Some of these effects start with planet names, showing that the wav files are munged into
sound\\hot.lvl or
sound\\yav.lvl. Those are non-global locations, which is all you need to know for now. (It actually completely changes where those wav files get munged if you put in a
non-global location. Non-global sounds are really munged directly into
DEF.lvl, requiring an audio rip. Not important for now.) Also you can see
effects\ on its own. That's the directory of whatever sound lvl you're looking at, so in this case
effects\ is the same as
..\..\hot\effects\, in DEF's
.sfx it will mean
..\..\DEF\effects\ etc. So that's
non-global too.
So the next step is to go back to
data_DEF\Sound\worlds\DEF and make a
DEFgcw_hoth.sfx file. You can call it what you want, but basically you're making a
.sfx file which will only contain the
global effects from hoth. EDIT:
Global effects are put in a
.sfx files.
Next, go back to hoth's
.sfx file and copy over all the
global effects.
Do not copy any non-global effects at this stage! If you start putting
non-global effects in without the audio rips then it will cause munge problems. (Also, your
non-global effects will eventually need to go in a separate
.asfx file when that comes up). Also,
only do the hoth sounds for now. The hovertank and other sounds which weren't in hoth to begin with can be added later.
EDIT: This paragraph was updated because it originally contained mistakes.
Put
"DEFgcw_hoth" under the
"bnk" section of
DEFgcw.req if you haven't already.
That handles the wav files, but not the stock config files. So the next thing you have to do is reopen
hot1gcw.req and copy the
"config" section. Since you're going to put all these sounds back into your mission, you might as well copy the whole
"config" section over to
DEFgcw.req. I don't think it's an issue for the config files to reference sounds you're not loading yet. You can delete some things if you want like if you know you won't use
"all_fly_snowspeeder" in your mission.
Under the
"config" header, you can see all the
.snd files,
.mus files and
.ffx files which the sublevel is using. Some of these config files are global, and you only need to name then your
DEFgcw.req for them to work. There are other ones which you will have to copy over (and potentially rename) from the template files in
data_DEF\Sound\worlds\hot. Just make sure you only copy them from the hoth sound folder; you don't ever need to copy the ones in the global sound folder or gcw sound folder.
And that's how you take all the
global effects from hoth and put them in
DEF.lvl. Next you can munge, & finally test that your batch files/munge is working. If you are using Marvel4's files, you will get a text file appear called
configmunge.txt and
levelpack.txt in your
data_DEF\Sound\worlds\DEF folder which will contain any munge error information. Ignore errors in the regular mungelog. So give that a test and check you can hear all the sounds that you've added so far.
Adding the extra global effects (xwing/hovertank, EDIT: use .sfx)
This is for the xwing and hovertank sounds, and any other
global effects which weren't in hoth to begin with. Do the same thing as what you did for the hoth sounds, but it's more organised to make a new
.sfx file and put these sounds in there. Note: Your
global effects go in
.sfx files, your
non-global effects will go in
.asfx files.
EDIT: This paragraph was updated because it originally contained mistakes.
Adding the non-global effects (EDIT: use .asfx)
I don't have to explain this one, because giftheck just made a tutorial:
http://www.gametoast.com/viewtopic.php?f=27&t=34435
Non-global stock effects are added the same way as new custom effects. Just make sure you use
.asfx. Copy the non-global sounds from hoth's req file or whatever one you need, and any config files. You will need an audio rip of these sounds.
I'm stopping here for now. Streams would be next though.