Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Medkit Preventer


Post New Thread Reply   
 
Thread Tools Display Modes
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 08-26-2020 , 09:30   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #11

What a great plugin this is! Well done xerox8521. I'm just amazed no-one had thought about adding this med-kit control mechanism into this game sooner rather than later. But it's here now, and that's all that matters!

I've tested your L4D1 version out on my Windows and Linux server using SM 1.8x, and there have been no issues whatsoever, none that I can see anyway. And I've got a lot of plugins on my server, and your plugin seems to be behaving admirably.

Thanks for making this, I'm so glad someone acted on my request. Your plugin is so very much appreciated by me,

Cheers,
Sunyata
Sunyata is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 08-26-2020 , 10:51   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #12

Update 1.2.1 L4D Only:
I've redone the code so its now working the same as the L4D2 Version without staggering the player.

Also attached the respective 1.8 Version (L4D Only). Please make sure to use the latest gamedata from the main post.
Attached Files
File Type: sp Get Plugin or Get Source (antimedkit_l4d_18.sp - 78 views - 6.3 KB)
File Type: smx antimedkit_l4d_18.smx (6.9 KB, 83 views)

Last edited by xerox8521; 08-26-2020 at 10:51.
xerox8521 is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 08-26-2020 , 13:06   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #13

Hi xerox8521,

The new L4D1 plugin is working just fine. So I'm using your new one now, although I didn't mind the old one either. So I would have been happy both ways.

Again, many thanks for your efforts,
Sunyata
Sunyata is offline
Maur0
Senior Member
Join Date: Aug 2020
Old 08-26-2020 , 13:09   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #14

Quote:
Originally Posted by xerox8521 View Post
Update 1.2.1 - Accidently broke the plugin when checking for the use type. This only affected the L4D2 Version. Which is now fixed. Thanks for the report.

@Lux I'll look into that function thanks!
Many thanks! And this plugin is very good, now players will not be able to heal at more than 50HP
Spoiler
.

Nice job!
Maur0 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 09-11-2020 , 08:43   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #15

I set
PHP Code:
mkp_minhealth 5 
When I have health lower than 40, but higher than 5

The 3 other bots are trying to use kit on you and keep shoving XD
Kind of funny but a little annoying.
They don't focus on zombies when holding kits.


Is there any way to stop bots from thinking to use kit?
__________________

Last edited by HarryPotter; 09-11-2020 at 08:52.
HarryPotter is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-12-2020 , 07:47   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #16

Quote:
Originally Posted by fbef0102 View Post
Is there any way to stop bots from thinking to use kit?
Code:
sb_temp_health_consider_factor           : 0.5      : , "sv", "launcher" : Temporary health is multiplied by this when SurvivorBots consider who needs healing
Quote:
If you pick a survivor up, they have 30 temp health, which is multiplied by that factor. So 30 temporary health x0.5 = 15 percieved health. The bot will heal itself below 30 health, which it is (according to what the code is telling it)

This will only work if they have temporary health. If they have only permanent health they will still try to heal soon as they hit 30.

This might make them heal human players less, if the players have temp health.

Last edited by cravenge; 09-12-2020 at 07:53.
cravenge is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 09-12-2020 , 10:37   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #17

My threshold is set to 30 HP on my server, the bots will still try and heal me or themselves between this 40 and 30 temp-HP mark. However, setting "sb_temp_health_consider_factor" to "9.9" in the 'sourcemod.cfg' file will stop the bots from holding a medkit. I can't understand why Value doesn't have a CVAR equivalent for this for permanent health too. Seems most odd.

One way to manually stop the bots from always holding their kit between my 40 to 30 perma-HP mark, is to have the bots take pills for themselves, or for the player to take pills which will also stop the bots from holding their medkit to try heal you. During a combat situation of course, the bots will put their medkit away anyway, just so that they can fight, and if they already have pills, will automatically take them during such combat situations too. This temporary HP pill top-up even stops them from holding the kit while the pills HP top-up lasts.

One way to perhaps address this issue with the perma-HP itself is to add a trick to the plugin code, where adding HP using the game's "pain_pills_health_value" and adjust it to have a temp-HP value of 10, so that should the bot go to grab their medkit at the 40 HP mark, the temp-HP value would get added onto the green/yellow perma-health bar. It's just a 2 cents suggestion unless someone else has any better way to address this perma-HP issue.

Last edited by Sunyata; 09-13-2020 at 06:49.
Sunyata is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-12-2020 , 10:55   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #18

More additional info:
Quote:
If you want the bots to heal at a lower temp health value, you want to set that value to be a higher value. 1.2 to should make them consider 25 temp health to be 30 permanent. If you set it to 2, they should consider 15 temp to be 30 health. If you set it to 6 they should consider 5 temp to be 30 permanent. Etc.
Quote:
Originally Posted by Sunyata View Post
... unless someone else has any better way to address this perma-HP issue.
The only way so far is to utilize the L4D2_OnUseHealingItems forward from the Left 4 Downtown 2 extension / Left 4 DHooks Direct plugin.

Last edited by cravenge; 09-17-2020 at 04:14.
cravenge is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 09-12-2020 , 11:26   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #19

Quote:
Originally Posted by cravenge View Post
More additional info:
If you want the bots to heal at a lower temp health value, you want to set that value to be a higher value. 1.2 to should make them consider 25 temp health to be 30 permanent. If you set it to 2, they should consider 15 temp to be 30 health. If you set it to 6 they should consider 5 temp to be 30 permanent. Etc.
Indeed, that would be the rule.

Last edited by Sunyata; 09-25-2020 at 04:01.
Sunyata is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 09-17-2020 , 02:28   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #20

Quote:
Originally Posted by cravenge View Post
If you pick a survivor up, they have 30 temp health, which is multiplied by that factor. So 30 temporary health x0.5 = 15 percieved health. The bot will heal itself below 30 health, which it is (according to what the code is telling it)

This will only work if they have temporary health. If they have only permanent health they will still try to heal soon as they hit 30.

This might make them heal human players less, if the players have temp health.
Thanks a lot.

Quote:
More additional info:
The only way so far is to utilize the L4D2_OnUseHealingItems forward from the Left 4 Downtown 2 extension / Let 4 DHooks Direct plugin.
Quote:
Originally Posted by Silvers View Post
Forward L4D2_OnUseHealingItems is blocked in Linux L4D1/L4D2 to prevent crashes. Waiting for DHooks update to support object returns.
Waiting
__________________

Last edited by HarryPotter; 09-17-2020 at 02:29.
HarryPotter is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:40.


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