Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2010, 01:45 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default Hate modifiers patch

Hello, all--it's been a while since my last code submission, so I'm sorry about that.

Someone asked me to fix the hate modifiers so that they work--for worn effects, spells (i.e. Enchanter Horrifying Visage, etc.), and AAs (if there be any hate modifiers currently implemented).

Here's a really simple patch that I think fixes the issue:
Code:
Index: zone/attack.cpp
===================================================================
--- zone/attack.cpp	(revision 1603)
+++ zone/attack.cpp	(working copy)
@@ -1253,6 +1253,7 @@
 			other->MeleeMitigation(this, damage, min_hit);
 			ApplyMeleeDamageBonus(skillinuse, damage);
 			TryCriticalHit(other, skillinuse, damage);
+			hate += damage * 100 *(this->spellbonuses.hatemod + this->itembonuses.hatemod + this->aabonuses.hatemod)/100;
 			mlog(COMBAT__DAMAGE, "Final damage after all reductions: %d", damage);
 		}
Reply With Quote
  #2  
Old 07-15-2010, 03:13 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default Update

Wow, sorry about that -- that'd would produce an insane amount of hate.

Here's the update:
Code:
Index: zone/attack.cpp
===================================================================
--- zone/attack.cpp	(revision 1603)
+++ zone/attack.cpp	(working copy)
@@ -1253,6 +1253,7 @@
 			other->MeleeMitigation(this, damage, min_hit);
 			ApplyMeleeDamageBonus(skillinuse, damage);
 			TryCriticalHit(other, skillinuse, damage);
+			hate += damage * (this->spellbonuses.hatemod + this->itembonuses.hatemod + this->aabonuses.hatemod)/100;
 			mlog(COMBAT__DAMAGE, "Final damage after all reductions: %d", damage);
 		}
Reply With Quote
  #3  
Old 07-16-2010, 12:22 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Are hate modifiers not working without this patch? I thought they were already functional.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 07-16-2010, 08:07 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default not getting used

I think they are getting calculated, but I followed the hit code and found no reference to it. This should allow warrior epic 2.0 and enchanter hate buffs to add hate.
Greenmachine noticed that the warrior epic 2.0 wasn't working, which prompted investigation. Note this is for effects and not procs.

Thanks!
Reply With Quote
  #5  
Old 07-16-2010, 08:42 PM
ghostriderdoom
Sarnak
 
Join Date: May 2008
Location: Rockford
Posts: 50
Default

Quote:
Originally Posted by blmille2 View Post
I think they are getting calculated, but I followed the hit code and found no reference to it. This should allow warrior epic 2.0 and enchanter hate buffs to add hate.
Greenmachine noticed that the warrior epic 2.0 wasn't working, which prompted investigation. Note this is for effects and not procs.

Thanks!
Epic 1.5 to be clear actually. And the focus effect it has just never felt like it did anything. I have had the warrior epic 1.5 for a year now. I didn't notice any change in aggro from getting the item.
Reply With Quote
  #6  
Old 07-16-2010, 09:05 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Seems like this wouldn't accurately reflect agro from live as there is no additional agro for crits, however with the code structured like that, on crits your hate would be doubled. Also Im pretty sure that agro on live is based on weapon dmg, not actual dmg, which is why war weapons from recent expansions have less dmg/dly with relatively high elemental dmg tacked on(The Keen Edge of Discord vs Skulltutor). This keeps the war agro high but their dps in check, however that is not entirely relevant to your change and seems to be in the code already.

That said, it should be a relatively easy effect to test(feel doesnt really cut it, especially with 15%), use an item like Raex's Chestplate of Destruction and check the hatelist entries with and without it.
Reply With Quote
  #7  
Old 07-19-2010, 12:26 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default No crit hate mod

I'm sorry, I didn't realize that crits didn't count toward additional hate from spells, effects, etc.

Please move the effective line up one, right above crits.

Thanks!
Reply With Quote
  #8  
Old 07-19-2010, 12:44 PM
EqTitan
Sarnak
 
Join Date: Mar 2010
Location: hi
Posts: 32
Default

Quote:
Originally Posted by Caryatis View Post
Seems like this wouldn't accurately reflect agro from live as there is no additional agro for crits, however with the code structured like that, on crits your hate would be doubled. Also Im pretty sure that agro on live is based on weapon dmg, not actual dmg, which is why war weapons from recent expansions have less dmg/dly with relatively high elemental dmg tacked on(The Keen Edge of Discord vs Skulltutor). This keeps the war agro high but their dps in check, however that is not entirely relevant to your change and seems to be in the code already.

That said, it should be a relatively easy effect to test(feel doesnt really cut it, especially with 15%), use an item like Raex's Chestplate of Destruction and check the hatelist entries with and without it.
If the code is in then its in, thats the real question, is there code in for this exact kind of spell effect and how can we test besides taking a weopon or item with the multiplier on it completely off as it will still be a FEELING . Because as you stated its only 15%
__________________
http://www.eqtitan.com/forums/
Reply With Quote
  #9  
Old 07-19-2010, 12:52 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by EqTitan View Post
If the code is in then its in, thats the real question, is there code in for this exact kind of spell effect and how can we test besides taking a weopon or item with the multiplier on it completely off as it will still be a FEELING . Because as you stated its only 15%
Quote:
Originally Posted by Caryatis View Post
check the hatelist entries with and without it.
Just make a script to check hate list entries.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #10  
Old 07-19-2010, 01:16 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default script

Okay, so I assume you mean a quest script for the EVENT_COMBAT event?
Also, I'm having a hard time finding the variable that corresponds to the hate for a character.
Thanks!
Reply With Quote
  #11  
Old 07-19-2010, 04:41 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

You could script it, or could just use the #hatelist command. I would make a level 1 mob, attack it, if you don't get a full dmg quad, repop until you do, then check its hatelist. Then make a level 255 mob with high ac, attack it, if you dont get a quad of misses, repop until you do. The hate values for a full dmg quad and quad of misses should be the same. Then do the same thing with the hate mod item.
Reply With Quote
  #12  
Old 07-19-2010, 05:35 PM
blmille2
Sarnak
 
Join Date: Apr 2007
Location: Austin, TX
Posts: 64
Default Hate calc

Okay, so it sounds like you get extra hate even if you miss them, right?

Can you please post the formula for calculating the hate mod the way Live does it?

Thanks!
Reply With Quote
  #13  
Old 07-19-2010, 08:42 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Alright so I did the test myself since it seems you didnt do it. Turns out agro seems to be fine.

First off, agro is generated per swing, not based on damage...





Notice 5 swings, different damage, same hate value.

Secondly, agro mods like Echo of Anger, do indeed work:



Notice 5 swings again, this time hate is 100. 89 * 15% is 102, but its close enough that I would say its working.
Reply With Quote
  #14  
Old 07-20-2010, 12:35 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Part of that 89 is a small amount of static hate you get for aggroing a mob and isn't affected by any mods.
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 05:42 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