Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2016, 05:52 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default HP regen - see-sawawing at level 1

Hello,

Another newb question. I rolled up a ranger and noticed that after I have taken some damage, while resting, my hitpoints go up then back down then up again then back down. Eventually, I get regened all the way up, but I am wondering if there is way to smooth out the hitpoint regen.

Thanks for any help you all can provide.
Reply With Quote
  #2  
Old 03-19-2016, 05:55 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

The client does HP regen itself as well. You can notice this behavior on live as well.
Reply With Quote
  #3  
Old 03-19-2016, 05:58 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

It's possible in theory but basically no
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #4  
Old 03-19-2016, 06:39 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

Quote:
Originally Posted by demonstar55 View Post
The client does HP regen itself as well. You can notice this behavior on live as well.
I don't see this happening on live.

Quote:
It's possible in theory but basically no
Drat.
Reply With Quote
  #5  
Old 03-19-2016, 07:08 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

While you're right that this doesn't happen on live (unless maybe under some special circumstance such as affected by spells or racial modifiers), what Demonstar said still rings true.

EQEmu simply pushes an update to hp and mana every two seconds; This becomes an issue because the client and the server fight for different values at different intervals.

I've heard of a couple people solving this problem. I've never seen it fixed personally. If you reverse engineered the client you could probably figure out when to properly push updates. And yeah, it sucks. It's the one thing I wish was fixed
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #6  
Old 03-19-2016, 08:17 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

It happens on live. Not as much as eqemu, but it does happen. There is also other issues like not every client using the same formula. Which would make the issue worse when the server disagrees with the client.
Reply With Quote
  #7  
Old 03-19-2016, 08:54 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

I noticed this a lot on live with mana regen.. its super annoying :p
Reply With Quote
  #8  
Old 03-19-2016, 09:14 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

Weird! I leveled to 25 and I didn't notice it. I popped on again and it's still not happening to me.
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #9  
Old 03-19-2016, 10:31 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

Quote:
Originally Posted by Coenxai View Post
Weird! I leveled to 25 and I didn't notice it. I popped on again and it's still not happening to me.
On live or on an EqEmu server?

Quote:
EQEmu simply pushes an update to hp and mana every two seconds; This becomes an issue because the client and the server fight for different values at different intervals.
That's what I figured. So, I guess what I would like to do is try to get the server to stop pushing and let the client do its thing. I don't care about slowing it down for nostalgia purposes. I'll be looking around for it when I get some time, but to save some of that time, anyone know where that code is in the server source?
Reply With Quote
  #10  
Old 03-20-2016, 12:42 AM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

On live of course? :P

As for the second question, there's really no easy way to answer. I believe it's in your best interest to simply use the marquee (someone tell me this exists and that I'm not crazy.) If I recall someone (probably Akkadius) developed a tool that displays your vitals on-screen--much like a HUD. This will be accurate as it's coming from the server.
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #11  
Old 03-20-2016, 09:59 AM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

Thanks so much for your help. I'll dig around in the code and see what's what.
Reply With Quote
  #12  
Old 03-22-2016, 11:13 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

I have yet to be able to solve this for the innate mana/hp regen.

However, this problem can be some what serious when using damage of time spells on clients, especially large ones. The HP bounce will sometimes make you unconscious.

To resolve it on Storm Haven, I run an SQL script on the spells_new table before exporting it which sets all damage over time spells to 1 damage. This resolves the bounce issue completely, since client side will think its only doing 1 damage and server sets it correctly.
Reply With Quote
  #13  
Old 03-22-2016, 01:51 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

Quote:
Originally Posted by Kayen View Post
I have yet to be able to solve this for the innate mana/hp regen.

However, this problem can be some what serious when using damage of time spells on clients, especially large ones. The HP bounce will sometimes make you unconscious.

To resolve it on Storm Haven, I run an SQL script on the spells_new table before exporting it which sets all damage over time spells to 1 damage. This resolves the bounce issue completely, since client side will think its only doing 1 damage and server sets it correctly.
That's an awesome solution
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #14  
Old 03-22-2016, 03:12 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

For sure. What do you key off of or do you already have your list of spells?
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #15  
Old 03-22-2016, 06:01 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

This is what I use. Its not the most elegant SQL but it works.

Code:
-- Need to run on the copied spell table prior to updating file so that NPC cast dots don't cause HP bounce on clients.

UPDATE spells_new_copy SET effect_base_value1 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid1 = 0 AND effect_base_value1 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value2 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid2 = 0 AND effect_base_value2 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;


UPDATE spells_new_copy SET effect_base_value3 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid3 = 0 AND effect_base_value3 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value4 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid4 = 0 AND effect_base_value4 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value5 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid5 = 0 AND effect_base_value5 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value6 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid6 = 0 AND effect_base_value6 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value7 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid7 = 0 AND effect_base_value7 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value8 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid8 = 0 AND effect_base_value8 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value9 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid9 = 0 AND effect_base_value9 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value10 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid10 = 0 AND effect_base_value10 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value11 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid11 = 0 AND effect_base_value11 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;

UPDATE spells_new_copy SET effect_base_value12 = -1 WHERE buffduration >= 1 AND goodEffect = 0 AND effectid12 = 0 AND effect_base_value12 < 0 AND classes1 = 255 AND classes1 = 255 AND classes2 = 255 AND classes3 = 255 AND 
classes4 = 255 AND classes5 = 255 AND classes6 = 255 AND classes7 = 255 AND classes8 = 255 AND classes9 = 255 AND classes10 = 255 AND classes11 = 255 AND classes12 = 255 AND classes13 = 255 AND classes14 = 255 AND classes15 = 255
AND classes16 = 255 AND descnum <= 400000;
Reply With Quote
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 01:42 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3