Left 4 Dead 2

Left 4 Dead 2

68 ratings
Update guns to use TLS gun sounds
By мяFunreal
"The Last Stand" gave every weapon its own set of sounds, yet old mods are not using them.
Here you'll learn how to fix and update those old mods to use the new sounds.
No recompile needed! We're using Hex editors.
   
Award
Favorite
Favorited
Unfavorite
Editing models
You could decompile the model and change the events, sure.
But that's for gremlins. Hex editing is way easier and faster.

You need:
A hex Editor. I reccomend "HxD" https://mh-nexus.de/en/hxd/
Notepad++ also has a hex editor plugin, but i don't know how good it is.
L4D2 Authoring tools from steam library - VPK.exe, specifically.
Optionally Crowbar to unpack and repack the mod.

1
Unpack the addon you want to have the sounds changed.
For workshop downloads, these addon vpk's are found in:
steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop
The Jpeg images, are the addon's thumbnail. Unpack the VPK with the same name.

There's no gun mod, but you get the idea.

Either use crowbar to unpack it, or drag the vpk onto vpk.exe in the "Left 4 Dead 2\bin" folder.
You'll get a folder of the same name as the vpk was.


2
Open the Viewmodel mdl (or the one used as Includemodel) in the Hex Editor.
In the image below, all my animations are in the a_shotgun_chrome.mdl. So i only edit that.
Some mods may use sound events in both MDL files. If it is not your own mod, look in both.



3
Search for the Sound Events used.


If you do not know what sound event your model uses, decompile it and look for the events.

4
There should be ample space after the sound event, to write new data.
Overwrite the existing data with what you need.


Should your sound event name be shorter than the one written down, switch to edit the hex side (tabulator key) and fill the data with 00.
Do not fill the remaining space with . on the text side
Dots are interpreted as 2E, but we need 00



5
Save the file and pack the mod back up.
Either use Crowbar's pack tab to pack it up, or drag the folder onto VPK.exe again.

If you are editing a mod you had subscribed on the workshop, you must unsubscribe from the original mod and install it locally.
Rename the addon to something sensical and move it to the "Addons" folder.
You will never get updates for it again, but it also won't be removed if the uploader deletes it.
Usable Sound Events
In case you do not know what sound events you can use, refer to this list:

AK47
AK47.ClipIn AK47.ClipLocked AK47.ClipOut AK47.Deploy AK47.Fire AK47.FireIncendiary AK47.HelpingHandExtend AK47.HelpingHandRetract AK47.ItemPickupExtend AK47.ItemPickupRetract AK47.SlideBack AK47.SlideForward

Adrenaline
Adrenaline.CapOff Adrenaline.Deploy Adrenaline.HelpingHandExtend Adrenaline.HelpingHandRetract Adrenaline.ItemPickupExtend Adrenaline.ItemPickupRetract Adrenaline.NeedleIn Adrenaline.NeedleOpen

Autoshotgun
AutoShotgun.BoltBack AutoShotgun.BoltForward AutoShotgun.Deploy AutoShotgun.Fire AutoShotgun.FireIncendiary AutoShotgun.HelpingHandExtend AutoShotgun.HelpingHandRetract AutoShotgun.ItemPickupExtend AutoShotgun.ItemPickupRetract AutoShotgun.LoadShell

Spas 12
AutoShotgunSpas.Deploy AutoShotgun_Spas.BoltBack AutoShotgun_Spas.BoltForward AutoShotgun_Spas.Fire AutoShotgun_Spas.FireIncendiary AutoShotgun_Spas.LoadShell AutoShotgun_Spas.Pump

Default - Common sounds
Default.ClipEmpty_Pistol Default.ClipEmpty_Rifle Default.Zoom

Grenadelauncher
GrenadeLauncher.ActionClosed GrenadeLauncher.Deploy GrenadeLauncher.Explode GrenadeLauncher.Fire GrenadeLauncher.HelpingHandExtend GrenadeLauncher.HelpingHandRetract GrenadeLauncher.ItemPickupExtend GrenadeLauncher.ItemPickupRetract GrenadeLauncher.LatchOpen GrenadeLauncher.ShellIn GrenadeLauncher.ShellOut

Hunting Rifle
HuntingRifle.BoltForward HuntingRifle.Boltback HuntingRifle.ClipIn HuntingRifle.ClipLocked HuntingRifle.ClipOut HuntingRifle.Deploy HuntingRifle.Fire HuntingRifle.FireIncendiary HuntingRifle.HelpingHandExtend HuntingRifle.HelpingHandRetract HuntingRifle.ItemPickupExtend HuntingRifle.ItemPickupRetract HuntingRifle.PushButton HuntingRifle.Zoom

M60
M60.ClipIn M60.ClipLocked M60.ClipOut M60.Deploy M60.Fire M60.Fire M60.FireIncendiary M60.FireIncendiary M60.SlideBack M60.SlideForward

Desert Eagle
Magnum.ClipIn Magnum.ClipLocked Magnum.ClipOut Magnum.Deploy Magnum.Fire Magnum.HelpingHandExtend Magnum.HelpingHandRetract Magnum.ItemPickupExtend Magnum.ItemPickupRetract Magnum.SlideForward Magnum.Slideback

Gatling
Minigun.Fire Minigun.SpinDown Minigun.SpinUp

Pistol (Single & Right Hand)
Pistol.ClipIn Pistol.ClipLocked Pistol.ClipOut Pistol.Deploy Pistol.DualFire Pistol.Fire Pistol.HelpingHandExtend Pistol.HelpingHandRetract Pistol.ItemPickupExtend Pistol.ItemPickupRetract Pistol.SlideForward Pistol.Slideback

Pistol Silver (Left Hand)
Pistol_Silver.ClipIn Pistol_Silver.ClipLocked Pistol_Silver.ClipOut Pistol_Silver.Deploy Pistol_Silver.Fire Pistol_Silver.HelpingHandExtend Pistol_Silver.HelpingHandRetract Pistol_Silver.ItemPickupExtend Pistol_Silver.ItemPickupRetract Pistol_Silver.SlideForward Pistol_Silver.Slideback

Dual Pistol
(For dual wielding. Using specific pistol sounds is better)
DualPistol.ClipIn DualPistol.ClipOut DualPistol.Deploy DualPistol.HelpingHandExtend DualPistol.HelpingHandRetract DualPistol.ItemPickupExtend DualPistol.ItemPickupRetract DualPistol.Ready DualPistol.SlideBack DualPistol.SlideForward Dualpistol.ClipLocked

M16
Rifle.ClipIn Rifle.ClipLocked Rifle.ClipOut Rifle.Deploy Rifle.Fire Rifle.FireIncendiary Rifle.FullAutoButton Rifle.HelpingHandExtend Rifle.HelpingHandRetract Rifle.ItemPickupExtend Rifle.ItemPickupRetract Rifle.PushButton Rifle.SlideBack Rifle.SlideForward

Scar
Rifle_Desert.ClipIn Rifle_Desert.ClipLocked Rifle_Desert.ClipOut Rifle_Desert.Deploy Rifle_Desert.Fire Rifle_Desert.FireIncendiary Rifle_Desert.FullAutoButton Rifle_Desert.HelpingHandExtend Rifle_Desert.HelpingHandRetract Rifle_Desert.ItemPickupExtend Rifle_Desert.ItemPickupRetract Rifle_Desert.PushButton Rifle_Desert.SlideBack Rifle_Desert.SlideForward

SMG
SMG.ClipIn SMG.ClipLocked SMG.ClipOut SMG.Deploy SMG.Fire SMG.FireIncendiary SMG.FullAutoButton SMG.HelpingHandExtend SMG.HelpingHandRetract SMG.ItemPickupExtend SMG.ItemPickupRetract SMG.SlideBack SMG.SlideForward

Silenced SMG
SMG_Silenced.ClipIn SMG_Silenced.ClipLocked SMG_Silenced.ClipOut SMG_Silenced.Deploy SMG_Silenced.Fire SMG_Silenced.FireIncendiary SMG_Silenced.FullAutoButton SMG_Silenced.HelpingHandExtend SMG_Silenced.HelpingHandRetract SMG_Silenced.ItemPickupExtend SMG_Silenced.ItemPickupRetract SMG_Silenced.SlideBack SMG_Silenced.SlideForward

Wood Pump Shotgun
Shotgun.Deploy Shotgun.Fire Shotgun.FireIncendiary Shotgun.HelpingHandExtend Shotgun.HelpingHandRetract Shotgun.ItemPickupExtend Shotgun.ItemPickupRetract Shotgun.LoadShell Shotgun.Pump

Chrome Shotgun
Shotgun_Chrome.Deploy Shotgun_Chrome.Fire Shotgun_Chrome.FireIncendiary Shotgun_Chrome.LoadShell Shotgun_Chrome.Pump

Military Sniper
Sniper_Military.BoltForward Sniper_Military.Boltback Sniper_Military.ClipIn Sniper_Military.ClipLocked Sniper_Military.ClipOut Sniper_Military.Deploy Sniper_Military.Fire Sniper_Military.FireIncendiary Sniper_Military.HelpingHandExtend Sniper_Military.HelpingHandRetract Sniper_Military.ItemPickupRetract Sniper_Military.PushButton Sniper_Military.Zoom Sniper__Military.ItemPickupExtend //Yes, Double Underscores.

AWP
Weapon_AWP.Bolt Weapon_AWP.BoltForward Weapon_AWP.Clipin Weapon_AWP.Clipout Weapon_AWP.Deploy Weapon_AWP.FireIncendiary Weapon_AWP.Single

MP5
Weapon_MP5Navy.Clipin Weapon_MP5Navy.Clipout Weapon_MP5Navy.Deploy Weapon_MP5Navy.FireIncendiary Weapon_MP5Navy.Single Weapon_MP5Navy.Slideback

SG552
Weapon_SG552.BoltpullBack Weapon_SG552.BoltpullForward Weapon_SG552.Clipin Weapon_SG552.Clipout Weapon_SG552.Deploy Weapon_SG552.FireIncendiary Weapon_SG552.Single

Scout
Weapon_Scout.BoltBack Weapon_Scout.BoltForward Weapon_Scout.ClipLocked Weapon_Scout.Clipin Weapon_Scout.Clipout Weapon_Scout.Deploy Weapon_Scout.FireIncendiary Weapon_Scout.Single
Closing words
If you need help with modding, join the Dead 4 Mods Discord server[discord.gg].
I also have My own Discord server[discord.gg].
I also got Paypal[paypal.me] for don't-ations.
1 Comments
Pumpkin Boiling 30 Oct, 2021 @ 6:59am 
my dumbass cant do this but its sure as hell helpful