Adding Custom sound to an hero

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

Post Reply
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Adding Custom sound to an hero

Post by MandeRek »

I tried to follow the custom sound tut, without succes. I'm adding 2 sounds, both for a new hero, and I'll show you what i did:

- I edited the soundmungedir.bat (from data and data_OHE) and i edited the munge.bat (from data\_BUILD\Sound and data_OHE\_BUILD\Sound) I did this by following the tut
- I created a new folder in data_OHE\Sound\Worlds named OHE. There in is a Effects folder, which consists of my 2 WAV files; tann_killing_spree.wav and tann_spawn.wav
- In the data_OHE\Sound\Worlds\OHE folder are the following files:

tann_spawn.snd:

Code: Select all

SoundProperties()
{
    Name("tannspawn");
    Group("units");
    Inherit("unit_template");
    SampleList()
    {
        Sample("tann_spawn", 1.0);
    }
}
tann_killing_spree.snd:

Code: Select all

SoundProperties()
{
    Name("tannkillingspree");
    Group("units");
    Inherit("unit_template");
    SampleList()
    {
        Sample("tann_killing_spree", 1.0);
    }
}
I kinda improvised with these, since i couldn't find a .snd assets file for units sounds... Then, there's OHEcw.req:

Code: Select all

ucft
{
    REQN
    {
        "bnk"
        "align=2048"
        "OHE"
    }

    REQN
    {
        "config"
        "tann_spawn"
	"tann_killing_spree"
    }
 }
And at last, OHE.asfx:

Code: Select all

effects\tann_spawn.wav    -resample xbox 22050 pc 22050
effects\tann_killing_spree.wav    -resample xbox 22050 pc 22050
This is the sound part in the hero's odf:

Code: Select all

//SOUND
//SndHeroSelectable           = ""
SndHeroSpawned              = "tann_spawn"
SndHeroDefeated             = "tann_killing_spree"
SndHeroKiller               = "tann_killing_spree"

//VOSound = "hero_secura_AcquiredTarget      AcquiredTarget"
//VOSound = "hero_secura_KillingSpree4      KillingSpree4"

VOUnitType                  = 0181
//SoldierMusic            = "rep_hero_secura_lp"
HurtSound                   = ""
DeathSound                  = "tann_killing_spree"
AcquiredTargetSound         = "tann_spawn"
HidingSound                 = ""
//ApproachingTargetSound    = ""
FleeSound               = ""
PreparingForDamageSound = ""
HeardEnemySound         = ""
ShockFadeOutTime        = ""
ShockFadeInTime         = ""
ShockFadeOutGain        = ""
ShockSound              = ""
ClothingRustleSound     = ""
//LowHealthSound          = "com_inf_saber_ambient"
LowHealthThreshold      = "1.1"
FoleyFXClass            = "rep_inf_soldier"
I added this to the lua, above the sound line above the team setup:

Code: Select all

    ReadDataFile("dc:sound\\OHE.lvl;OHEcw")
When i munge, it has no sounds ingame, and there isn't even a munged sound .lvl or folder in data_OHE\_LVL_PC or in Gamedata\addon\OHE\data\_LVL_PC. Can someone PLEASE help me? I think the mistake lies in the req, or .snd files, since they were mostly improvised. These sounds are REALLY good, that's why i go through so much trouble.. Thanks in advance :|
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding Custom sound to an hero

Post by Maveritchell »

Make sure you've saved your .wav files in the right format (as indicated in MajinRevan's tutorial). Also, make sure you've already done everything Rends indicates in this tutorial. The big part (for custom sounds) is making sure you use the new munge.bat and editing soundmunge.bat (different than soundmungedir.bat). Custom sounds will only work if you've already made sound munging possible. Best way to check this is to make sure you can get shipped sounds working before you start work on custom sounds.
Post Reply