Jump to content

Home

Adding new sound effects.


Melvinjg96

Recommended Posts

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:

 

		 <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

Link to comment
Share on other sites

  • 2 weeks later...

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 :)

Link to comment
Share on other sites

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:

    <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\SFX 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! :)

Link to comment
Share on other sites

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:

	<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:

	<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

	<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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...