Saints Row IV Disabling weapon sound loops

Any idea on how one could go on disabling looping audio for automatic/burst weapons and instead make it so the firing sound is played once per shot fired?

The amount of desync between the audio and the actual amount of shots fired has always bothered me.
 
If it were me, I'd look in weapons.xtbl (from Red Faction Guerilla):

<Weapon>
<Name>enforcer</Name>
<Sounds>
<Fire_Sound>WEP_ENFORCE_PC_LOOP</Fire_Sound>
<Sound_Radius>45</Sound_Radius>
<NPC_Fire_Sounds>
<NPC_Fire_Sound>WEP_ENFORCE_A_NEAR_LOOP</NPC_Fire_Sound>
<NPC_Fire_Sound>WEP_ENFORCE_B_NEAR_LOOP</NPC_Fire_Sound>
<NPC_Fire_Sound>WEP_ENFORCE_C_NEAR_LOOP</NPC_Fire_Sound>
</NPC_Fire_Sounds>
<No_Ammo_Sound>WEP_ASSAULT_DRYFIRE_PC</No_Ammo_Sound>
</Sounds>
<Flags>
<Flag>can fine aim</Flag>
<Flag>shatter</Flag>
<Flag>mp selectable</Flag>
<Flag>auto-aim curved trail</Flag>
<Flag>is obvious weapon</Flag>
<Flag>looping effects</Flag>
</Flags>

Possibly delete the flag, or there may be a sound that is suitable that doesn't have 'loop' in the name.
 
If it were me, I'd look in weapons.xtbl (from Red Faction Guerilla):
I'm not sure looking at Red Factions files is a good idea when helping someone trying to mod SR4, since in this case, weapons.xtbl doesn't have those fire sound elements and that flag.
 
Sound effects are referenced by the current weapon costume and are in weapon_costumes.xtbl, I know that much.

Inside each costume's entry there's a parameter to consider the sound it makes as looping or not via a boolean value. That said, setting values that are normally "true" to "false" only gets rid of the killswitch when you let got of the trigger and in-game, just makes the gun play the loop indefinitely with each shot fired.

For example, if I used a gun that would normally loop and fired off 20 shots, there would be 20 instances of that shooting loop playing simultaneously (a.k.a. RIP ears) and it will continue to play until I put the weapon away.
 
I know when modding the enforcer to fire multiple rounds per shot the sound effect would cascade far longer than normal. It felt like the engine would only evaluate it during certain ticks / windows (polling).

Check out this thread too:

https://saintsrowmods.com/forum/threads/cant-change-weapon-sound.4692/#post-40764

I'm not sure looking at Red Factions files is a good idea when helping someone trying to mod SR4, since in this case, weapons.xtbl doesn't have those fire sound elements and that flag.

If you feel like posting the files for me, I wouldn't mind looking through them. Please include tweak_table.xtbl, effects.xtbl, *foley*, explosions.xtbl (or similar), and any files referencing the original name of the weapon as well, for instance (From Red Faction Guerrilla): weapons.xtbl, and weap_edfpistol.xtbl.

The sounds can be defined in the weapon, an attached effect, or event such as a collision (vehicle), foley, or generic settings like the tweak table.

The enforcer's multishot issue for instance was defined in explosions.xtbl.

You may also be able to define an entirely new weapon, and just clip out the parts you don't want, or only add the parts that you need for testing. RFG had the 'UNIQUE_ID' field that you could just increment to avoid stepping on the game engine. I assume the SRx does as well.
 
Last edited:
Back
Top