AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Shove Handler (1.13) [30-Apr-2024] (https://forums.alliedmods.net/showthread.php?t=337808)

Silvers 05-16-2022 16:56

[L4D & L4D2] Shove Handler (1.13) [30-Apr-2024]
 
31 Attachment(s)
About:
  • Customize how many shoves to kill Common Infected, Witch and Special Infected (or no shove limit)
  • Customize how much damage each shove causes
  • Prevent stumbling or enable stumbling
  • Block insta kill on shoving Common Infected from behind


Thanks:
  • Toranks - For the request.
  • Lux - For scripting advice.
  • Dragokas - For scripting advice.
  • Marttt - For scripting advice.


Cvars:

Saved to l4d_shove_handler.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_shove_handler_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_shove_handler_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_shove_handler_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_shove_handler_modes_tog "0"

// 0=Off. 1=Allow (game default). Can Common Infected be insta-killed when first shoving their back.
l4d_shove_handler_common_back "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_boomer "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_charger "0"

// 0=Ignore shove count killing common. How many shoves does it take to kill a common infected (game default is 4).
l4d_shove_handler_count_common "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_hunter "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_jockey "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_smoker "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_spitter "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_tank "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_witch "0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_boomer "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_charger "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_common "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_hunter "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_jockey "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_smoker "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_spitter "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_surv "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_tank "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_witch "10.0"

// Who can be damaged when shoved: 0=None, 1=Common, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank, 256=Witch. 511=All. Add numbers together.
l4d_shove_handler_damaged "511"

// 0=No deadstop. 1=Allow Survivors to shove a hunter that was flying in the air to deadstop it (game default).
l4d_shove_handler_hunter "1"

// Stumble when shoved: 0=None, 1=Common, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank (default off), 256=Witch (default off). 511=All. Add numbers together.
l4d_shove_handler_stumble "127"

//0=Block Survivors shoving other Survivors. 1=Allow Survivors to shove each other (game default).
l4d_shove_handler_survivor "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_boomer "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_charger "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_common "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_hunter "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_jockey "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_smoker "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_spitter "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_surv "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_tank "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_witch "1"

l4d_shove_handler_version // Shove Handler plugin version. 



Changes:
Code:

1.13 (30-Apr-2024)
    - Fixed damage cvars not setting on the correct player classes.
    - To block stumble on Special Infected this plugin requires Left4DHooks version 1.147 or newer.

1.12 (25-Mar-2024)
    - Added cvars "l4d_shove_handler_damage_surv" and "l4d_shove_handler_type_surv" to control Survivor damage on shove.
    - Fixed not being able to free Survivors from Smokers and Jockeys if "l4d_shove_handler_survivor" was set to "0". Thanks to "glhf3000" for reporting.
    - Various changes to fix incorrect damage or cvar settings being followed.

1.11 (07-Nov-2023)
    - L4D1: Fixed not affecting the Tank. Thanks to "ZBzibing" for reporting.
    - Fixed the count cvar not affecting the Witch correctly if the Common count cvar was not enabled.

1.10 (31-Mar-2023)
    - Changed the "l4d_shove_handler_hunter" cvar description to better describe what it does.
    - Fixed the Hunter sometimes not moving after stumbling when shoved. Thanks to "KoMiKoZa" for reporting.

1.9 (10-Mar-2023)
    - Fixed invalid edict errors. Thanks to "Voevoda" for reporting.

1.8 (08-Oct-2022)
    - Added cvar "l4d_shove_handler_survivor" to allow or disallow survivors shoving each other. Requested by "MilanesaTM".

1.7 (04-Aug-2022)
    - Fixed cvar "l4d_shove_handler_hunter" not always working. Thanks to "ZBzibing" for reporting.
    - Fixed the plugin damaging other entities such a GasCans. Thanks to "moschinovac" for reporting.

1.6 (14-Jul-2022)
    - Added cvar "l4d_shove_handler_hunter" to allow or disallow punching an airborne hunter. Requested by "ZBzibing".
    - Code changes that require SourceMod version 1.11.

1.5 (20-Jun-2022)
    - Fixed array index out-of-bounds error. Thanks to "Voevoda" for reporting.

1.4 (03-Jun-2022)
    - Fixed blocking Common Infected stumble not triggering the "entity_shoved" event correctly.
    - This fix will cause the "entity_shoved" event to fire twice, once with the attacker value of "0" and after with the real attacker index.
    - This fixes some plugin conflicts such as "Molotov Shove", "PipeBomb Shove" and "Vomitjar Shove" plugins.

    - Changed the "modes" cvars method to use "Left4DHooks" forwards and natives instead of creating an entity.

1.3 (27-May-2022)
    - Fixed not stumbling Tanks or Witches. Thanks to "Maur0" for reporting.

1.2 (20-May-2022)
    - Fixed the Tank and Witch cvars not being read in L4D1.
    - Fixed SI sometimes being stuck floating. Thanks to "Toranks" for reporting.
    - Fixed array out-of-bounds. Thanks to "Toranks" for reporting.

1.1 (17-May-2022)
    - Fixed blood splatter appearing on shoves when damage is set to 0. Thanks to "Toranks" for reporting.
    - Fixed SI getting stuck when shoved in the air and made to stumble. Thanks to "Toranks" for reporting.

1.0 (16-May-2022)
    - Initial release.



Requirements:
  1. Left 4 DHooks Direct plugin version 1.102 or newer.



Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Left 4 DHooks Direct!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
  2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.


Updating from 1.7 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Provided .smx has been compiled with SourceMod 1.11.

a2121858 05-16-2022 22:54

Re: [L4D & L4D2] Shove Handler (1.0) [16-May-2022]
 
Happy new work, thank you, Mr. Silvers.:)

Silvers 05-17-2022 01:20

Re: [L4D & L4D2] Shove Handler (1.1) [17-May-2022]
 
Code:

1.1 (17-May-2022)
    - Fixed blood splatter appearing on shoves when damage is set to 0. Thanks to "Toranks" for reporting.
    - Fixed SI getting stuck when shoved in the air and made to stumble. Thanks to "Toranks" for reporting.

I have now noticed that L4D1 Tank and Witch cvars are not being read. Will fix for next release when any other issues get fixed.

Silvers 05-20-2022 08:47

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Code:

1.2 (20-May-2022)
    - Fixed the Tank and Witch cvars not being read in L4D1.
    - Fixed SI sometimes being stuck floating. Thanks to "Toranks" for reporting.
    - Fixed array out-of-bounds. Thanks to "Toranks" for reporting.


Toranks 05-23-2022 01:14

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Thank you very much for the plugin! I know it's been the hardest of the three that fixes instakills, because of the weird amount of issues it's come up with, but I've been playing around with it local and server and it works great, no more bugs of any kind.
I leave here a list of how the shoves work in common and special in detail, so that you can adjust the values to your liking with respect to the vanilla values:

- 1 shove to kill common from behind
- 1 - 2 shoves to kill idle wanderer
- 2 - 4 shoves for an aware wanderer
- 4 - 7 shoves to kill a mob's common
- 5 shoves to kill a SI
- except for the boomer, only 4 shoves
- riot zombies can't get killed by shoving
- Tank, witch and charger can't get killed by shoving
- Shoving a charger during his charge will stop him, but it's a near frame perfect trick (this can be fixed with this plugin: https://forums.alliedmods.net/showthread.php?p=2681185
- Under the effects of adrenaline, you can stun a charger with a shove.
- You can kill a jockey with one single bash by shoving in his genitals. It often happens when he is leaping over you and you bash upward right in the balls.
- SI can recover from shoves chained if they escape before dying, which means the counter get back to 0 and you have to start over.
- Shoving a spitter will make it loses his ability to spit.
- Theoretically, and based on the vanilla shove script (weapon_melee.txt), each shove does 36 damage

If you use this mod to nerf shoves, I suggest increasing the number of shoves before get tired, for balance. There is the cvars with the defaults values:
z_gun_swing_coop_max_penalty 8
z_gun_swing_coop_min_penalty 5
z_gun_swing_vs_max_penalty 6
z_gun_swing_vs_min_penalty 3

Maur0 05-26-2022 20:00

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Silvers - Hi, I have found a problem. It turns out that when I put the value to this command:
l4d_shove_handler_stumble "41"

It only applies only to the Common, Hunter and Jockey. But the Witch, for some strange reason, is affected. As much as she says that she is not in her flag value, she still applies to it.

I don't know if it's part of her shared code with the Commons, since she's programmed to function as a Common Infected. But it seems kind of bad to me to have to stumble her and that she bugs easily.

I don't know if you know how to fix it.

Toranks 05-26-2022 20:41

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Quote:

Originally Posted by Maur0 (Post 2780210)
Silvers - Hi, I have found a problem. It turns out that when I put the value to this command:
l4d_shove_handler_stumble "41"

It only applies only to the Common, Hunter and Jockey. But the Witch, for some strange reason, is affected. As much as she says that she is not in her flag value, she still applies to it.

I don't know if it's part of her shared code with the Commons, since she's programmed to function as a Common Infected. But it seems kind of bad to me to have to stumble her and that she bugs easily.

I don't know if you know how to fix it.

It doesn't happens to me. In fact, I can't shove the witch if I don't also assign a damage value and l4d_shove_handler_damaged that includes her.

But I can't shove the tank with any combination I've tried until now. I'm not interested in shove the tank, but I mention it just in case.
Im using L4D2

Maur0 05-27-2022 01:08

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Quote:

Originally Posted by Toranks (Post 2780213)
It doesn't happens to me. In fact, I can't shove the witch if I don't also assign a damage value and l4d_shove_handler_damaged that includes her.

But I can't shove the tank with any combination I've tried until now. I'm not interested in shove the tank, but I mention it just in case.
Im using L4D2

I've tried it once again and rarely has it not happened to me this time. Very strange, but well I tried to shove the Witch and in the end she didn't do anything to him. I guess there are times that usually happens and other times it doesn't. Something weird.

If you need to be able to shove the Tank. You can use this plugin from Marttt:
https://forums.alliedmods.net/showthread.php?p=2762654

Silvers 05-27-2022 06:47

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Witch can only be shoved if shes raging.

Edit:

Code:

1.3 (27-May-2022)
    - Fixed not stumbling Tanks or Witches. Thanks to "Maur0" for reporting.


Maur0 05-27-2022 17:29

Re: [L4D & L4D2] Shove Handler (1.2) [20-May-2022]
 
Quote:

Originally Posted by Silvers (Post 2780240)
Witch can only be shoved if shes raging.

Edit:

Code:

1.3 (27-May-2022)
    - Fixed not stumbling Tanks or Witches. Thanks to "Maur0" for reporting.


Ohhh now it makes sense. Thank you very much and thank you for the fix :)


All times are GMT -4. The time now is 17:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.