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 09-09-2008, 06:09 PM
cybernine186
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default Calculating Bonus Damage

I am trying to determine the formula for calculating bonus damage on all weapons.

I have looked through the code and the only thing I can find is this code below. However say when I use "A Weighted Axe" with a delay of 150 and a character level of 50 the calculation works according to lucy. Now the problem is if I change the level of the character to 60 it does not calculate out right. This is the information I get when I use this formula to calculate out the following levels. (The formula I used rounded down all fractions)

LEVEL || Bonus Dmg

50 || 52
53 || 54
55 || 56
60 || 58


Example: A Weighted Axe for a lvl 50 character
(0 + (((50 - 25) / 3) + 1) + ((50 - 27) / 4) + ((150 - 34) / 3)) = 52

Example: A Weighted Axe for a lvl 60 character
(0 + (((60 - 25) / 3) + 1) + ((60 - 27) / 4) + ((150 - 34) / 3)) = 58


Is the EMU Server just using there own formula of calculating the bonus damage of a weapon or am I not doing something right?

Any information is greatly appreciated.


Code:
int Mob::GetWeaponDamageBonus(const Item_Struct* Weapon)
{
	// Kaiyodo - Calculate the damage bonus for a weapon on the main hand
	if (GetLevel() < 28)
		return(0);
	
	// Check we're on of the classes that gets a damage bonus
	if (!IsWarriorClass())
		return 0;
	
	int BasicBonus = ((GetLevel() - 25) / 3) + 1;
	
	if(!Weapon)
		return(BasicBonus);
	
	// If we have no weapon, or only a single handed weapon, just return the default
	// damage bonus of (Level - 25) / 3
	if (Weapon->ItemClass == ItemClassCommon)
		return BasicBonus;
	
	if ((Weapon->ItemType == ItemType1HS) || (Weapon->ItemType == ItemTypePierce) || (Weapon->ItemType == ItemType1HB))
		return BasicBonus;
	
	// Things get more complicated with 2 handers, the bonus is based on the delay of
	// the weapon as well as a number stored inside the weapon.
	int WeaponBonus = 0;	// How do you find this out?
	
	// Data for this, again, from www.monkly-business.com
	if (Weapon->Delay <= 27)
		return (WeaponBonus + BasicBonus + 1);
	if (Weapon->Delay <= 39)
		return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4));
	if (Weapon->Delay <= 42)
		return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4) + 1);
	// Weapon must be > 42 delay
	return (WeaponBonus + BasicBonus + ((GetLevel()-27) / 4) + ((Weapon->Delay-34) / 3));
}
Reply With Quote
  #2  
Old 09-09-2008, 06:14 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

I have inline question on the subject as well.
does dmg bonsu of a weapon is been added to the base dmg of the weapon (so a dmg 10 weapon with dmg bonsu of 2 becomes 12 dmg base weapon) or does the dmg added to the final strike? (10 dmg weapon say produced 14 dmg and 2 added at the end)?

if its the 2nd way the dmg bonus not realy adding all that much dmg... (you prabobly hiting for 1200+ with 50 dmg weapon around lev 75 so say +25 dmg bonus to 1200 dmg delivered hardly noticeable)
Reply With Quote
  #3  
Old 09-10-2008, 04:00 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

That above is basically the code. It's added on top of the calculated hit not as part of base damage. People have been pestering me to fix it but I really haven't been able to figure out a formula that works; there's so variable I'm missing.

It's only about 50% accurate right now on most weapons, so I think people are kind of deluding themselves into thinking it will fix all 2h weapon's problems. It would certainly help if it worked right though.
Reply With Quote
  #4  
Old 09-10-2008, 11:56 AM
cybernine186
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

So the client actually views the weapon as the correct Bonus Damage but its only for a reference. If I can determine the correct formula I will post it.

Thanks for the quick reply.
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:54 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