PDA

View Full Version : Out of combat regen rates.


zydria
09-03-2007, 12:50 PM
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

void Client::DoHPRegen() {
sint32 normal_regen = LevelRegen();
sint32 item_regen = itembonuses.HPRegen;
sint32 spell_regen = spellbonuses.HPRegen;
sint32 total_regen = normal_regen + item_regen + spell_regen;
total_regen = (total_regen * RuleI(Character, HPRegenMultiplier)) / 100;
SetHP(GetHP() + total_regen);
SendHPUpdate();
}


to

void Client::DoHPRegen() {
/* Out of combat HP Regen Multiplier added by Zydria */

/* Out of combat hp regen rate */
/* Create variable in db called HPRegen */
float HPRegen;
HPRegen = (float)1;
char tmp[10];
char *tmp2;

sint32 normal_regen = LevelRegen();
sint32 item_regen = itembonuses.HPRegen;
sint32 spell_regen = spellbonuses.HPRegen;
sint32 total_regen = normal_regen + item_regen + spell_regen;

// if the player is in combat... normal hp regen
if (IsEngaged())
{
total_regen = (total_regen * RuleI(Character, HPRegenMultiplier)) / 100;
}
// if they are out of combat... normal regen multiplied by variable HPRegen
// Default: Normal Regen
else
{
if (database.GetVariable("HPRegen", tmp, 9))
HPRegen = strtod((const char*)tmp, &tmp2);
total_regen = ((total_regen * RuleI(Character, HPRegenMultiplier)) / 100) * HPRegen;
}

SetHP(GetHP() + total_regen);
SendHPUpdate();
}


then change

void Client::DoManaRegen() {
if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;
if (IsSitting()) { //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;

SetMana(GetMana() + regen);
SendManaUpdatePacket();
}


to

void Client::DoManaRegen() {
/* Out of combat Mana Regen Multiplier added by Zydria */

// Out of combat mp regen rate
// Create variable in db called MPRegen
float MPRegen;
MPRegen = (float)1;

char tmp[10];
char *tmp2;

if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;

if (IsSitting()) { //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);

// if character is in combat
if (IsEngaged())
{
// normal regen
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}
//if not
else
{
//if mpregen is set in variable db to higher than 1
if (database.GetVariable("MPRegen", tmp, 9))
MPRegen = strtod((const char*)tmp, &tmp2);
// regen at normal regen * mpregen value
regen = ((regen * RuleI(Character, ManaRegenMultiplier)) / 100) * MPRegen;
}

SetMana(GetMana() + regen);
SendManaUpdatePacket();
}


then change

void Client::DoEnduranceRegen()
{
if(GetEndurance() >= GetMaxEndurance())
return;

int32 level=GetLevel();
int32 regen = 0;

regen = int(level*4/10) + 2;
regen += spellbonuses.EnduranceRegen + itembonuses.EnduranceRegen;

regen = (regen * RuleI(Character, EnduranceRegenMultiplier)) / 100;

SetEndurance(GetEndurance() + regen);
}


to

void Client::DoEnduranceRegen()
{
/* Out of combat Endurance Regen Multiplier added by Zydria */

// Out of combat mp regen rate
// Create variable in db called MPRegen
float ENRegen;
ENRegen = (float)1;

char tmp[10];
char *tmp2;

if(GetEndurance() >= GetMaxEndurance())
return;

int32 level=GetLevel();
int32 regen = 0;

regen = int(level*4/10) + 2;
regen += spellbonuses.EnduranceRegen + itembonuses.EnduranceRegen;
// if player is in combat...
if (IsEngaged())
{
// normal regen
regen = (regen * RuleI(Character, EnduranceRegenMultiplier)) / 100;
}
// if not...
else
{
// if ENRegen is set to higher than 1 in the variables db
if (database.GetVariable("ENRegen", tmp, 9))
ENRegen = strtod((const char*)tmp, &tmp2);
// regen at normal end regen * ENRegen value
regen = ((regen * RuleI(Character, EnduranceRegenMultiplier)) / 100) * ENRegen;
}
SetEndurance(GetEndurance() + regen);
}


then add the rows to your variables table

INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('HPRegen','1','Out of combat hit point regen is multiplied by this number. Default: 1');
INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('MPRegen','1','Out of combat mana regen is multiplied by this number. Default: 1');
INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('ENRegen','1','Out of combat endurance regen is multiplied by this number. Default: 1');


and set the values to whatever you would like them to be, they default to 1 (normal rates) and if the rows arent set in the variables table, then it also defaults to 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...


void Client::DoManaRegen() {
/* Out of combat Mana Regen Multiplier and Med while standing added by Zydria */

// Out of combat mp regen rate
// Create variable in db called MPRegen
float MPRegen;
MPRegen = (float)1;

// Allow characters to meditate while standing up
// create variabe in db called SitToMed, value: 1 = med while standing. 0 = required to sit
int SitToMed;
SitToMed = 0;

char tmp[10];
char *tmp2;

if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;

// checks to see if player can med while standing
if (database.GetVariable("SitToMed", tmp, 9))
SitToMed = strtod((const char*)tmp, &tmp2);

// if not, make sure there sitting
if (SitToMed == 0){
if (IsSitting()) { //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
}
// if med while standing is enabled,
else if (SitToMed == 1)
{
// always meditate
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);

// if character is in combat
if (IsEngaged())
{
// normal regen
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}
//if not
else
{
//if mpregen is set in variable db to higher than 1
if (database.GetVariable("MPRegen", tmp, 9))
MPRegen = strtod((const char*)tmp, &tmp2);
// regen at normal regen * mpregen value
regen = ((regen * RuleI(Character, ManaRegenMultiplier)) / 100) * MPRegen;
}

SetMana(GetMana() + regen);
SendManaUpdatePacket();
}


and add the variable...

INSERT INTO `variables` (`varname`,`value`,`information`) VALUES ('SitToMed','0','0 = Player has to sit to med. 1 = Player meditates while standing. Default: 0');


by default it is set to 0, (player must sit to med) change it to 1 to allow them to med while standing.

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

WildcardX
09-03-2007, 01:18 PM
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...

cavedude
09-03-2007, 01:27 PM
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.

zydria
09-03-2007, 02:08 PM
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.

soulshot
09-04-2007, 01:05 AM
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

zydria
09-04-2007, 02:24 AM
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.


void Client::DoHPRegen() {
/* Out of combat HP Regen Multiplier added by Zydria */

//Set OOCRegen to default to off
int OOCRegen;
OOCRegen = 0;

char tmp[10];
char *tmp2;

if (database.GetVariable("OOCRegen", tmp, 9))
OOCRegen = strtod((const char*)tmp, &tmp2);

sint32 normal_regen = LevelRegen();
sint32 item_regen = itembonuses.HPRegen;
sint32 spell_regen = spellbonuses.HPRegen;
sint32 total_regen = normal_regen + item_regen + spell_regen;

//if Out of Combat Regen is turned on
if (OOCRegen = 1){

// if the player is in combat... normal hp regen
if (IsEngaged())
{
total_regen = total_regen / 100;
}
// if they are out of combat... normal regen multiplied by variable HPRegen
// Default: Normal Regen
else
{
total_regen = (total_regen / 100) * RuleI(Character, HPRegenMultiplier);
}
} else {
total_regen = (total_regen * RuleI(Character, HPRegenMultiplier)) / 100;
}

SetHP(GetHP() + total_regen);
SendHPUpdate();
}




void Client::DoManaRegen() {
/* Out of combat Mana Regen Multiplier added by Zydria */

//Set out of combat regen to default to off
int OOCRegen;
OOCRegen = 0;

char tmp[10];
char *tmp2;

if (database.GetVariable("OOCRegen", tmp, 9))
OOCRegen = strtod((const char*)tmp, &tmp2);

if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;

if (IsSitting()) { //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);

// if out of combat regen is turned on
if (OOCRegen == 1) {

// if character is in combat
if (IsEngaged())
{
// normal regen
regen = regen / 100;
}
//if not
else
{
// regen at normal regen * mpregen value
regen = (regen / 100) * RuleI(Character, ManaRegenMultiplier);
}

} else {
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}


SetMana(GetMana() + regen);
SendManaUpdatePacket();
}





void Client::DoEnduranceRegen()
{
/* Out of combat Endurance Regen Multiplier added by Zydria */

//Set out of combat regen to default to off
int OOCRegen;
OOCRegen = 0;

char tmp[10];
char *tmp2;

if (database.GetVariable("OOCRegen", tmp, 9))
OOCRegen = strtod((const char*)tmp, &tmp2);

if(GetEndurance() >= GetMaxEndurance())
return;

int32 level=GetLevel();
int32 regen = 0;

regen = int(level*4/10) + 2;
regen += spellbonuses.EnduranceRegen + itembonuses.EnduranceRegen;

//if out of combar regen is on.
if (OOCRegen == 1){
// if player is in combat...
if (IsEngaged())
{
// normal regen
regen = regen / 100;
}
// if not...
else
{
// regen at normal end regen * ENRegen value
regen = (regen / 100) * RuleI(Character, EnduranceRegenMultiplier);
}
} else {
regen = (regen * RuleI(Character, EnduranceRegenMultiplier)) / 100;
}


SetEndurance(GetEndurance() + regen);
}



and insert the variable in the db

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');


Be sure to setup the Rules, HPRegenMultiplier, ManaRegenMultiplier and EnduranceRegenMultiplier with a value higher than 1 to recieve regen bonus rates.

By default, the out of combat regen is turned off, so change the variable OOCRegen to 1 to turn it on


Zydria

zydria
09-04-2007, 02:48 AM
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

void Client::DoManaRegen() {
/* Out of combat Mana Regen Multiplier added by Zydria */

//Set out of combat regen to default to off
int OOCRegen;
OOCRegen = 0;

char tmp[10];
char *tmp2;

if (database.GetVariable("OOCRegen", tmp, 9))
OOCRegen = strtod((const char*)tmp, &tmp2);

if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;

if (GetHorseId() != 0) {{
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}

if (IsSitting()){ //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);

// if out of combat regen is turned on
if (OOCRegen == 1) {

// if character is in combat
if (IsEngaged())
{
// normal regen
regen = regen / 100;
}
//if not
else
{
// regen at normal regen * mpregen value
regen = (regen / 100) * RuleI(Character, ManaRegenMultiplier) ;
}

} else {
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}


SetMana(GetMana() + regen);
SendManaUpdatePacket();
}

cavedude
09-04-2007, 03:32 AM
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.

I am not totally understanding the need for this, by default the rules are set to 100. If you were to change them to say 200, your regen would double, or to 50, they would half. Isn't that what you are doing? I am fairly certain the rules effect all regen, both in and out of combat. I feel as though I am missing somthing, so if you could explain that would be awesome.

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.

Sorry for double post, I just update the code to check if players were mounted, if they are, meditate is always on....

No need to apologize, it's your thread :)

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:
if (IsSitting() || GetHorseId() != 0){

I'm no coder, so that's probably incorrect but you get the idea.

zydria
09-04-2007, 03:40 AM
I am not totally understanding the need for this, by default the rules are set to 100. If you were to change them to say 200, your regen would double, or to 50, they would half. Isn't that what you are doing? I am fairly certain the rules effect all regen, both in and out of combat. I feel as though I am missing somthing, so if you could explain that would be awesome.


With the current rules, if you set them to 200 you get 2x regen all the time... Live setup a system where you get increased regen rates while your not in combat, to lower the amount of downtime, but you dont get the increased regen in combat so that it does not make the game unbalanced... Thats what im attempting to do.

cavedude
09-04-2007, 03:49 AM
I actually thought that's how it already was, that's why I got confused. Sorry for the misunderstanding I understand now, thank you :)

WildcardX
09-04-2007, 03:54 AM
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.

zydria
09-04-2007, 06:33 AM
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


void Client::DoHPRegen() {
/* Out of combat HP Regen Multiplier added by Zydria */

sint32 normal_regen = LevelRegen();
sint32 item_regen = itembonuses.HPRegen;
sint32 spell_regen = spellbonuses.HPRegen;
sint32 total_regen = normal_regen + item_regen + spell_regen;

//if Out of Combat Regen is turned on
if (RuleB(Character, OutOfCombatRegen)){

// if the player is in combat... normal hp regen
if (IsEngaged())
{
total_regen = total_regen;
}
// if they are out of combat... normal regen multiplied by HPRegenMultiplier Rule
// Default: Normal Regen
else
{
total_regen = (total_regen * RuleI(Character, HPRegenMultiplier)) / 100;
}
//if out of combat regen is turned off, use normal regen rules.
} else {
total_regen = (total_regen * RuleI(Character, HPRegenMultiplier)) / 100;
}

SetHP(GetHP() + total_regen);
SendHPUpdate();
}




void Client::DoManaRegen() {
/* Out of combat Mana Regen Multiplier added by Zydria */

if (GetMana() >= max_mana)
return;
int32 level=GetLevel();
int32 regen = 0;
//If player is sitting or riding a horse... they should meditate if they have it.
if (IsSitting() ||(GetHorseId() != 0)) { //this should be changed so we dont med while camping, etc...
if(HasSkill(MEDITATE)) {
medding = true;
regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
CheckIncreaseSkill(MEDITATE, -10);
}
else
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
else {
medding = false;
regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(le vel/5);
}
regen += GetAA(aaMentalClarity);
regen += GetAA(aaBodyAndMindRejuvenation);

// if out of combat regen is turned on
if (RuleB(Character, OutOfCombatRegen)) {

// if character is in combat
if (IsEngaged())
{
// normal regen
regen = regen;
}
//if not
else
{
// regen at normal regen * mpregen value
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}

// if out of combat regen is turned off, use normal regen rules
} else {
regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
}

SetMana(GetMana() + regen);
SendManaUpdatePacket();
}




void Client::DoEnduranceRegen()
{
/* Out of combat Endurance Regen Multiplier added by Zydria */

if(GetEndurance() >= GetMaxEndurance())
return;

int32 level=GetLevel();
int32 regen = 0;

regen = int(level*4/10) + 2;
regen += spellbonuses.EnduranceRegen + itembonuses.EnduranceRegen;

//if out of combat regen is on.
if (RuleB(Character, OutOfCombatRegen)) {
// if player is in combat...
if (IsEngaged())
{
// normal regen
regen = regen;
}
// if not...
else
{
// regen at normal end regen * ENRegen value
regen = (regen * RuleI(Character, EnduranceRegenMultiplier))/ 100;
}
// if out of combat regen is turned off, use normal regen rules.
} else {
regen = (regen * RuleI(Character, EnduranceRegenMultiplier)) / 100;
}


SetEndurance(GetEndurance() + regen);
}


then add this to ruletypes.h under the character section

RULE_BOOL( Character, OutOfCombatRegen, false ) // Whether or not to used increased regen rates while player is not in combat.


turn it off or on from the rules table in the db or the #rules command ingame.

KLS
09-04-2007, 06:43 PM
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.


enum CombatState {
csInCombat,
csRecovering,
csRestingButConflicted,
csResting
};


Clearly in combat, you're fighting.

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!

John Adams
09-04-2007, 07:03 PM
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!! ;)

soulshot
09-05-2007, 08:02 AM
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.

KLS
09-05-2007, 05:10 PM
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.

Irreverent
09-11-2007, 03:27 PM
This would be great on the solo server, since its hard to balance a hit vs. regen and the up time between battles.

wraithlord98
12-11-2007, 03:40 PM
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).

soulshot
12-12-2007, 01:23 AM
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

wraithlord98
12-19-2007, 01:00 PM
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.

Annihilator
01-13-2008, 06:28 AM
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.

ChaosSlayer
01-13-2008, 06:36 AM
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

ChaosSlayer
01-29-2008, 01:37 PM
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

cavedude
01-29-2008, 01:48 PM
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)

ChaosSlayer
01-29-2008, 01:58 PM
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 =)

KLS
01-29-2008, 02:50 PM
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.

ChaosSlayer
01-29-2008, 02:52 PM
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...

ChaosSlayer
01-29-2008, 02:53 PM
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.

oh thanks KSL for looking into that =)

it would be good feature to have wihotu going crazy of %% rates for general hp/mana reg just to reduce downtime

cavedude
01-30-2008, 01:02 AM
You need to use the newest (correct) CVS for that data. The releases don't have them.

Annihilator
01-30-2008, 05:06 AM
Having a dot on your person should not matter at all

On EQLive, if you are dotted or diseased PC OOC Regen *will not* engage until it is cured or has run it's course. That's why players squeal like a pig for a cure when they are tashed or malo'd.

ChaosSlayer
01-30-2008, 05:53 AM
You need to use the newest (correct) CVS for that data. The releases don't have them.

Cavedude - I am looking at the ruke_values.sql which obtained from CVS last ngiht.


INSERT INTO `rule_values` VALUES (0,'GM:MinStatusToZoneAnywhere','250'),(0,'Charact er:MaxLevel','65'),(0,'Character:LeaveCorpses','tr ue'),(0,'Character:LeaveNakedCorpses','true'),(0,' Character:ExpMultiplier','0.75'),(0,'Character:Dea thExpLossLevel','10'),(0,'Character:CorpseDecayTim eMS','86400000'),(0,'Character:AutosaveIntervalS', '300'),(0,'Character:HPRegenMultiplier','100'),(0, 'Character:ManaRegenMultiplier','100'),(0,'Charact er:EnduranceRegenMultiplier','100'),(0,'Guild:MaxM embers','2048'),(0,'Skills:MaxTrainTradeskills','2 1'),(0,'Pets:AttackCommandRange','150'),(0,'World: ZoneAutobootTimeoutMS','120000'),(0,'World:ClientK eepaliveTimeoutMS','95000'),(0,'Aggro:PetSpellAggr oMod','10'),(0,'Aggro:SongAggroMod','33'),(0,'Aggr o:SpellAggroMod','100'),(0,'Combat:BaseCritChance' ,'0.0'),(0,'Combat:WarBerBaseCritChance','0.03'),( 0,'Combat:BerserkBaseCritChance','0.06'),(0,'Comba t:NPCBashKickLevel','6'),(0,'Character:Consumption Multiplier','200'),(0,'Spells:AutoResistDiff','15' ),(0,'Spells:ResistChance','2.0'),(0,'Spells:Resis tMod','0.40'),(0,'Spells:PartialHitChance','0.7'), (0,'Combat:ClientBaseCritChance','0.0'),(0,'Zone:N PCGlobalPositionUpdateInterval','60000'),(0,'NPC:M inorNPCCorpseDecayTimeMS','600000'),(0,'NPC:MajorN PCCorpseDecayTimeMS','1200000'),(0,'Zone:Graveyard TimeMS','1200000'),(0,'Zone:EnableShadowrest','1') ,(0,'Map:FixPathingZWhenLoading','true'),(0,'Map:F ixPathingZAtWaypoints','false'),(0,'Map:FixPathing ZWhenMoving','true'),(0,'Map:FixPathingZOnSendTo', 'true'),(0,'Zone:ClientLinkdeadMS','180000'),(0,'N PC:UseItemBonusesForNonPets','true'),(0,'Map:FixPa thingZMaxDeltaSendTo','20.0'),(0,'Map:FixPathingZM axDeltaLoading','20.0'),(0,'Map:FixPathingZMaxDelt aMoving','20.0'),(0,'Map:FixPathingZMaxDeltaWaypoi nt','20.0'),(0,'Character:HealOnLevel','false'),(0 ,'Character:FeignKillsPet','false'),(0,'Character: ItemManaRegenCap','15'),(0,'Character:ItemHealthRe genCap','15'),(0,'Combat:UseIntervalAC','true'),(0 ,'Combat:PetAttackMagicLevel','30'),(0,'NPC:SayPau seTimeInSec','10'),(0,'NPC:OOCRegen','0.66'),(0,'A ggro:SmartAggroList','true'),(0,'Aggro:SittingAggr oMod','35'),(0,'Aggro:MeleeRangeAggroMod','20'),(0 ,'Aggro:CurrentTargetAggroMod','0'),(0,'Aggro:Crit icallyWoundedAggroMod','100'),(0,'Aggro:SlowAggroM od','450'),(0,'Aggro:IncapacitateAggroMod','500'), (0,'Aggro:MovementImpairAggroMod','175'),(0,'NPC:B uffFriends','true'),(0,'Character:DeathItemLossLev el','10'),(0,'Watermap:CheckWaypointsInWaterWhenLo ading','true'),(0,'Watermap:CheckForWaterAtWaypoin ts','false'),(0,'Watermap:CheckForWaterWhenMoving' ,'true'),(0,'Watermap:CheckForWaterOnSendTo','true '),(0,'Watermap:CheckForWaterWhenFishing','true'), (0,'Watermap:FishingRodLength','30'),(0,'Watermap: FishingLineLength','40');



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

So_1337
01-30-2008, 07:51 AM
NPC regen is in there: (0,'NPC:OOCRegen','0.66')

However, and KimLS mentioned this, player regen is quite a way off.