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-08-2014, 06:32 PM
Torven
Sarnak
 
Join Date: Aug 2014
Posts: 76
Default

I noticed you didn't update spell_effects.cpp to prevent 0 damage spells. Did using a float literal when subtracting partial_modifier prevent those? I didn't think to do that because C++ isn't my preferred language.

Before I changed spell_effects.cpp, I was getting spell hits that would display the emote text but not display any non-melee damage text with it. (because it was 0 damage)
Reply With Quote
  #2  
Old 09-08-2014, 06:45 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

A 0 spell effective spell even if it's a partial capable should just react as a full resist.
Reply With Quote
  #3  
Old 09-08-2014, 10:18 PM
Torven
Sarnak
 
Join Date: Aug 2014
Posts: 76
Default

I just ran your code and it has the same problem mine had before I changed spell_effects.cpp.

If you cast a low level DD spell on a mob with near-immunity, it will do zero damage, show no non-melee text, and instead display two emote messages, like this:

Code:
[Mon Sep 08 17:49:52 2014] You say, '#cast 93'
[Mon Sep 08 17:49:52 2014] Your Earring of Influxed Gravity begins to glow.
[Mon Sep 08 17:49:52 2014] The Idol of Rallos Zek singes as the Burst of Flame hits them.
[Mon Sep 08 17:49:52 2014] The Idol of Rallos Zek singes as the Burst of Flame hits them.
[Mon Sep 08 17:49:53 2014] You say, '#cast 93'
[Mon Sep 08 17:49:53 2014] Your Earring of Influxed Gravity begins to glow.
[Mon Sep 08 17:49:53 2014] Your target resisted the Burst of Flame spell.
(I am however using a very old client)

The cause is because spell_effects.cpp floors the damage when it converts to an int32:

dmg = (int32) (dmg * partial / 100);

And low damage spells and/or very low partial rolls will result in a damage that is < 1.

In fact since spells can't hit for anywhere near full damage at near-immunity resist levels, if you for example cast burst of flame on a target with 570 fire resist, every single non-resist will hit for 0 damage.

partial_modifier = ((150 * (resist_chance - roll)) / resist_chance);

Fill in 570 for resist chance (mob resist value, modified by level and such if applicable) and 200 for roll (maximum possible roll) then you get ~97.3684. Floor it since partial_modifier is an int, you get 97. So the absolute highest damage possible spell at 570 resist is 3% the spell's maximum.

ResistSpell() returning 0 will register as a full resist-- it's the non-zero returns that are resulting in 0 damage casts but no resist message. All these casts should not be full resisting either, otherwise you'll end up with NPCs being immune to low damage spells below the 600 threshold. If you view my Soldier of Fire logs at -58 resist debuff, you can see that every single non-resist cast hits for 1 damage (using a 20 damage spell).
Reply With Quote
  #4  
Old 09-26-2014, 05:58 PM
Torven
Sarnak
 
Join Date: Aug 2014
Posts: 76
Default

So as I mentioned before, the purpose of my plotting resist curves was to find a way of estimating mob resist values with a high degree of accuracy. I'm pleased to say I've had much success in that endeavor.

I have written a lua script to feed logs into, and the results look like this:

Code:
Lord Feshlak resists.txt
Disempower - 1174 casts; margin of error: 2.8%
Full Hits: 277 (23.5%)  Full Resists: 897 (76.4%)
   Est Resist Value Based on Full Resists: 193 +/-6

Burst of Flame - 1108 casts; margin of error: 2.9%
Full Hits: 539 (48.6%)  Hits: 899 (81.1%)  Full Resists: 209 (18.8%)
   Est Resist Value Based on Full Hits: 143 +/-6
   Est Resist Value Based on Full Resists: 154 +/-18

Frost Rift - 1091 casts; margin of error: 2.9%
Full Hits: 460 (42.1%)  Hits: 887 (81.3%)  Full Resists: 204 (18.6%)
   Est Resist Value Based on Full Hits: 156 +/-6
   Est Resist Value Based on Full Resists: 153 +/-18

Tainted Breath - 1079 casts; margin of error: 2.9%
Full Hits: 576 (53.3%)  Full Resists: 503 (46.6%)
   Est Resist Value Based on Full Resists: 134 +/-6

Sicken - 1079 casts; margin of error: 2.9%
Full Hits: 561 (51.9%)  Full Resists: 518 (48%)
   Est Resist Value Based on Full Resists: 137 +/-6
--------------------------------------------------------------------------
Lady Mirenilla Ice Strike.txt
Ice Strike - 417 casts; margin of error: 4.7%
Full Hits: 0 (0%)  Hits: 202 (48.4%)  Full Resists: 215 (51.5%)
   Est Resist Value Based on Full Hits: >240
   Est Resist Value Based on Full Resists: 350 +/-29
   Est Resist Value Based on Lowest Non-Crit Partial Mod: 368 +/-3
   Est Resist Value Based on Lowest Crit Partial Mod: 372
I am now in the process of filling out my spreadsheet with raid boss resist values. Anybody else interested in this kind of data collecting can find my lua script here:

https://drive.google.com/open?id=0B9...MGs&authuser=0

Instructions on use can be found in the file. (bossresists.lua)
Reply With Quote
Reply

Thread Tools
Display Modes

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 12: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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3