Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #61  
Old 09-07-2012, 10:35 AM
Cowboy6534
Sarnak
 
Join Date: Jul 2007
Posts: 59
Default

Quote:
Originally Posted by jsr View Post
You misunderstand me - it reverts to min_hit AFTER the mitigation from AC.
Where is that in the attack.cpp?
Reply With Quote
  #62  
Old 09-07-2012, 10:38 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default

use this query to get the ratio's;

Code:
select id, name, maxdmg, mindmg, mindmg/maxdmg as ratio from npc_types where (mindmg/maxdmg) > 0.2
You can change 0.2 to whatever suits.
Reply With Quote
  #63  
Old 09-07-2012, 10:42 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default

Quote:
Originally Posted by Cowboy6534 View Post
Where is that in the attack.cpp?

Search for meleemitigation. IMO it's where you should be looking if you want to tweak mitigation code. Not to discourage you, but what you're doing at the moment is called a hack job :)
Reply With Quote
  #64  
Old 09-07-2012, 10:43 AM
Cowboy6534
Sarnak
 
Join Date: Jul 2007
Posts: 59
Default

If you remove my code and go with standard and you have a green mob that hits your for min and then you mitigated that down to below the min and then some other check say well its below min so just bring it back up doesnt that defeat the purpose of the ac check?
Reply With Quote
  #65  
Old 09-07-2012, 10:50 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default

No, the way it works is that a mob hits for maxdmg, and then AC and other mitigation factors are pitted against attack to push damage down towards minimum. There are 20 different values that a mob can hit for on live, so the function looks at mindmg and maxdmg of a mob, works out the 18 values in between, and then the outcome of mitigation vs attack determines which of the 20 possible values is the final damage outcome.
Reply With Quote
  #66  
Old 09-07-2012, 11:20 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 188
Default

FYI it appears that there are now at least 30 values on live.
Reply With Quote
  #67  
Old 11-05-2012, 05:21 PM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

Any word on a fix for this or if Cowboy's code is good enough?
Reply With Quote
  #68  
Old 11-05-2012, 05:23 PM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

I also have an issue that it seems npc's arent ever missing swings.
Reply With Quote
  #69  
Old 11-05-2012, 05:46 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Quote:
Originally Posted by Furniture View Post
Any word on a fix for this or if Cowboy's code is good enough?
You are free to apply any patches to your own server if you like.
Reply With Quote
  #70  
Old 01-12-2013, 11:29 PM
game
Fire Beetle
 
Join Date: Aug 2011
Posts: 19
Default

This issue has been resolved on the Sleeper server - tests have shown AC to play a much larger role in overall combat damage.

http://epicemu.com/forum/ac-new-dama...ing-code-tests
Reply With Quote
  #71  
Old 03-03-2014, 09:12 AM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

wtbmacestun = cowboy6534 ... just cant remember the pw to log into that account atm... anyway if anyone wants it I have the code we used on kegz server. I posted it in another thread but felt i would elaborate more in my own thread.

So basically when I started out on this little adventure to fix ac kegz didnt really have any interest until i found where in the code the actual problem was. The first implementation of it was what i posted here which did not work. The one that ended up working was kegz idea and it worked great.

First what I found was that in this section of code no matter what happened before this section dmg was static to min and max. None of the previous code influence the dmg being done, or rather, mitigation wasnt being applied from a characters AC.

Code:
 if(RuleB(Combat, UseIntervalAC)) {			
			//int8 leveldif = ((other->GetLevel()) - (this->GetLevel())); // //AC Damage Reduction Level Diff - Kegz @ EpicEmu.com
			damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f)); //AC Damage Reduction - Kegz @ EpicEmu.com
		}
		else {
			//float acdiv2 = 0.25;
			//int otherac = other->GetAC();
			//damage = ((max_dmg+eleBane) - (otherac * acdiv2/100.0f));
			damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f));
		}		

		//check if we're hitting above our max or below it.
		if((min_dmg+eleBane) != 0 && damage < (min_dmg+eleBane)) {
			mlog(COMBAT__DAMAGE, "Damage (%d) is below min (%d). Setting to min.", damage, (min_dmg+eleBane));
		    //damage = (min_dmg+eleBane);
			damage = ((min_dmg+eleBane) - (otherac * acdiv/100.0f));
		}
		if((max_dmg+eleBane) != 0 && damage > (max_dmg+eleBane)) {
			mlog(COMBAT__DAMAGE, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
		    //damage = (max_dmg+eleBane);
			damage = ((max_dmg+eleBane) - (otherac * acdiv/100.0f));
		}
If you look at whats commented out, youll see the normal ac code. What kegz added was the acdiv/100.0f . now in the other forum post I made, I had stated that I thought he had acdiv set to 20 and actually he had it set to 2. So basically 2% of your ac reduces the dmg you are being hit by. The way its coded is to take it off of the min and max. That is where all the parses that showed an actual difference came from. And actually the last time I had talked to him he said he had turned it up a bit but never told me what he set it to. Shortly after that he shutdown epicemu. But before doing so he gave me the code and then decided to post it on the epicemu github. When he originally tested the code he used velious gear as part of a parse but it was in a zone and level range where that much ac would never be possible so it was on the low side. I would assume 2.5 to 3.5 is where it ended up but youll need to test that out yourself.

If this never makes it in the main build it would have truly have been a waste for us to fix this. Seeing as he shut is server down and I am not in the position to run one myself atm. Although I am still constantly thinking about how to fix things on the server that isnt there any more.... As far as I know my monk weight fix still isnt implemented which is sad... Also all the hate that I received when I first brought this up made me not want to share with this community for a long time... But now that his project is gone and I have nothing to work towards again I thought I would share here.

I have a few ideas on how to bring back the Iksar ac bonus that was removed from live a long time ago. Which can be made into a database option for servers that want it and servers that dont. The ac fix should not be made an option though. Its gone on long enough that AC has been broken. If you have any questions let me know.
Reply With Quote
  #72  
Old 03-03-2014, 05:05 PM
Yummy
Sarnak
 
Join Date: Feb 2014
Posts: 71
Default

Quote:
Originally Posted by wtbmacestun View Post
wtbmacestun = cowboy6534 ...

If this never makes it in the main build it would have truly have been a waste for us to fix this. Seeing as he shut is server down and I am not in the position to run one myself atm. Although I am still constantly thinking about how to fix things on the server that isnt there any more.... As far as I know my monk weight fix still isnt implemented which is sad... Also all the hate that I received when I first brought this up made me not want to share with this community for a long time... But now that his project is gone and I have nothing to work towards again I thought I would share here.

I have a few ideas on how to bring back the Iksar ac bonus that was removed from live a long time ago. Which can be made into a database option for servers that want it and servers that dont. The ac fix should not be made an option though. Its gone on long enough that AC has been broken. If you have any questions let me know.
cowboy6534,

Your post/code is very much appreciated. I have been feeling at lower levels game play was off. You have provided me with some ideas as to where to look and, potentially, tweak things. Thank you.

I am not sure how to say this, but here goes. The fact you reconciled the treatment by a minority of individuals for your use of less than ideal word choices--yes, you could have been a bit more sensitive, shows emotional maturity. I suspect others, quite possibly the majority, such as myself visit as guests and have been lurking about for *many* years and appreciate your efforts. I try to learn from the behavior of others and when criticized, see it as an opportunity to learn from the experience. I, believe, you did just that. You did good.

Best wishes
Reply With Quote
  #73  
Old 03-03-2014, 09:50 PM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

The exact line you want to look at in the attack.cpp is 1866. This is under the void npc::attack. The void mod::meleemitigation does nothing to actually mitigate dmg being done. If you want to test this out like we did. Change the min and max to static numbers for all mobs and youll see just that.
Reply With Quote
  #74  
Old 03-03-2014, 09:54 PM
Yummy
Sarnak
 
Join Date: Feb 2014
Posts: 71
Default

Thank you. I will.
Reply With Quote
  #75  
Old 04-17-2014, 06:34 AM
wtbmacestun
Fire Beetle
 
Join Date: Mar 2010
Posts: 16
Default

I recently revised this code a bit if anyone is interested I thought i would share.

Code:
if(RuleB(Combat, UseIntervalAC)) {
			damage = ((max_dmg+eleBane);
		}
		else {
			damage = MakeRandomInt((min_dmg+eleBane) - (otherac * acdiv/100.0f),(max_dmg+eleBane) - (otherac * acdiv/100.0f));
		}		

		//check if we're hitting above our max or below it.
		if((min_dmg+eleBane) != 0 && damage < (min_dmg+eleBane)) {
			mlog(COMBAT__DAMAGE, "Damage (%d) is below min (%d). Setting to min.", damage, (min_dmg+eleBane));
			damage = ((min_dmg+eleBane) - (otherac * acdiv/100.0f));
		}
		if((max_dmg+eleBane) != 0 && damage > (max_dmg+eleBane)) {
			mlog(COMBAT__DAMAGE, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
			damage = (max_dmg+eleBane);
		}
NOTE: This code makes it so that if a mob rolls max hit it would land and anything below max hit would be mitigated. Now for raid targets since they are multiple levels
above the tank they would hit for max like normal keeping the dmg high and the encounters hard. But for none raid targets as long as they arent red it would allow
ac to do what it needs to do to.

What this does is take a % of your ac and reduces each hit by that percent. So if you have it set at 2 it would be dmg = max dmg - the persons ac who is being hit * 2/100

or for example

dmg=20-100*2/100
dmg=20-200/100
dmg=20-2
dmg=18
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 08:13 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