lfnetwork.com mark read register faq members calendar

Thread: Adding new sound effects.
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 12-13-2014, 03:59 PM   #1
Melvinjg96
Rookie
 
Join Date: Dec 2014
Posts: 17
Adding new sound effects.

Hello all, I am trying to add new weapon sound effects to my mod but I am not hearing the sounds in game. Here is what I did:

So I have this .wav file of a CIS blaster sound and I called it GUN_CIS_Fire.wav which I implemented into the sfxeventsweapons.xml file like this:

Code:
		 <SFXEvent Name="Unit_CIS_Ship_Laser_Fire">
					<Use_Preset>Preset_GUNV</Use_Preset>
					<Samples>Data\Audio\SFX\GUN_CIS_Fire.wav</Samples>
		 </SFXEvent>
And I connected it to the relevant units. However: When these units start firing, I hear nothing. Does anyone here know what is going on and maybe know how to fix this problem?
Many thanks in advance

Regards,
Melvinjg96
Melvinjg96 is offline   you may: quote & reply,
Old 12-27-2014, 12:10 PM   #2
Nimbus9
Lurker
 
Join Date: Dec 2014
Posts: 8
Hey Melvin,
When you reference Data\Audio\SFX\<your_file> I think it's looking in %modfolder%\Data\Audio\SFX. Maybe you could check for that?
Also:
-MODFILES always take precedence over game files if they are present. Make sure you don't have anything else that might be causing a conflict.

-I don't think you're supposed to connect the weapons SFX to the unit- for mine, I connected it to the hardpoint that fired the weapon, then connected the hardpoint to the unit.

-Make sure there's only one "GUN_CIS_FIRE.wav" in your \...\SFX\ directory

-Your units should be referencing your sound by its SFXEvent name, not its filename (e.g. under HardPoints.xml: <Fire_SFXEvent>Unit_CIS_Ship_Laser_Fire</Fire_SFXEvent> in your case.)


Recap:
-Reference the hardpoint, not the unit(at least not directly)
-Reference by its event name, not its file name (necessarily)
-your sound file should be in %your_mod%\Data\Audio\SFX\
-Make sure your preset is defined
-make sure you don't have a duplicate sound file in your SFX directory
-make sure you aren't defining your event more than once


I don't know if that helps, but at least I tried
Nimbus9 is offline   you may: quote & reply,
Old 12-28-2014, 09:19 AM   #3
Melvinjg96
Rookie
 
Join Date: Dec 2014
Posts: 17
Quote:
Originally Posted by Nimbus9 View Post
Hey Melvin,
When you reference Data\Audio\SFX\<your_file> I think it's looking in %modfolder%\Data\Audio\SFX. Maybe you could check for that?
Also:
-MODFILES always take precedence over game files if they are present. Make sure you don't have anything else that might be causing a conflict.

-I don't think you're supposed to connect the weapons SFX to the unit- for mine, I connected it to the hardpoint that fired the weapon, then connected the hardpoint to the unit.

-Make sure there's only one "GUN_CIS_FIRE.wav" in your \...\SFX\ directory

-Your units should be referencing your sound by its SFXEvent name, not its filename (e.g. under HardPoints.xml: <Fire_SFXEvent>Unit_CIS_Ship_Laser_Fire</Fire_SFXEvent> in your case.)


Recap:
-Reference the hardpoint, not the unit(at least not directly)
-Reference by its event name, not its file name (necessarily)
-your sound file should be in %your_mod%\Data\Audio\SFX\
-Make sure your preset is defined
-make sure you don't have a duplicate sound file in your SFX directory
-make sure you aren't defining your event more than once


I don't know if that helps, but at least I tried
That cleared things up a bit Thanks. I do see I wasn't clear though xD forgot to add a bit of code to this post. My bad. Here is what I did with the hardpoints:
Code:
    <HardPoint Name="HP_Munificent_Frigate_01">
			<Type> HARD_POINT_WEAPON_LASER </Type>
            <Is_Targetable>No</Is_Targetable>
            <Is_Destroyable>Yes</Is_Destroyable>
            <Tooltip_Text>TEXT_WEAPON_TURBOLASER</Tooltip_Text>
            <Health>350.0</Health>

			<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles>
			<Death_Explosion_SFXEvent>Unit_Hardpoint_Turbo_Laser_Death</Death_Explosion_SFXEvent>

            <Model_To_Attach></Model_To_Attach>
            <Attachment_Bone>LaserNR01</Attachment_Bone>
            <Collision_Mesh>LaserNR01</Collision_Mesh>
            <Damage_Decal></Damage_Decal>
            <Damage_Particles></Damage_Particles>

			<Death_Breakoff_Prop>  </Death_Breakoff_Prop>

			<Damage_Type> Damage_Assault_Frigate </Damage_Type>
			  <Projectile_Damage>40</Projectile_Damage>
            <Fire_Bone_A>LaserNR01</Fire_Bone_A>
            <Fire_Bone_B>LaserNR01</Fire_Bone_B>
            <Fire_Cone_Width>170.0</Fire_Cone_Width>
            <Fire_Cone_Height>90.0</Fire_Cone_Height>
            <Fire_Projectile_Type>Proj_Ship_Turbolaser_Red_Heavy</Fire_Projectile_Type>
            <Fire_Min_Recharge_Seconds>3.0</Fire_Min_Recharge_Seconds>
            <Fire_Max_Recharge_Seconds>4.0</Fire_Max_Recharge_Seconds>
            <Fire_Pulse_Count>7</Fire_Pulse_Count>
            <Fire_Pulse_Delay_Seconds>0.1</Fire_Pulse_Delay_Seconds>
            <Fire_Range_Distance>1400.0</Fire_Range_Distance>
				<Fire_SFXEvent>Unit_CIS_Ship_Laser_Fire</Fire_SFXEvent>
My file is located in C:\Program Files (x86)\LucasArts\Star Wars Empire at War Forces of Corruption\Mods\Return_Of_The_Shadows\Data\Audio\S FX so that should also be right. Only thing I am not certain about is the sfx preset. I copied the code from a different weapon effect and modified it by adding the filename of my sound's file. Also I used this very sfx event for every hardpoint which is supposed to use this sfx event. Is that what you were saying with defining the event more than once?

Regards!
Melvinjg96 is offline   you may: quote & reply,
Old 12-28-2014, 12:25 PM   #4
Nimbus9
Lurker
 
Join Date: Dec 2014
Posts: 8
Quote:
I copied the code from a different weapon effect and modified it by adding the filename of my sound's file.
Ok... I'm not quite sure what to do.
But I can give you my own setup with my weapons SFX...

From HardPoints.xml:
Code:
	<HardPoint Name="HP_Plasma_Cruiser_1">
		<Type>HARD_POINT_WEAPON_LASER</Type>
		<Is_Targetable>No</Is_Targetable>
		<Is_Destroyable>No</Is_Destroyable>
	
		<Fire_Bone_A>MuzzleA_00</Fire_Bone_A>
		<Fire_Bone_B>MuzzleA_00</Fire_Bone_B>
		<Fire_Cone_Width>175.0</Fire_Cone_Width>
		<Fire_Cone_Height>45.0</Fire_Cone_Height>
		<Fire_Projectile_Type>Proj_Plasma_Cruiser_Weapon</Fire_Projectile_Type>
		<Fire_Min_Recharge_Seconds>3.0</Fire_Min_Recharge_Seconds>
		<Fire_Max_Recharge_Seconds>4.0</Fire_Max_Recharge_Seconds>
		<Fire_Pulse_Count>1</Fire_Pulse_Count>
		<Fire_Pulse_Delay_Seconds>3</Fire_Pulse_Delay_Seconds>
		<Fire_Range_Distance>850</Fire_Range_Distance>
		<Fire_SFXEvent>Unit_Plasma_Cruiser_Fire</Fire_SFXEvent>
	
		<Fire_Inaccuracy_Distance> Fighter, 15.0 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Bomber, 15.0 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Transport, 11.5 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Corvette, 21.5 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Frigate, 85.0 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Capital, 110.0 </Fire_Inaccuracy_Distance>
		<Fire_Inaccuracy_Distance> Super, 250.0 </Fire_Inaccuracy_Distance>
		<Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting>
	</HardPoint>
SFXEventsPresets.xml copied to \MODFOLDER\Data\XML but has NOT been modified.

From SFXEventsWeapons.xml:
Code:
	<SFXEvent Name="Unit_Plasma_Cruiser_Fire">
			<Use_Preset>Preset_GUNS</Use_Preset>
			<Samples>data\audio\SFX\Gun_Plasma_1.wav</Samples>
		</SFXEvent>
SFXEventsPresets, SFXEventsWeapons and HardPoints are all in \Data\XML,
sound file is in \data\audio\SFX

maybe you could just take the SFXEvents code and swap the name and samples tag with your own: in your case to would be
Code:
	<SFXEvent Name="Unit_CIS_Ship_Laser_Fire">
			<Use_Preset>Preset_GUNS</Use_Preset>
			<Samples>data\audio\SFX\GUN_CIS_FIRE.wav</Samples>
		</SFXEvent>
NOTE: For some reason, the <Samples> tag doesn't like spaces in file paths.
Also: Make sure you can hear it in your OS's media player in the first place. If you can't, you might be dealing with a corrupt file.
Nimbus9 is offline   you may: quote & reply,
Old 12-28-2014, 05:15 PM   #5
Melvinjg96
Rookie
 
Join Date: Dec 2014
Posts: 17
Alright, did exactly that but one thing: I used Preset_GUNV instead of Preset_GUNS. Would that be causing the problem? Also, does the file need to be a certain bitrate? It does work in media player btw.
Melvinjg96 is offline   you may: quote & reply,
Old 12-28-2014, 05:29 PM   #6
Nimbus9
Lurker
 
Join Date: Dec 2014
Posts: 8
I don't think the specific preset matters, as long as it's valid. All I know is that for my SFX i copied the stock files and messed with them, exported as 16-bit PCM wav files via Audacity.
Nimbus9 is offline   you may: quote & reply,
Old 12-28-2014, 05:43 PM   #7
Melvinjg96
Rookie
 
Join Date: Dec 2014
Posts: 17
Alright, will try that tomorrow. Thanks for the advice Would it be fine if I can approach you if I encounter trouble with my mod in the future?
Melvinjg96 is offline   you may: quote & reply,
Old 12-29-2014, 08:59 AM   #8
Nimbus9
Lurker
 
Join Date: Dec 2014
Posts: 8
Sure.
Quote:
By the way, I don't think the specific preset matters, as long as it's valid.
I looked at SFXEventsPresets.xml, and thats, not exactly true. GUNV will come out a lot quieter than GUNS, and saturates earlier.
Nimbus9 is offline   you may: quote & reply,
Old 12-29-2014, 11:02 AM   #9
Melvinjg96
Rookie
 
Join Date: Dec 2014
Posts: 17
Ah that makes sense. So the effect might have worked after all but it was just too soft to be hearable. I feel stupid now lol. Going to fix this now.
Melvinjg96 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Empire At War > EaW General Discussion > Modding forum > Adding new sound effects.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:47 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.