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
  #31  
Old 11-06-2006, 10:26 PM
Damilis's Avatar
Damilis
Hill Giant
 
Join Date: Dec 2002
Location: Nottingham!!
Posts: 217
Default

Quote:
Originally Posted by John Adams
Ok, now I know you are an engineer IRL.

If I had a dime...
Now now, there's nothing wrong with engineers :P

KLS earns two thumbs up IMHO. Give that man a Klondike Bar!
__________________
GM/ServerOP - Shadows of Norrath
Reply With Quote
  #32  
Old 11-09-2006, 06:07 AM
Dralanna
Sarnak
 
Join Date: Jan 2006
Posts: 49
Default

Looking at your code for backstabs, and I'm a little confused.

the old code for max damage is
Code:
skillmodifier = (float)bs_skill/25.0;	//formula's from www.thesafehouse.org
max_hit = (int)(((float)primaryweapondamage * 2.0) + 1.0 + ((level - 25)/3.0) + ((GetSTR()+GetSkill(BACKSTAB))/100));
max_hit *= (int)skillmodifier;
the new code is
Code:
skillmodifier = (bs_skill*100)/25;	//formula's from www.thesafehouse.org
if(level > 25){
max_hit = ((primaryweapondamage*2) + 1 + ((level-25)/3) + ((GetSTR()+bs_skill)/100));
}
else{
max_hit = ((primaryweapondamage*2) + 1 + ((GetSTR()+bs_skill)/100));
}
max_hit *= skillmodifier;
max_hit /= 100;
So unless I'm missing something, for rogues over 25th level, the code is the same. In the new code you're multiplying the backstab skill by 100 in the skillmodifier variable, but then dividing by 100 in the end. Seems like an unneeded calculation.
Reply With Quote
  #33  
Old 11-09-2006, 09:13 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

The backstab formulas are wrong, Rogean is working on more accurate ones at the moment. The current ones pretty much under estimate backstab damage across the board, I just rewrote the formula for under 25 because part of it becomes increasingly negative for every 3 levels under 25 you become.

Let me explain what's happening with the new code with the * 100 / 100 later thing.

skillmodifier = (bs_skill*100)/25;

this makes our skill modifier for say 90 skill 360, in the old code we used floats for accuracy but we don't like to mix float and int math where we can avoid it. The old mod for a 90 skill would have been 3.6 but if we tried to simply switch that over we would lose the accuracy of using floats.. but when working with larger numbers you don't lose that accuracy when dividing.

Essentially we don't lose a .6 in the calculation doing it this way and don't have to convert from ints to floats to ints again.

I may not of explained it as well as I could have but meh.
Reply With Quote
  #34  
Old 11-09-2006, 09:42 AM
Dralanna
Sarnak
 
Join Date: Jan 2006
Posts: 49
Default

Nope, that explains it perfectly... makes sense.

Thanks,
Reply With Quote
  #35  
Old 11-10-2006, 08:49 AM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

Quote:
Originally Posted by KLS
Essentially we don't lose a .6 in the calculation doing it this way and don't have to convert from ints to floats to ints again.
You know, the more I watch you guys in action. The more I am impressed with the things you do. Very insightful work around on the (non-)conversion. I wish I would have had more people like you on my crew back in the Navy.
Reply With Quote
  #36  
Old 11-10-2006, 09:23 AM
Damilis's Avatar
Damilis
Hill Giant
 
Join Date: Dec 2002
Location: Nottingham!!
Posts: 217
Default

Quote:
Originally Posted by bufferofnewbies
I wish I would have had more people like you on my crew back in the Navy.
Woohoo I'm not the only squid here!
__________________
GM/ServerOP - Shadows of Norrath
Reply With Quote
  #37  
Old 11-10-2006, 09:47 AM
mattmeck
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Damilis
Woohoo I'm not the only squid here!

EQEmu coveres all branches, lots of everyone but the marines...
Reply With Quote
  #38  
Old 11-10-2006, 11:12 AM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

<<-- Bubblehead. Those who know will understand.
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:09 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3