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)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-30-2014, 03:01 PM
DrakePhoenix
Fire Beetle
 
Join Date: Jan 2014
Posts: 22
Question Item bonuses calc when below recommended level?

Hi everyone,

First of all, I'm sorry if this would be better posted elsewhere, but based on the different boards, I felt this one might be most appropriate.

I've been working on a custom private server for my own use. It's all up and running, and seems to be working correctly (what I've tested so far anyway). However, I noticed an oddity with the item bonuses when the character level is below the recommended level...

I had made some duplicates of Elegant Defiant Chain armor pieces and set their required level to 0 and recommended level to 70 for testing out item bonus scaling. I noticed, however, that they would no longer update to max HP and Mana on the client interface (always had only partial HP and Mana). I'm using Rain of Fear client, so the first thing I did was to double-check that my database had "Character:SoDClientUseSoDHPManaEnd" correctly set in the rule_values table. It was set correctly. So I started taking the armor pieces off one at a time to see if there was any specific armor piece that might be an issue. I noticed that every time I removed a piece, the HP and Mana got closer to full bars on the client UI.

All of this led me to think that it might be due to the way item stat bonuses are calculated on the server, as there appears to be a discrepancy between what the server sees is the max HP and Mana, and thus capping off and allowing no further regen, vs. the what the client thinks the max should be.

So I went poking through the code and took a close look at the "Client::CalcRecommendedLevelBonus()" function in the bonuses.cpp file. I was always under the impression that item stats should scale dirrectly proportionate to the current level vs. the recommended level. So, for example, if the character's current level is 75 and the item's recommended level is 100, then stats would scale to exactly 75% of their maximums. Similarly, I thought that if the current level was 25 and recommended level was 100, then stats would scale to be exactly 25% of their maximums. I've never really been sure about how rounding works for that, but I wasn't too interested before. But the function code is very different. Instead of simply taking (basestat * (level / reclevel)) to determine scaled stat, the code instead takes (basestat * ((level * 10000) / reclevel)), then adds or subtracts 5000 depending on if the calculated value is positive or negative, and then divides the result by 10000. This results in item stats being scaled in such a way that the closer your level to the recommended level, the smaller the falloff amount, and the farther your level is from the recommended, the larger the falloff amount.

But since there appears to be a discrepancy between what the server sees as the max stats vs. what the client thinks (and displays) the max stats should be (and displays them as), it seems to me that this calculation may not be accurate.

So I was wondering where the current calculation method came form. How was it determined? Is it known to be in any way inaccurate? Did any clients after UF change the way that stat bonuses are calculated and displayed yet again and that simply hasn't been updated in the server code?

I'm not looking to change anything in the calculation on my server right now, I just would like more information about this particular issue.

Thanks,
Drake Phoenix
Reply With Quote
 


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 02:32 AM.


 

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