Sound for the opposite era

Started by Dark_Phantom, March 06, 2013, 06:22:09 PM

Previous topic - Next topic
March 06, 2013, 06:22:09 PM Last Edit: March 15, 2013, 09:38:26 AM by Dark_Phantom
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)
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

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)

Ok, will do.  Thanks RC.  ;)
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

Very nice, will add this to Tutorials.
=AaTc= Forever

SALLY....

-Retired Modder

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  ???
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

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.
mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh