Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Burst Fire System (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Scripts
Game Modes: Single Player, Co-op
File Size
Posted
20.004 KB
22 Jul @ 11:42am
1 Change Note ( view )

Subscribe to download
Burst Fire System (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
47 items
Description
This vscript mod, just as the title says, adds burst fire mode on any guns registered on the cfg file. Yeah, you can add burst fire on any guns. Even you can have burst fire on shotguns (what?!) :D . The mechanisms for registering guns are similar to those on "Melee Attack Speed Modifier" (this one uses the template from that mod)


There are 2 cfg files available & 1 chat command:
  1. burst fire system.txt: This is the main cfg file. List of contents:
    • burst_fire_user: Who can use burst fire (bots/ players/ all).
    • burst_fire_mode: Which mode is used (manual with toggle on/ off, or auto like desert rifle that's always in burst fire)

  2. registered gun.txt: This is a cfg file to register gun model name & the increased fire rate on burst fire mode. Examples for the formats:
    smg = 1.1 mp5.mdl = 1.1 models/v_models/v_shotgun_chrome.mdl = 8.5 pumpshot = 9.5 v_rifle = 1.1 sg552 = 1.1 m60 = 1.1 eagle = 3 spas = 1.5 autoshot = 1.5 pistol = 1.3 sniper_mili = 1.5 hunting = 5.5 awp = 6.5 sniper_scout = 6.5 launcher = 0.7

  3. Chat Command:
    • check gun model: Display the model of your gun on chat notification (use this to copy-paste the model name to register it to the "registered gun.txt").


Mechanisms of "Burst Fire System":
  • Cfg files will be generated when playing with this mod for the first time (on Singleplayer or local server as the host).

  • You need to register gun model names to "registered gun.txt" before it starts to work. The model name can be in long name (like the example of shotgun chrome above), short name (like the mp5 on the example), shorter name (like "eagle" for desert eagle/ magnum on the example), or one name for all (like "smg" on the example that works for both smg & silenced smg at the same time). The name must be correct, or it won't work.

  • The value after "=" on the "registered gun.txt" represents the increased fire rate during burst fire, & it can be in decimals/ floats. Certain guns have different results based on the original fire rate. For examples, smgs that already have high fire rate will show almost no burst fire mode if the value is set above 1.2, while pump shotgun, & bolt action snipers can go above 6.5 & still have functional burst fire. So, you can do some experiments to find the most suitable value for each gun that you prefer.

  • The guns registered on "registered gun.txt" will become automatic guns (you can hold FIRE to keep shooting).

  • Different from desert rifle, the burst fire here can be stopped by releasing FIRE button. However, the shot count is still applied. It means that if you shoot 2 bullets & then stop, the next shot will be the 3rd bullet, & then you'll go in a short pause before you can shoot again. Reloading or shoving object can reset the shot count back to 0.

  • "burst_fire_mode" feature, when it's set to 0 (Manual Mode), can allow toggle on/ off on burst fire by using an injected cvar, "cl_buy_favorite_nowarn". You need to set alias commands & bind a key to make it work like toggle on/ off on flashlight. Here's the example about how to make the alias, on "v" key with the "cl_colorblind" as the indicator for burst fire mode activation (color blind ON= burst fire):
    alias burst+ "cl_buy_favorite_nowarn 1; cl_colorblind 1; bind v burst-" alias burst- "cl_buy_favorite_nowarn 0; cl_colorblind 0;; bind v burst+" bind "v" "burst+"
    You can change the "cl_colorblind" to something else like changing the crosshair color by using other "cl_crosshair" cvars.

  • The value for fire rate during burst fire can go below 1, but this may cause bugs on some guns. So, it's better to set the value above 1.


So with this mod, you can have normal pistol with burst fire, or even magnum with burst fire like robocop's pistol (what?!), or pump shotgun with burst fire that send a witch straight to heaven with 3 quick burst fire shots (WHAT...?!) :D


NOTES
  • Desert rifle can't be registered to the "registered gun.txt", as it has a hardcoded burst fire that even can't be disabled by the value there.
  • Melee & chainsaw can't be registered there as well.
  • Automatic guns with fast fire rate like smgs, m16, sg552 & m60 may have different burst fire count sometimes (like, they shoot 3 bullets in burst fire, but sometimes they only shoot 2 bullets). I'm not sure about what causes it, for now.
  • It's still not checked yet, but I didn't add minigun on the exception. So, if minigun also uses same netprops for the fire rate, burst fire might also be able to be added on minigun. But if it uses different netprops, then it has no effect.
22 Comments
kurochama  [author] 10 Aug @ 7:26am 
@Rebirth Spinosaurus , the example is just like that on the description. Just copy-paste that on the "registered gun.txt", & remove what you don't need on the list.
Rebirth Spinosaurus 9 Aug @ 11:52pm 
Can you give an example of it, for me it's complicated and hard for me to understand
kurochama  [author] 9 Aug @ 11:14pm 
@ Rebirth Spinosaurus , check the description above. I think I included scout there.
Rebirth Spinosaurus 9 Aug @ 10:57pm 
Can you type in the comments for a burst fire command for the scout?
Mickey Adaptus 29 Jul @ 12:55pm 
I remember there being a select fire addon on the l4d2 workshop from 2013, i don't think it works anymore, but it was really nice. Great to see a similiar thing returning
Afifa 27 Jul @ 11:19pm 
nvm your supposed to find the files in "Left 4 Dead 2\left4dead2\ems" and look for the burst system file
Afifa 27 Jul @ 10:44pm 
where can i find the created registered gun files?
kurochama  [author] 26 Jul @ 12:11pm 
@KN0LL , yes. Just subscribe, & then play Singleplayer to generate the cfg files. Then just register your guns on "registered gun.txt". Or you can just copy-paste the examples of the content on "registered gun.txt" on the description above.
KN0LL 26 Jul @ 10:15am 
@kurochama how do i use this mod? just download it and it'll be available in the game? im new to modding ;)
kurochama  [author] 25 Jul @ 6:40pm 
@Afifa , try to reload your gun. There are 2 ways to generate cfg files:
1. Start Singleplayer.
2. Reload a gun during play.