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 03-28-2008, 08:39 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default npc chancetohit?

This code seems to be doing the calculations in attack.cpp but for some reason a lvl 1 npc hitting a lvl 1 player only hits about 30% or less, of his swings. I must be missing something?
Code:
	else{
		//some class combos have odd caps, base our attack skill based off of a warriors 1hslash since 
		//it scales rather evenly across all levels for warriors, based on the defenders level so things like
		//light blues can still hit their target.
		uint16 atkSkill = (database.GetSkillCap(WARRIOR, (SkillType)_1H_SLASHING, defender->GetLevel()) + 5);
		int skilldiff = defender->GetSkill(DEFENSE) - atkSkill;
		bonus = 0;
		if(skilldiff > 10){
			bonus = -(10 + ((defender->GetSkill(DEFENSE) - atkSkill - 10) * 2 / 5));
		}
		else if(skilldiff <= 10 && skilldiff > 0){
			bonus = -(2 + ((defender->GetSkill(DEFENSE) - atkSkill) / 10));
		}
		else{
			bonus = 1 + ((atkSkill - defender->GetSkill(DEFENSE)) / 25);
		}
		chancetohit += bonus;
	}
__________________
-Croup (the rogue)
Creator of Pandemic (PvP-Racewars)
Reply With Quote
  #2  
Old 03-28-2008, 09:33 AM
LordKahel
Fire Beetle
 
Join Date: Sep 2007
Posts: 22
Default

MeleeMitigation also plays a role , because if AC mitigation reduces the damage to 0 then it registers has a MISS. So not all the misses comes from the mob actually missing his hit roll.
Reply With Quote
  #3  
Old 03-28-2008, 09:46 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default

I've got my lvl 1 mobs hitting for min 7 max 8, i don't think it could be turning 20%+ of hits into misses.
__________________
-Croup (the rogue)
Creator of Pandemic (PvP-Racewars)
Reply With Quote
  #4  
Old 03-28-2008, 09:51 AM
moydock
Discordant
 
Join Date: Jun 2005
Posts: 286
Default

if i'm doing this right, a lvl 1 npc hitting a lvl 1 pc, the npc should have a 55.5% chance to hit. PC having 0 defense.
__________________
-Croup (the rogue)
Creator of Pandemic (PvP-Racewars)
Reply With Quote
  #5  
Old 03-28-2008, 02:27 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

A level 1 mob will have roughly the same chance to hit as to be hit by a level 1 player BEFORE mitigation mitigates any hits to misses. If your players have naturally high ac for level 1s the mobs will have to have more strength to compensate, and it scales very quickly in the first ten levels.
Reply With Quote
  #6  
Old 03-28-2008, 03:03 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

the biggest problem with "to hit" chance that there is no way to improve them with any stat =)
Originaly it was belived DEX makes you score hits more often (hence you could build your char towards DEX rather than STR, so you would hit for less dmg and every swing), but since you told us DEX is not improving your to hit chances - we are stuck at pre-set % chances for class/level etc
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 09:52 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