Ever since X4 released, i was annoyed by the main guns on destroyers having a sound bug where the first shot plays the correct sound (FWOOM!!), but followup shots make a pitiful sound, as demonstrated in this YT video: https://www.youtube.com/watch?v=GXsneMT ... el=Trouble
After extracting all the game files and spending a few hours of trying to figure out how guns, projectiles and sounds work, it seems i found a solution as demonstrated in this YT video: https://www.youtube.com/watch?v=JkQbxMV ... el=Trouble
This seems to be the cause:
\assets\props\WeaponSystems\capital\macros\weapon_arg_l_destroyer_01_mk1_macro.xml contains the following code:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Matthias (192.168.3.59) at 14.05.2021_15-01-12-->
<macros>
<macro name="weapon_arg_l_destroyer_01_mk1_macro" class="weapon">
<component ref="weapon_arg_l_destroyer_01_mk1" />
<properties>
<identification name="{20105,3004}" basename="{20105,3001}" makerrace="argon" description="{20105,3002}" mk="1" />
<bullet class="bullet_arg_l_laser_01_mk1_macro" />
<heat overheat="10000" cooldelay="1.13" coolrate="2000" reenable="9500" />
<rotationspeed max="32.3" />
<rotationacceleration max="64.6" />
<reload />
<hull max="8000" />
<sounds>
<firing ref="wpn_impulse_l" />
</sounds>
</properties>
</macro>
</macros>
Next i looked up the bullet associated with this weapon, you can see the bullet class reference in the code block above. This file can be found here:
\assets\fx\weaponFx\macros\bullet_arg_l_laser_01_mk1_macro.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: nick (192.168.3.124) at 16.01.2020_17-05-34-->
<macros>
<macro name="bullet_arg_l_laser_01_mk1_macro" class="bullet">
<component ref="bullet_arg_l_laser_01_mk1" />
<properties>
<ammunition value="3" reload="2" />
<bullet speed="1659" lifetime="6.3" amount="1" barrelamount="1" icon="weapon_laser_mk1" timediff="0.002" angle="0.03" maxhits="1" ricochet="0" scale="0" attach="0" />
<heat value="486" />
<reload rate="1.2" />
<damage value="2588" repair="0" />
<effects>
<impact ref="impact_gen_l_laser_01_mk1" inside="impact_gen_l_laser_01_mk1_inside" />
<bigobjectimpact ref="impact_gen_l_laser_01_mk1_bigobject" inside="impact_gen_l_laser_01_mk1_bigobject_inside" />
<launch ref="muzzle_gen_l_laser_01_mk1" />
</effects>
<weapon system="weapon_standard" />
</properties>
</macro>
</macros>
Code: Select all
<effect name="muzzle_gen_l_laser_01_mk1" alignment="object">
<references>
<reference effect="muzzle_gen_l_laser_01_mk1_base"/>
</references>
<elements>
<!-- Sound -->
<element id="4" ref="effect_dummy_macro" forkeffect="none" duration="1.5" forklod="none">
<sound ref="wpn_impulse_player_muzzle"/>
</element>
</elements>
</effect>
Code: Select all
<sound id="wpn_impulse_player_muzzle" description="Laser sound" repeat="1" is3d="1" preload="1" amount="64" >
<sample selection="random">
<select start="sfx\weapons\laser\wpn_impulse_muzzle_01"/>
<select start="sfx\weapons\laser\wpn_impulse_muzzle_02"/>
</sample>
<volume start="0.9" distance="10"/>
</sound>
What i have done to fix this:
In weapon_arg_l_destroyer_01_mk1_macro.xml i removed the sound entry so we do not have two "sources" of firing sounds:
Code: Select all
<diff>
<remove sel="//macros/macro[@name='weapon_arg_l_destroyer_01_mk1_macro']/properties/sounds/firing[@ref='wpn_impulse_l']"/>
</diff>
Code: Select all
<diff>
<replace sel="//effects/effect[@name='muzzle_gen_l_laser_01_mk1']/elements/element[@id='4']/sound[@ref='wpn_impulse_player_muzzle']">
<sound ref='wpn_impulse_l'/>
</replace>
</diff>