Page 1 of 1

Re: sound help

Posted: Sat Mar 22, 2008 1:26 pm
by Aman/Pinguin
Tutorial by Psychofred, addition by me:

Code: Select all


modID = the 3 letter name of your map

1. Read the readme.txt to install.

2. In your mission.lua after picking a and setting up your base sound.lvl, add another ReadDataFile line for your mod as follows:

ReadDataFile("dc:sound\\modid.lvl;modidgcw")

name it appropriately for the era.

3. The hard part, building the sound reqs and configs. Look in the datamodid\Sound\worlds\modid folder for modid.req

Modid.req is the file that defines what is included in the lvl you Read above. Inside this req are two sections, one entited str and one entitled lvl. The section entitled lvl lists the sub-lvls to be included in the final lvl created by modid.req (modid.req -> modid.lvl).

Since in number two we are loading modid.lvl;modidgcw at the very least I need "modidgcw" under the lvl section in modid.req. Such as

REQN
    {
        "lvl"
        "modidgcw"
    }


This tells the munge to include modidgcw.lvl in modid.lvl, where modidgcw.lvl is created from modidgcw.req.

3.5 So you need to create modidgcw.req under datamodid\Sound\worlds\modid if it doesn't already exist.

That file also contains two sections, one entitled bnk and one entitled config. BNK is for sound bank and CONFIG is for sound config file. The BNK section defines the sfx files to include. In this case we want to load modidgcw.sfx so we edit the first section to look like the this:


REQN
    {
    "bnk"
    "align=2048"     
    "modidgcw"
    }

This loads modidgcw.sfx, which if it doesn't exist you need to create. SFX files are just text files that list paths to sample sources. You will fill these out by copying and pasting lines from the Assets\Sound Config Files folder. Before doing that, you first have to determine what sound config files are required to play the samples.


In my map I added the hailfire droid, which actually uses sounds from the hailfire droid AND the spider walker, so both config files were needed in the req, but no config files need to be copied since they are in the lvls that shipped with the game. So all I had to do was edit the config section to look like this:

    REQN
    {
    "config"
    "cis_tread_hailfire"
    "cis_walk_spider"
    }

NOTE: The actual config files are also in the Sound Config Files folder for you to look up their names.

3.8 Now you need to create/add sample paths to modidgcw.sfx. This you do by finding an sfx file in Sound Config Files that contains the vehicle(s) you need and copying the appropriate section from that sfx file into modidgcw.sfx. In my case I needed the hailfire droid sounds plus the spiderwalker blaster sound to complete the halfire droid, so I opened geo1cw,sfx and found the section labeled Hailfire Droid and copied that section into my modidgcw.sfx. I then found the one line for the Spiderwalker blaster and copied it below the others. Modidgcw.sfx:

..\..\cw\effects\eng_hailfire_hi_lp.wav           -resample pc 22050
..\..\cw\effects\eng_hailfire_low_lp.wav          -resample pc 22050
..\..\cw\effects\eng_hailfire_mid_lp.wav          -resample pc 22050
..\..\cw\effects\wpn_hailfire_missile_fire.wav    -resample pc 44100
..\..\cw\effects\wpn_spderWalker_laser_fire.wav    -resample pc 44100



Now add to your "soundmunge.bat" this:

@call soundmungedir _BUILD\sound\worlds\modID\%MUNGE_DIR% sound\worlds\modID sound\worlds\modID\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound modID