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 10-08-2006, 05:33 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default Endurance

Noticed Endurance wasn't working, neither were multi timer disciplines. Looked into trying to implement them in the past but never really got around to finishing it till today.

Since the changes are all over the place I put them into unified diff form, hopefully you all can follow it. How endurance regen works I'm not entirely sure on and just sorta guessed at a formula for it but the numbers don't match up on the client when it tics so I know it's off a bit, same goes for when you jump. Would appreciate if anyone knows more than me on how it's supposed to work that they say something.

Also CVS didn't put this in the diff and I almost missed it
ptimer.h has changed, find:
Code:
	pTimerDisciplineReuse = 14,
	pTimerCombatAbility = 15,
change to:
Code:
	pTimerDisciplineReuse = 14,
	pTimerCombatAbility = 23,
http://www.hmproject.org/files/endurance_diff.txt
Reply With Quote
  #2  
Old 10-09-2006, 01:32 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

I've read that "endurance", as a stat, just doesn't work currently. If this is why, then that's cool. A problem many have reported is simply zoning and losing your endurance - which usually ends with someone saying "not implemented yet".

Thanks again!
J
Reply With Quote
  #3  
Old 10-09-2006, 07:42 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I store the endurance in the Player Profile in this so you should zone with the endurance you had in your PP from the last known save. The problem is that right now endurance isn't tracked at all by the server so you can't save what you can't track.

I looked at the code this morn after I had finished writing it last night and noticed a few oversights on my part. I send two manachange packets per tic and this could be combined with the one that's sent for mana. Would need to be reconfigured to work if you don't have any mana, perhaps in a similar way by tracking the last changed endurance as well. Right now the way I did it is horribly inefficient.

Another was my CalcMaxEnd(), the code I used allocated a lot of pointless variables, and I also got it from someone else and while I can't really change the wording of the formula and while I take no credit for the function I didn't think it right to keep the entire function exactly the same as it was.
Code:
void Client::CalcMaxEnd()
{
	int Stats = GetSTR()+GetSTA()+GetDEX()+GetAGI();
	max_end = ( int( min( Stats, 800 ) / 4 ) * 0.075 * GetLevel() );
	max_end += int( max( ( min( Stats, 800 ) - 400 ), 0 ) / 4 ) * ( 0.075 * GetLevel() );
	max_end += int( max( ( min( Stats, 800 ) - 400 ), 0 ) / 8 ) * ( 0.075 * GetLevel() );
	max_end += int( max( Stats - 800, 0 ) / 8 ) * ( 0.075 * GetLevel() ) * 2;
	max_end += int( max( Stats - 800, 0 ) / 16 ) * ( 0.075 * GetLevel() );
	max_end += GetLevel()*15 + spellbonuses.Endurance + itembonuses.Endurance;
}
Reply With Quote
  #4  
Old 10-09-2006, 02:02 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

What's really going to throw a kink in things is that the whole meaning of endurance got changed in the middle of the game (around GoD or so). Most of the endurance code you see might be going off the old pre-discipline ruleset.

After disciplines, the only things that really reduced endurance were using a discipline, jumping, or suffering a detrimental spell that sucks away your endurance.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #5  
Old 10-09-2006, 05:27 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah, trying to find info on *current* disciplines and stamina system proved to be a challenge, came across a lot of outdated resources in the process and no one seems to know anything concrete about how endurance regen works =/. I'm going to take some time in the next few days to try to figure out a more accurate endurance regen and jump formulas and also try to hammer out the problems with my first implementation of the endurance system.
Reply With Quote
  #6  
Old 10-09-2006, 10:01 PM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

I just want to say thank you! I am really exited about your recent enhancements and fixes. Keep up the good work.

Btw.: Not a biggie but I know that stuff like intoxication(from training Alcohol Tolerance)is reset on logout/login and zoning. I recon this is due to the same reasons endurance didnt stick.
Reply With Quote
  #7  
Old 10-11-2006, 05:07 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I reworked some of my earlier code.
-Changed how the regen works, it's generally accurate now though I highly suspect there's a variable in play other than level but I don't know it and level appears to make the majority of the impact.
-The reduction on jump server side is almost spot on now.
-Changed the invigor effects to reduce stamina usage instead of add to stamina regen, and added implementation for the endurance change effect.
-Along with that I combined the client endurance and mana regen so they would send fewer redundant mana change packets.
..and I think there was something else but I can't remember right now =x

http://www.hmproject.org/files/endurance_diff2.txt

Take a look and don't be shy about telling me I screwed up something.
Reply With Quote
  #8  
Old 10-12-2006, 11:24 AM
Elysius
Sarnak
 
Join Date: Dec 2005
Posts: 43
Default

Give this man a beer.

...And some sort of title or something.
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 07:38 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