Left 4 Dead 2

Left 4 Dead 2

36 ratings
Special Weapons Reloaded
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
Game Modes: Single Player
File Size
Posted
Updated
42.989 KB
24 May @ 3:40pm
14 Jun @ 4:12pm
21 Change Notes ( view )

Subscribe to download
Special Weapons Reloaded

Description
Started off as a modified version of Grenade Launcher & M60 Fix, but I have since rewritten most of it and added a new feature.

Only works in Local Server or Singleplayer

VSLib is REQUIRED won't work without it

Warning
For anyone testing the special ammo feature in the TUMTaRA map don't use the already placed ammo packs they are actually buttons that transform your current mag into special ammo and my changes don't apply to it.

Changing the max ammo to a value above 1000 will result in weird display bugs but should work as intended (i hope).
(same with mag sizes except its 255 i think, if you're using a mod that changes them)

Features
  • Allows to pickup M60 and grenade launcher ammo;
  • Allows to change the M60 and grenade launcher max reserve ammo;
  • Prevents M60 from being dropped when empty;
  • Allows M60 to gain an extra mag when picking up special ammo(default behavior for other guns).

Mods you might want to use with this:
M60 on ALL Campaigns
Secondary M60
Secondary Grenade Launcher
[GL] MK32 War Machine HUD script
Slight Adjusted M60 (w/ CS:GO Reload anim)
M60 - Enhanced Left 4 Dead 1 Animations
Default M60 animations
PAYDAY2 M60 (for M60)

Chat Commands (not case sensitive)
!swrHelp
Displays all commands and how to use them
!swrCurrent
Displays the current values for all commands
!swrDefault
Restores all values to default
!m60MaxAmmo
Changes the max amount of M60 reserve ammo
!m60GetAmmo
Changes the ability to get M60 ammo
!m60ExtraSpecial
True: get extra full mag when picking up special ammo; False: gives max amount possible (full mag or whatever is left); Compat: turned off (meant for compatibility)
!noDrop
Stops M60 from dropping when empty
!glMaxAmmo
Changes the max amount of GL reserve ammo
!glGetAmmo
Changes the ability to get GL ammo

Config files in "left4dead2\ems\swreloaded" in case you want to delete them or something

Changes from original mod:
  • Features now apply to M60 and GL even in secondary slot;

  • Server restart no longer needed to apply configs, however if you change the reserve ammo of the M60 or GL it will only apply to newly picked up ones;

  • Changed name of the commands, and responses a tiny bit;

  • New commands:
    • help
    • current
    • default

  • Added extra special ammo for M60 feature (temporarily disabled due to a bug);

  • M60 now automatically reloads, but this unfortunately can cause M60 pickup voice lines being played (fixed but subtitles still show up).

Compatibility
  • Should work with any mod that changes special ammo as long as the compat mode is on.

  • When using Weapon Timer Enforcer M60 pickup animation will play for normal duration when reloading on empty effectively making it take longer to reload, unless the M60 pickup duration is changed in the config, or Orinuse decides to make a compatibility patch.

Known issues:
- Ammo pile glow doesn't change to white to show that it is interactable when ammo bellow max (after many attempts I was unable to change the glow at all). - Can't pickup ammo for M60 and GL while reloading (can't detect the event of interacting with ammo pile while reloading). - When M60 with special ammo becomes empty and extra special is true M60 is deleted. - M60 in secondary slot when empty displays -1 instead of 0 but works as intended. - M60 when reloaded after using all special ammo will still display 0 until 1 shot is fired. - M60 doesn't automatically reload. - When special ammo for M60 is picked up it will only give the amount the weapon currently has on the mag (default behavior), so when tried to pickup special ammo for a currently empty M60 no special ammo will be given and ammo pack won't be interactable for that person anymore. - Dropping empty M60 will cause it to not be able to be picked again. - Picking up ammo while having mag with both special and regular ammo gives wrong amount. - Picking up special ammo for M60 after reloading with special ammo in the mag will cause ammo to disappear. - Alternating extra special between true and not true will cause max ammo values to be incorrect when not true. - Picking up ammo for M60 while having special ammo with extra special off gives more ammo than it should.

Special thanks to:
Devlos/Solved and the original mod creator for inspiring me to make this (and providing the base code)
Nescius for making Item thrower which made testing some bugs easier
12 Comments
Mr. Bob 21 Jul @ 8:15pm 
does not work? I do not have any scripts running the m60 though...
鹏love 12 Jul @ 7:41am 
it works,very good!!!
beF0redaWn 21 Jun @ 8:24am 
great
Ambition  [author] 11 Jun @ 9:34pm 
Fixed 2 but unfortunately it plays the laser sight pickup sound every time the mag is empty, as for 1 from my tests it only occurs when extra special is true, i have an idea of what is causing it and i will fix it as soon as i have time
黑视 8 Jun @ 5:02am 
nice! it works! finally! but there are 2 points u may need to fix
1.m60 will still be dropped when using speciall ammo and empty the magazine
2.the laser of m60 will be removed after reload
Ambition  [author] 3 Jun @ 10:54am 
after the new version i just uploaded the m60 should work pretty much like any other gun
NickIsDaName 3 Jun @ 10:44am 
Oh ok
Ambition  [author] 3 Jun @ 1:08am 
@NickIsDaName finally managed to make the M60 auto reload not using my preferred method tho
NickIsDaName 25 May @ 5:58am 
Ah damn thanks anyway
Ambition  [author] 24 May @ 8:48pm 
unfortunately whenever the auto reload function is called the weapon is dropped so no