[L4D2] HP Regeneration V-1.63 (1/26/11)
1 Attachment(s)
General
This plugin requires Sourcemod 1.3 or higher Description This plugin will allow you to set custom values for HP Regeneration of either Survivors or the Infected team. They're set with default values but can be changed by editing the plugin.L4D2.HPRegen.cfg in the CFG\Sourcemod folder. Credits Credit for the original framework of this plugin goes to Bl4nk. He created a basic version of the plugin which I've modified to better serve the infected team in L4D2. <*>http://forums.alliedmods.net/showthread.php?t=66154 Special thanks to Graveeater for helping clean up some of the code. Cvars <*>To change these values edit the plugin.L4D2.HPRegen.cfg in the CFG\Sourcemod folder. <*>NOTE: Setting sm_hpregeneration_XX has three values, 0 will regenerate to a percent of the in-game cvar, 1 will go based upon what you set for a value in the CFG, 2 will regenerate based upon in-game cvar. (Survivors and Tanks do not have an option 2, they have no in-game cvars).
Admin Commands
Version History Version 1.63 - (1/26/11) <*>Changed the name of the public cvar Version 1.62 - (5/31/10) - 1236 Views <*>Major cut down on code thanks to - Dirka Dirka's input <*>Changed the way the Timers are closed Version 1.61 - (5/26/10) - 42 Views <*>Added new Cvar sm_regeneration_enablebwhealing <*>Set a check to see if Survivor is B&W, now they will stop healing 1 point less than their max health <*>Cleaned up some of the code calling the Max Infected HP Version 1.6 - (5/18/10) - 97 Views <*>Added Regeneration based upon percentage of HP <*>Added Regeneration based upon in-game Cvar set Health (not Survivor or Tank) <*>Improved the client detection for Valid Clients <*>Changed some Cvar names so the CFG is more organized Version 1.53 - (4/24/10) - 203 Views <*>Very minor bug, made sure to ignore client if it is Client 0 Version 1.52 - (4/16/10) - 143 Views <*>Set the call to check IfPlayerIsOnFire in the correct place to prevent errors <*>Set a call to check if a player is InCapped, will now stop regen Version 1.51 - (4/11/10) - 66 Views <*>Fixed a minor bug when checking IfPlayerIsOnFire Version 1.5 - (4/10/10) - 27 Views <*>Added in-game Admin commands to toggle Enable commands <*>Set a check if player is on fire so that regeneration is disabled if the Delay is enabled <*>Cleaned up possible bugs in the coding for Infected <*>Added a timer close if player disconnects Version 1.4 - (4/6/10) - 87 Views <*>Plugin can now disable/enable regeneration for Survivors/Infected/Tank <*>Added Cvar sm_hpregeneration_enablesurvivor <*>Added Cvar sm_hpregeneration_enableinfected <*>Added Cvar sm_hpregeneration_enabletank <*>Updated the HP check for the Infected team <*>Cleaned up code to run plugin faster Version 1.31 - (4/3/10) - 36 Views <*>Cleaned up some of the code for the plugin (Credit to Graveeater) Version 1.3 - (4/2/10) - 37 Views <*>Added a check to verify how much temporary HP a survivor has before regenerating <*>Added regeneration support for the Tank, default for the Tank is 0 so it won't be enabled unless the Cvar is changed <*>Changed the names of the Infected Cvar to InfectedNameHealth for their health Cvars <*>Changed the names of the Survivor Cvar to use Survivor instead of 1 for Health and Amount <*>Added Cvar sm_hpregeneration_amountboomer <*>Added Cvar sm_hpregeneration_amountcharger <*>Added Cvar sm_hpregeneration_amountjockey <*>Added Cvar sm_hpregeneration_amounthunter <*>Added Cvar sm_hpregeneration_amountsmoker <*>Added Cvar sm_hpregeneration_amountspitter <*>Added Cvar sm_hpregeneration_amounttank Version 1.2 - (3/25/10) - 102 Views <*>Changed plugin to delay regeneration until the Cvar time period has passed <*>Added Cvar sm_hpregeneration_delayenable <*>Added Cvar sm_hpregeneration_damagedelay <*>Added PlayerDeath and PlayerTeam events to kill the client timer <*>Changed CFG file created to plugin.L4D2.HPRegen.cfg Version 1.12 - (3/21/10) - 93 Views <*>Changed the call for Survivor regeneration <*>Minor bug fixes Version 1.11 - (3/21/10) - 21 Views <*>Fixed the plugin spamming the server with error messages Version 1.1 - (3/21/10) - 1 View <*>Fixed it so that when incapped your health does not reduce to the health1 cvar amount <*>Changed it so that the bots will also regenerate HP Version 1.0 - (3/20/10) - 23 Views <*>Original launch of the plugin Known Issues <*>None |
Re: [L4D2] HP Regeneration
can you add a CVAR about the player not take any damage for a period of time then start regeneration
|
Re: [L4D2] HP Regeneration
Nice job! I'm going to test this :)
|
Re: [L4D2] HP Regeneration
Wohoo I love this plugin, it works great! Although I think the tickrate of 3 for survivors makes it a little too easy for them so I've set it to 1 hp every 5 seconds:wink:
Great work! |
Re: [L4D2] HP Regeneration
Found a couple of bugs already.
1. The tickrate isn't working, if you set it to 5 it will still re-generate every 3 seconds. 2. Bots are not re-generating as far as I could see. 3. This is the most nasty one, I have set incapped health to 500 on my server, with this plugin incapped survivors will have only 100 incap health and die pretty fast if not helped. 4. I have seen some cases where it just stopped re-generating. Then you get attacked, lose health and suddenly it starts working again. |
Re: [L4D2] HP Regeneration
@Alex - That would make it incredibly overpowered and you wouldn't be killing anything.
@Marvel 1) You need to edit the HP.Regeneration.cfg file in the Sourcemod folder to change the values. 2) Bots are now regenerating 3) It was not calculating incapped properly and has now been changed. 4) It's hooked to players being hurt but it should be working better now |
Re: [L4D2] HP Regeneration V-1.11 (3/21/10)
Ok, fixed the problem with it spamming the server when calling the ClientTeam. Was changing stuff on the wrong line.
|
Re: [L4D2] HP Regeneration V-1.11 (3/21/10)
can you make it so, only SI regenrate health?
|
Re: [L4D2] HP Regeneration V-1.11 (3/21/10)
@LTR - Just set the Amount1 value to 0 and the survivors will not get any HP.
|
Re: [L4D2] HP Regeneration V-1.11 (3/21/10)
I run 8vs8 and activated this plugin for both teams.
SI: every 3 seconds 20 HP, SURV: every 3 seconds 1 HP up to max. 70 HP But despite the barrier of 70 HP, the survivors gain 1 HP every 3 secs, infinitely. I cannot stop that, it runs over 160 HP... example: my survivors have 150 HP at start. cvarSurvivorHP = 70, meaning, the plugin should heal up survs only to 70, not further, 1 HP every 3 seconds. In line 118 the code does this: Code:
if (70 + 1 < (1 + 150)). Code:
if(70 + 1 < (1 + 151)) I replaced the 2 "ifs" by only 1 "if": Code:
if (sHP < sMaxHP) AND please fix this: L 03/21/2010 - 21:37:26: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4) L 03/21/2010 - 21:37:26: [SM] Displaying call stack trace for plugin "hp_regeneration.smx": L 03/21/2010 - 21:37:26: [SM] [0] Line 238, L4D2 HP Regeneration.sp::KillClientTimer() L 03/21/2010 - 21:37:26: [SM] [1] Line 228, L4D2 HP Regeneration.sp::OnMapEnd() |
All times are GMT -4. The time now is 21:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.