Out of combat regen rates.
I wanted to add the increased out of combat regen rates to my server like live. I coded it to check if there were variables called HPRegen, MPRegen and ENRegen in the variables table, if not it just defaults to normal regen rates. So admins can set thier regen rates however they like. Here is the code if anyone wants to use it.
change Code:
void Client::DoHPRegen() { Code:
void Client::DoHPRegen() { Code:
void Client::DoManaRegen() { Code:
void Client::DoManaRegen() { Code:
void Client::DoEnduranceRegen() Code:
void Client::DoEnduranceRegen() Code:
INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('HPRegen','1','Out of combat hit point regen is multiplied by this number. Default: 1'); I also changed my server to allow players to meditate while standing. it is setup with a variable to turn it on or off too... if anyone wants it just use this code for the "void Client::DoManaRegen() "instead of the above code... Code:
void Client::DoManaRegen() { Code:
INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('SitToMed','0','0 = Player has to sit to med. 1 = Player meditates while standing. Default: 0'); This is my first contribution, as I am relativly new to the eqemu scene, I hope someone will get some use out of this, and if you find any problems with it, just let me know and i'll try and get it fixed... Zydria |
This looks interesting.
I am going to move this for now into "Custom Code" until KLS weighs in and where she thinks this ought to go. I can see the argument for this getting integrating into the official code... |
Character:HPRegenMultiplier, Character:ManaRegenMultiplier, and Character:EnduranceRegenMultiplier are all already rules...
Though, your mana regen addition may be able to be modified to allow people to med while on horses. |
I have tried to get those working, perhaps im not setting them properly, but they do not seem to have any effect on regen amounts. I have added them both though ingame commands and directly to the database, but each time i test it, my regen rates are just normal.
|
Feature
This was implemented in live and I think its a great feature. The longer you sit the more hp/mana you gain over time. I think the delay between combat and rest mode is something like 10-15 seconds isnt it?
-Mard |
Ok, I got the HPRegenMultiplier, ManaRegenMultiplier and EnduranceRegenMultiplier rules to work, so I change my code to work with those. The code now checks a variable to see if the server allows increase out of combat regen rates, if it does, it will increase the characters out of combat regen rate by the amount in the HP, Mana and EnduranceRegenMultiplier rules.
If the server is not using out of combat regen rates, but has the regenmultiplier rules set, then it will use them the way the worked before. Here's the new code. Code:
void Client::DoHPRegen() { Code:
void Client::DoManaRegen() { Code:
void Client::DoEnduranceRegen() and insert the variable in the db Code:
INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('OOCRegen','0','Out Of Combat Regen Multiplier. If set to 1 characters hp, mana and endurance will regen at regular speed multiplied by the values entered in the HPRegenMultiplier, ManaRegenMultiplier and EnduranceRegenMultiplier rules. Default is 0 (Off), you must set the above rules or players will only recieve regular regen rates'); By default, the out of combat regen is turned off, so change the variable OOCRegen to 1 to turn it on Zydria |
Sorry for double post, I just update the code to check if players were mounted, if they are, meditate is always on....
just use this instead of the void Client::DoManaRegen() above Code:
void Client::DoManaRegen() { |
Quote:
I'm no developer, but I'm pretty sure the trend is to move away from the variables table and use rules instead. The benefit of course, is that they can be changed and refreshed in-game with a few commands. Most variables require a server reboot to take effect. Your OOCRegen variable probably should be made into a bool rule. Quote:
The mount change is a much needed one, and I am certain many people will appreciate it. However, I see you have the same if statement repeated twice. Couldn't you just combine sitting and mounted together, like: Code:
if (IsSitting() || GetHorseId() != 0){ |
Quote:
|
I actually thought that's how it already was, that's why I got confused. Sorry for the misunderstanding I understand now, thank you :)
|
I havent played on live for a year or two. I heard they did something like you just described, though. I'll look over your code in detail later tonight when i have some time to dedicate towards it. I'm beginning to think now that this should probably go into the server repository after all, but I want to look over it myself and hear what KLS thinks before I make that decision.
|
I went through the code and fixed a few mistakes i made in the other posts and cleaned it up a bit. I also switched from a variable to a rule to turn out of combat regen on or off...
Here's the new code... client_process.cpp Code:
void Client::DoHPRegen() { Code:
void Client::DoManaRegen() { Code:
void Client::DoEnduranceRegen() Code:
RULE_BOOL( Character, OutOfCombatRegen, false ) // Whether or not to used increased regen rates while player is not in combat. |
hm.. im kinda conflicted.
I mean if we're going to go put something like this in we might as well go all the way and replicate eq live's system. Yet the client doesn't support the window that tells us if we're resting or not.. at least not titanium or 6.2, anniv does but it currently is not fully functional by any means.. it's something we could put in that's on EQ live just not on the clients we support atm... I tend to lean toward adding it however because if we don't have it we aren't replicating EQlive gameplay. From what I remember there were a couple different combat states that determined how you regenerated mana and health. Code:
enum CombatState { Recovering is the period from when you leave combat to when you can enter resting... I believe it varies depending on either the zone you're in or the mob you left combat with. I know at the lower levels it's pretty short, 5-10 seconds at most. You can be in Resting but if you're conflicted (Have a detrimental spell on you) you will not be able to take advantage of the effects of Resting. Once you're resting so long as you stay you regen health, mana and endurance at a much faster rate than normal and never any slower than your in combat sitting regeneration. Wouldn't be much to work our really. Hardest part would be the transition from in combat to resting with the timers and that wouldn't be hard at all! |
KLS, is it possible to add the code in anticipation of Anniversary Edition support? And for those who do not have those clients, allow the admin to simply set a rule to handle it? I don't know what "resting" is in EQLive, as I have not actually played in 2 years... but I know the concept from other games.
Gimme mah fellowships, brotherhoods, and vitality xpz!! ;) |
I was testing (read playing) last night and tested this out on the phlarg fiends who notoriously have a ultra long disease effect on you during combat. I can verify that your hp regen rate does continue to rise the longer you sit even with detrimental spell effects on you. It just takes forever (a minute or two) for the regen rate to overcome the disease damage. There has to be some kind of multiplier over time. If you guys want I can always check it out some more for details if you want.
|
I think we can add something in, though it probably wont be right away. Regardless of that: thanks for the code submission... even if we don't use the exact code it got us talking about it and hopefully it brings with it a solution to the problem.
|
This would be great on the solo server, since its hard to balance a hit vs. regen and the up time between battles.
|
I still have access to EQLive so can answer questions about it.
What Sony did, (to reduce down time) was to set up a hyper rest mode when you were out of combat for a period of time. If the mob is considered a raid mob, then it would take about 4.5 minutes to put you into "rest mode", if not - it takes roughly 15 seconds. While in that hyper rest mode, you'd experience an excellerated HP and mana regeneration while sitting - which is broken the minute you get attack, stood up, or entered combat (please note - being on a mount is considered sitting). |
Warrior
Also another note - not that I'm asking for it nor do I play/cheerlead for warriors, but they had an additional bonus to their regeneration to address the number of hit points they were able to build up. I do not have any specific numbers but I can guarantee that all classes now have an enhanced healing over time downtime and that it especially helped those classes that have an extra regen based on class.
I will see what I can find current number wise on the everquest forums. -Mard |
I still play on EQLive - and will continue to do so until the emulator has been perfected. So if you have questions - feel free to ask.
Having been involved with the project on and off for ages now - I have to say kudos to the programmers still working hard on this endeavor - it's come a hell of a long way from where it use to be. |
OOC regen
OOC regen should not be active if you have a dot or are diseased. Atleast that is the way it works on Live. I would like to see OOC regen implemented into the Emu. That is one of the features I actually miss.
|
while I have not writen any custom code, I find an alternative fix for out of combat regeneration. I gave my players clicky heal stones, which heal for large ammount of hp but take a WHILE to cast. Thsi basicly substitutes out of combat recovery, while preventing you from using such stone in combat due to very long cast time
|
so, are we going to see this amazing feature- the OOC regeneration -implemented soon? ;)
the fact that client does had the "box" is truly irrelevant- just check if player is not on the agro list of any mob, and he in fact is not - the reg/mana goes up by the variable % specified in the rules. Having a dot on your person should not matter at all |
Somebody's not reading the changelogs ;)
==01/09/2008 KLS: Starting items will now be saved if they are placed in slots other than the primary 8, this includes inside bags and on the character's inventory and bank slots KLS: Kick at level 55 or higher now has a chance to act as a spell interrupt as bash does. KLS: (TheLieka) Stun Immunity for Frontal Stuns on Ogres KLS: (TheLieka) Added out of combat regen to NPCs based on rule NPC:OOCRegen KLS: NPCs with quests using the Perl Quest Parser should no longer stop if they do not have an EVENT_SAY sub KLS: /autofire cleaned up some, fixed many situations where it shouldn't fire and it now will auto. use throwing weapons as well as bows KLS: Ranged and Throwing attacks will break invis. correctly. KLS: Added the following rules: Character:HealOnLevel (Default: false) Character:FeignKillsPet (Default: false) Character:ItemManaRegenCap (Default: 15) Character:ItemHealthRegenCap (Default: 15) Combat:UseIntervalAC (Default: false) Combat:PetAttackMagicLevel (Default: 30) NPC:SayPauseTimeInSec (Default: 5) NPC:OOCRegen (Default: 0) |
wait - it sais NPC:OOCRegen (Default: 0)
what about players?? and what abotu mana regeneration oh Cavedude - I just downloaded your peq DB.. and I hope it includes all the latest things, like watermaps and whatever =) Unfrotunately.. I can't seem to find instruction how to install it... Th very first I did it was using the CVS... but nwo since I have the sql file - is there a simpler way of turning it into an actual db? thanks much =) |
I haven't added PC regen yet, this is true. NPC do have ooc regen tho! Hopefully someday soon we can do pc regen it's a bit more complicated than npc regen though.
|
update: oh Cavedude I have installed the Db i downlaoded from your main site and it is missing some of recent changes... I think - in particular there is no rules or variables section at all...
|
Quote:
it would be good feature to have wihotu going crazy of %% rates for general hp/mana reg just to reduce downtime |
You need to use the newest (correct) CVS for that data. The releases don't have them.
|
Quote:
|
Quote:
Quote:
I don't see players OOC reg/mana =( To: Annihilator True, but this don't mean we need to punish players in anyway imagineable like evil SOE does =P |
NPC regen is in there: (0,'NPC:OOCRegen','0.66')
However, and KimLS mentioned this, player regen is quite a way off. |
All times are GMT -4. The time now is 12:29 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.