Left 4 Dead 2

Left 4 Dead 2

29 ratings
Stumble Shot (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Scripts
Game Modes: Single Player, Co-op
File Size
Posted
Updated
834.335 KB
4 Feb @ 9:27am
27 Apr @ 8:35am
7 Change Notes ( view )

Subscribe to download
Stumble Shot (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
47 items
Description
This mod is a request from a friend. So, this mod allows you to make zombies stumble when shot. All guns except grenade launcher have each feature to modify the stumble chance. Well, I'll explain further later on the mechanisms below.

List of features available on "stumble shot.txt" cfg file:
  1. stumble_shot_user: Which type of survivor can use "Stumble Shot" (bots/ players/ all).

  2. stumble_shot_on_common: When enabled, this allow common infected to stumble. This also works as a multiplier of weapon stumble chance (example: If you set "weapon_smg_stumble_chance" to 100 & then set "stumble_shot_on_common" to 0.1, common infected will only have 10% chance to stumble). The value is in float/ decimals. Max value = is 1.

  3. stumble_shot_on_smoker: Same as above, but this is for smoker.

  4. stumble_shot_on_boomer: Same as above, but this is for boomer.

  5. stumble_shot_on_hunter: Same as above, but this is for hunter.

  6. stumble_shot_on_spitter: Same as above, but this is for spitter.

  7. stumble_shot_on_jockey: Same as above, but this is for jockey.

  8. stumble_shot_on_charger: Same as above, but this is for charger.

  9. stumble_shot_on_tank: Same as above, but this is for tank.

  10. stumble_shot_on_witch: Same as above, but this is for witch.

  11. stumble_shot_extra_effect: When enabled, the moment the shot triggers "Stumble Shot", a special effect will be generated. Basically this is like a "hit mark" to indicate that the "Stumble Shot" hits a target.

  12. weaponname_stumble_chance: Each gun except grenade launcher has a feature representing it. This control the chance. Min value= 0 (off, no stumble), max= 100 (100%, always stumble).

  13. stumble_shot_shockwave: When it's set above 0, every time stumble shot is successfully triggered, common infected near target will also stumble. Special for snipers, m60 & magnum pistol, these guns will always cause stumble shockwave when the common infected target is killed. The value also affects the shockwave radius. Value can be in decimals/ floats. Max value is 5 (5= shockwave radius is 500).

  14. *NEW* stumble_shot_shockwave_mode: This is the sub feature of "stumble_shot_shockwave" that controls whether the stumble shockwave is applied only on one-hit-kill guns (snipers, m60, magnum pistol) or all guns.


Simple mechanisms of "Stumble Shot":
  • When "weaponname_stumble_chance" is set to value above 0, the gun represented by this feature will have a chance to stumble a zombie (examples: "weapon_smg_stumble_chance = 50").

  • Specific features for specific zombies (like "stumble_shot_on_common") also work as multiplier. For example, if you set "stumble_shot_on_common" to 0.1 & then your ak47 has 50% stumble chance, the result will be the common infected having only 5% (0.1 * 50%) chance to stumble.

  • When "Stumble Shot" is triggered, the stumble is activated the moment the bullet hits a target.

  • The stumble chance of each gun can vary based on fire rate, penetration power & number of pellets shot (for shotguns). For example, smg with 5% stumble chance will trigger stumble more often than military sniper with 5% chance. Shotguns with 5% chance will trigger stumble more often than smg with 5% chance if most or all pellets hit one target.

  • The special effect triggered by "stumble_shot_extra_effect" works on each bullet/ pellet that triggers "Stumble Shot". It means that if you shoot with a rifle that has 100% stumble chance & the bullet penetrates 3 zombies, special effect will be generated on all 3 zombies.

  • The "Stumble Shot" bypasses riot/ police zombie's armor. So, this zombie will still stumble if "Stumble Shot" is triggered even if shot from the front.


So with this mod, you can customize your guns to make them more useful when shooting lots of zombies.

NOTES:
  • A video preview will be added later.
48 Comments
kurochama  [author] 10 May @ 1:01am 
@Absolute Sucker , if those mods use simple mechanisms, I think Geebanger can also make that. & because one of the mods is his mod, so I think it would be better if you make a request to him instead, as I'm pretty sure that he's also familiar with modifying health on the revived survivor after the defib is used.
Absolute Sucker 10 May @ 12:24am 
@kurochama

Would you mind merging 2 addons with the addition of a QoL fix for me?

I am unsure whether or not the 2 would allow their codes to be re-used but I think it might be better to ask. You could also remake it yourself, since with your own code it should be easier to implement the fix.

Geebanger0's "Infinite use defibs" and Withgreen1's "Realistic Defibrillator Low Health Revive" as one addon but using the defib won't make the user unhold the defib their holding.

I have a few more ideas but I'll start with one at a time, unless you want the entire list you can ask!
kurochama  [author] 9 May @ 3:21pm 
@Absolute Sucker , hello, sorry for the late reply as I was focusing on some laser weapon mods lately. For the attack delay on special infected bots, the clue could lie on adding "Think" function on special infected's claw, to delay attack the moment normal attack key is pressed. But I'll let other modders do that first because I think there are modders other than me that focus on QoL mods like that. Some of them are Tomaz, Chimi, Manacat & Interneted, I think.
Btw what kind of request do you have in mind?
Absolute Sucker 8 May @ 6:52am 
@kurochama

Hey! How has it been?

Sorry to say this but after some time I realized my idea is a poor attempt at a fix for a grievance of mine. You can still finish the idea yourself if you think is fun! I just want to say that I changed my mind and I no longer want it.

Is it still okay if I request something from you?
Absolute Sucker 28 Apr @ 12:08am 
@kurochama

No, they are not similar. RF's fix is to prevent SI from scratching or punching during a staggered state.

My idea is to prevent them from attacking instantly when out of player's line of sight. This is my proposed "fix" for the infamous silent SI issue I have with the game.
kurochama  [author] 27 Apr @ 11:03am 
@Absolute Sucker , is it similar to "Ai Stagger Fix" made by RF? That mod fixes a bug where special infected can attack survivor when during staggered state.
Absolute Sucker 27 Apr @ 9:25am 
@kurochama

Whenever a Special Infected performs an "attack" on a player, that "attack" is put on hold for 5 seconds before actually initiating, the "attack" covers melee scratching or punching, and special abilities like pouncing, charging, tongue shooting, rock throwing, etc.

These 5 seconds of discipline gets completely nullified the moment a player sees them (survivor bots and spectators does not count), think of it like a temporary reverse weeping angel.

This does not affect the Witch.

If you have anything you want to say you can tell me!
kurochama  [author] 27 Apr @ 6:06am 
@时空之轨迹 , this mod has nothing to do with the mods you mentioned. I tested L4B2 back then & this both this mod & L4B2 worked well. Probably your other mods caused the problems, so you can check your mods.

@Absolute Sucker , hello. It's been lonh time since the update for the "critical chance". What kind of bug is it that you want to fix?
Absolute Sucker 27 Apr @ 2:03am 
@kurochama

Hello! It's been a while, are you still up for a vscript request?

I am planning for this one to fix a really annoying issue I have with this game.
时空之轨迹 27 Apr @ 1:59am 
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3467082020
Can't be with this mod either, will make myself unable to see my legs