Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2013, 10:49 AM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default Pets and AC

Do pets actually use the AC value in database?

I ask this because i had tested a level 60 pet who at first had roughly 1300 ac against a flame lord (level 64) and in parsing i noticed that over 75% of hits were max hit.

I then doubled the AC to 3000 and ran the same test with exactly the same results leading me to believe that AC either it is not working for pets, or i am misunderstanding something.

Do pets use the Mob::MeleeMitigation function in attack.cpp or is there someplace else i am missing? I was looking at this chunk of it..

Code:
else if(IsNPC())
		{
			armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
		}
So it seems to pull raw ac value from database then divide by 2.25(rule value, no idea why they divide this).

Anyhow, anyone have a clue what i am missing here or someplace i can look to get pet AC working? Thanks!
Reply With Quote
  #2  
Old 03-21-2013, 11:02 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Quote:
Originally Posted by Armm View Post
Do pets actually use the AC value in database?

I ask this because i had tested a level 60 pet who at first had roughly 1300 ac against a flame lord (level 64) and in parsing i noticed that over 75% of hits were max hit.

I then doubled the AC to 3000 and ran the same test with exactly the same results leading me to believe that AC either it is not working for pets, or i am misunderstanding something.

Do pets use the Mob::MeleeMitigation function in attack.cpp or is there someplace else i am missing? I was looking at this chunk of it..

Code:
else if(IsNPC())
		{
			armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
		}
So it seems to pull raw ac value from database then divide by 2.25(rule value, no idea why they divide this).

Anyhow, anyone have a clue what i am missing here or someplace i can look to get pet AC working? Thanks!
Try adding && !IsPet to that portion of code, would probably solve your issue. I'm fairly certain the issue lies in the fact that it's an NPC fighting another NPC and thus calcs get out of whack.
Reply With Quote
  #3  
Old 03-21-2013, 12:07 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

I added code in attack.cpp

Code:
else if(IsNPC()&& !IsPet())
		{
			armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
		}
This had no effect that i can tell. I set pet ac to 15000, and flame lord hit him 34 times for max hit, rest of hits are 1-3 each.

The total code block is...

Code:
if(RuleB(Combat, UseIntervalAC))
	{
		float softcap = 0.0;
		float mitigation_rating = 0.0;
		float attack_rating = 0.0;
		int shield_ac = 0;
		int armor = 0;
		float weight = 0.0;
		if(IsClient())
		{
			armor = CastToClient()->GetRawACNoShield(shield_ac);
			weight = (CastToClient()->CalcCurrentWeight() / 10.0);
		}
		else if(IsNPC()&& !IsPet())
		{
			armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
		}

		if(GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER)
		{
			softcap = RuleI(Combat, ClothACSoftcap);
		}
		else if(GetClass() == MONK && weight <= 15.0)
		{
			softcap = RuleI(Combat, MonkACSoftcap);
		}
		else if(GetClass() == DRUID || GetClass() == BEASTLORD || GetClass() == MONK)
		{
			softcap = RuleI(Combat, LeatherACSoftcap);
		}
		else if(GetClass() == SHAMAN || GetClass() == ROGUE || GetClass() == BERSERKER || GetClass() == RANGER)
		{
			softcap = RuleI(Combat, ChainACSoftcap);
		}
		else
		{
			softcap = RuleI(Combat, PlateACSoftcap);
		}

Which to me suggests that if you are client it works fine. If you are a pet it doesnt even get your AC with current code because of the !pet??. It also seems like if applies softcaps and all that to npc ac??!? On live they just used mob ac value, there was no softcaps for mobs, never was as far as i can recall.

Thanks for your help, if you have any other ideas im open to them, ill keep farting around with it.
Reply With Quote
  #4  
Old 03-27-2013, 12:26 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I did some testing, and will keep going, but I decided to put the formula into an excel spreadsheet, using a Jord Tyv as my target. I did 300 random rolls for mitigation & attack and found that doubling the pet's AC led to an difference in average hits by 40. Up that to 10x the AC and there was a difference of about 100 in average hits.

How long did you perform the test and were there any other mitigating factors that could have affected the outcome? Buffs?

With my primary being a magician, I do believe pet mitigation needs tweaked (I think they do get hit for max too often), but I think the formula does actually work in taking pet AC into consideration.

I'm testing removing the NPCACFactor from the calculations for pets and see what that does. The softcap stuff definitely affects the results and I will try testing just using the pet's raw AC to see how that affects the results (I can test it in my spreadsheet, as I just enter the adjusted armor rating, so I can make it whatever I want).
Reply With Quote
  #5  
Old 04-02-2013, 07:39 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I removed the NPCACFactor from being used for pets, and it definitely comes closer to where it should be. DPS against pets still parsed higher than on live, but was better. It also 'felt' closer, for what that's worth.
Reply With Quote
  #6  
Old 04-03-2013, 08:01 AM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

I should have declared i write my own mititgation code. I have had it so long i dont think about it much. It doesn't differ from stock in figuring out the armor thou.

That being said the minute i excluded pets from NPCacfactor i had alot better results also. Part of the problem with pets tanking at higher levels is prism skin doesnt work, but ill likely work around that by including pet weapons that proc almost same effect.

I also recently rewrote most of the mitigation code(again) to scale with levels, produce better bell curves, have diminishing returns instead of caps and have more logging.

Pets seem much better after that. You are remarkably close on merc AC on most levels btw. Thanks for your time and your suggestions, hope i didnt lead you on a wild goose chase.
Reply With Quote
  #7  
Old 04-03-2013, 09:14 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

SOE really didn't make this easy for us
They should have used identical AC/combat formulas for EVERYTHING,
and then balance it out with actual stats on mobs/pets to make them stronger/weaker.
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 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