PDA

View Full Version : HP regen - see-sawawing at level 1


superemu
03-19-2016, 05:52 PM
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.

demonstar55
03-19-2016, 05:55 PM
The client does HP regen itself as well. You can notice this behavior on live as well.

Coenxai
03-19-2016, 05:58 PM
It's possible in theory but basically no

superemu
03-19-2016, 06:39 PM
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.

It's possible in theory but basically no

Drat.

Coenxai
03-19-2016, 07:08 PM
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 :)

demonstar55
03-19-2016, 08:17 PM
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.

NatedogEZ
03-19-2016, 08:54 PM
I noticed this a lot on live with mana regen.. its super annoying :p

Coenxai
03-19-2016, 09:14 PM
Weird! I leveled to 25 and I didn't notice it. I popped on again and it's still not happening to me.

superemu
03-19-2016, 10:31 PM
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?

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?

Coenxai
03-20-2016, 12:42 AM
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.

superemu
03-20-2016, 09:59 AM
Thanks so much for your help. I'll dig around in the code and see what's what. :)

Kayen
03-22-2016, 11:13 AM
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.

Coenxai
03-22-2016, 01:51 PM
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

N0ctrnl
03-22-2016, 03:12 PM
For sure. What do you key off of or do you already have your list of spells? :)

Kayen
03-22-2016, 06:01 PM
This is what I use. Its not the most elegant SQL but it works.

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

Akkadius
03-22-2016, 06:27 PM
This is genius Kayen, I'm not really surprised cause its you, but we should streamline this into something usable by all, potentially the eqemu_update script, maybe build in import/export options into it with this in mind. Or build it into the binary we use for import/export already.

Coenxai
03-23-2016, 03:48 AM
Well continuing on this train what if we hid meditate and regenerative effects (Koadics/Regeneration) from the client? We could achieve near perfect synchronization on servers that don't utilize out of combat regen, right?

Coenxai
03-23-2016, 03:24 PM
Example Synchronization Video (https://youtu.be/G4S_WwXNrnE)
(Could be tuned even more)

If we hide meditation, out of combat regen and spell effects from the client, we can achieve near perfect synchronization. What is everyone's stance on this? We could add it as a rule. (And it would be insanely simple and quick to add) Downside is... you wouldn't be able to see meditate in the skill window I guess?

superemu
03-23-2016, 06:43 PM
After digging around in the code, I see the problem now. The client (in my case, Titanium) never tells the server how much resource it thinks the player should have. SO, the server can't possibly sync itself to the client regen.

Has anyone tried to build a client from scratch? :)

demonstar55
03-23-2016, 06:51 PM
The server shouldn't need to know how much the client thinks it has, in an ideal world they would tick at the same time :P (I think live actually does, no idea how :()

superemu
03-23-2016, 06:56 PM
Ticking at the same time doesn't matter as much if its ticking at the same rate. The problem is - how can we sync regen rate in our situation? I have no idea what the regen rate is in the client. Does it change over time? If I knew the formula for regen in the client, I would just use the same in the server and not send an update to the client. (I'm not sending updates now and the client regen is smooth as silk. It's just regening faster than the server does.)

Kayen
03-23-2016, 09:07 PM
Well continuing on this train what if we hid meditate and regenerative effects (Koadics/Regeneration) from the client? We could achieve near perfect synchronization on servers that don't utilize out of combat regen, right?


The method works the same on regens and mana regens as damage over time.
As long as the server side spell table as the actual values. Just remember though messing with values in the client side spell file will cause spell descriptions to be off. Ie if you set regen to 1 instead of 100, it will display as 1 to the client.

Coenxai
03-23-2016, 10:49 PM
The method works the same on regens and mana regens as damage over time.
As long as the server side spell table as the actual values. Just remember though messing with values in the client side spell file will cause spell descriptions to be off. Ie if you set regen to 1 instead of 100, it will display as 1 to the client.

Having inaccurate spell descriptions still vastly outweighs a spastic client in my opinion. It seems like I'm one of the very few that feel that way though. I don't know how it doesn't drive you guys insane. Also, server operators could always just apply fixed strings--so it would really only matter for people that would want to play regular EverQuest content.

Anyway, I won't push the matter further and just keep the changes local. Thanks a ton again for that, Kayen. :)