SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding Tutorials => Topic started by: Dark_Phantom on March 06, 2013, 06:22:09 PM

Title: Sound for the opposite era
Post by: Dark_Phantom on March 06, 2013, 06:22:09 PM
I couldn't find a tutorial or any posts related to this... this has been a "silent" problem that kept me from going cross era with mods.  Please tell me if anyone else has already done this.

Ever want to cross your soldiers and weapons across an era?  Really?  An annoying thing that comes along with this is the silence of soldiers and weapons.  Well, the answer lies in the sound files.
 
You see, each side has its own specific sounds assigned to it in the sound files.  In the example I'm going to use, "sound\\bes.lvl;bes2gcw" contains the Imperial and Rebel sounds that the odfs call on.  For example, in the imp_weap_inf_rifle.odf, there are lines like this:
//******************************************************
//*************** SOUND ****************
//******************************************************

FireSound        = "imp_weap_inf_rifle_fire"
ReloadSound      = "imp_weap_inf_reload_med"
ChangeModeSound = "imp_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "imp_weap_inf_equip_med"


If you were to change FireSound to "rep_weap_inf_rifle_fire" (the Republic equivalent), you would hear nothing and be greatly disappointed, as the Republic weaponry sounds are contained in "sound\\bes.lvl;bes2cw".  Maybe the example will make it more clear.

1.) Go to your mission.lvl builder and pick a lua that you wish to edit.  I'm going to bes2a.lua (The GCW version of Cloud City)
2.) Open it up, you will see a line that says:
ReadDataFile("sound\\bes.lvl;bes2gcw");
3.) Add this line to it:
ReadDataFile("sound\\bes.lvl;bes2cw");
4.) Now to test it, pick a side and add these lines to the lua.  I picked a Clone Trooper to add to the Empire (will work with separate teams):
    ReadDataFile("SIDE\\rep.lvl",
        "rep_inf_basic");

        SetTeamName(IMP, "Empire")
        SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_storm_trooper",11)
    AddUnitClass(IMP, "imp_inf_shock_trooper",3)
    AddUnitClass(IMP, "imp_inf_scout_trooper",4)
    AddUnitClass(IMP, "rep_inf_clone_trooper",5)


YaY!  You can hear him and everything.  (EMP Grenade?  Not quite sure what's up with it :dry:)  His guns and voice come through though.

I found this out making my newest mod (I had an Imp rifle noise already used, and I wanted a Rep pistol noise for another weapon).  By adding that one line to the lua and changing the odf, I can now hear the Republic and CIS noises. 
I also found out that the sound for the wrist blaster is linked to the sbdroid animation and CW sounds, so you need to have that line to hear it at all ingame.  Changing the odf to another fire sound doesn't work.

8)
Title: Re: Sound for the opposite era
Post by: RepComm on March 06, 2013, 08:57:01 PM
Wow, good job.

Maybe make it a bit more detailed, and I think this should go in the tutorials section ^^
(The grenade thing happens on some servers I've been on too, only TcF- Allied though, Penguin likes to glitch up his mods)
Title: Re: Sound for the opposite era
Post by: Dark_Phantom on March 07, 2013, 07:32:20 AM
Ok, will do.  Thanks RC.  ;)
Title: Re: Sound for the opposite era
Post by: Snake on March 07, 2013, 01:14:43 PM
Very nice, will add this to Tutorials.
Title: Re: Sound for the opposite era
Post by: Dark_Phantom on March 15, 2013, 09:40:39 AM
Ok, for no reason whatsoever, the Wrist Blaster decided it would change color and sound as I was messing with something completely different.  I never touched it (I had changed all the bullets to green and sound changes earlier, but they never did anything until this last munge.)  Hopefully I can find what I did  ???
Title: Re: Sound for the opposite era
Post by: wsa30h on February 13, 2019, 10:11:06 AM
i dont mean to bump this topic but i just wanted to say thank you thanks to you i made a few cross era map and even a cross era version of rhenvar temple.
EhPortal 1.34 © 2024, WebDev