Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2008, 06:50 PM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default Evasive disc fix?

I tested my evasive disc today (releasing kunark on my server soon) and noticed evasive seems to avoid waaaaaaaay too much. If my memory is correct, it should only avoid ~50% of incoming hits, but it feels more like 80-90%. It also resets quick, but I don't recall exactly what the refresh timer is supposed to be.

I havent found any direct fixes on the forum, but saw Trevius allude to one he had fixed in the past that may have had something to do with spells file. This is what I currently have for evasive disc. If anyone could bold what I need to change, I would greatly appreciate it:

4503^Evasive Discipline^PLAYER_1^^^^You assume an evasive fighting style.^ assumes an evasive fighting style.^You return to your normal fighting style.^200^^0^0^0^0^468000^11^30^0^0^50^-33^0^0^0^0^0^0^0^0^0^0^-1^-1^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2503 ^2119^-1^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^ 0^1^0^0^172^184^254^254^254^254^254^254^254^254^25 4^254^6^0^15^-1^0^0^52^255^255^255^255^255^255^255^255^255^255^2 55^255^255^255^255^27^13^0^51^0^0^0^0^0^0^0^0^0^0^ 0^0^0^0^0^0^0^0^100^0^1^326^1^0^0^1^0^0^0^0^0^4503 ^27^117^^0^0^0^0^0^0^0^0^1^1^0^0^0^0^1^10^0^0^-47^134^-68^-99^11^30^0^1^0^1^0^0^0^0^0^0^0^0^0^0^0^0^1^1^0^0
Reply With Quote
  #2  
Old 10-05-2008, 07:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, I have just adjusted the rate of the increase you get from using this disc in the spell file where you pointed out. Try the Ailia/Bleh spell editor from the tools section and it should be pretty straight forward on what you need to do to fix it.

Ultimately though, it seems like something probably needs to be adjusted in the source for how these percentages are handled. I know that the evasion disc is definitely not calculated correctly (even though I think it used to be months ago). I also know that some other percentages are not calculated correctly like some proc rate modifiers. I had a level 71 bard song directly from the EQLive spell list that was supposed to increase the proc rate for bard songs by only 102%, which to me means it should only be making proc rate slightly more than double what it currently is. But, this song was making bards proc almost every swing, which was extremely overpowered. I had to reduce the proc rate setting down to like 5% to get it under control.

Code:
Jonthan's Mightful Caretaker  	BRD/71	1: Increase Attack Speed by 70%
2: Increase All Skills Damage Modifier by 6%
4: Increase ATK by 16 (L71) to 18 (L80)
7: Increase All Skills Minimum Damage Modifier by 204%
8: Increase Proc Modifier by 102%
I can only imagine that instead of multiplying these percentage increases by X amount and then dividing by 100, it is multiplying by X amount and then not dividing at all lol. So instead of evasive increasing avoidance by 50%, it is multiplying it by 50 so you avoid 50X more often, which means you get hit maybe 2% or the time or less. And that is almost exactly what I saw from watching this evasive bug.

Hmm, maybe I can look into the source of it and just add a / 100 to the end of the calculation if I can find it. That may correct many other issues where certain things aren't balanced properly. Though, I imagine AndMetal would probably be better at finding what is going wrong here considering all of his spell and AA work lately. But, if I can find it, I think it should be a simple solution. Of course then I will need to adjust the spell values back to what they were by default to match it up with the new correction.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 10-05-2008, 07:11 PM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default

Oh I just changed the number straight up to avoid "35".

What did you find works well for:
Chance to avoid me minimum, maximum

Does defensive have this same problem?

For defensive I have melee mitigation -45, -1
Reply With Quote
  #4  
Old 10-05-2008, 11:42 PM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default

My data agrees with Trevius.

I set evasive down to like 2, and you definitely tank better with it than without, but it is not godly in the least. It seems like you avoid twice as much.. which is pretty much the theme of evasive.

So tweak it as you want.... 1, 2, 3, 4.... dont go much higher than that I would suggest.
Reply With Quote
  #5  
Old 10-06-2008, 01:17 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think this is the code that evasive is using to add the bonus to avoid chance:

spell_effects.cpp
Code:
			case SE_AvoidMeleeChance:
			{
#ifdef SPELL_EFFECT_SPAM
				snprintf(effect_desc, _EDLEN, "Avoid Melee Chance: +%+i%%", effect_value);
#endif
				// handled with bonuses
				break;
			}
And this may be there the bard song I mentioned is adding the bonus:
Code:
			case SE_ProcChance:
			{
#ifdef SPELL_EFFECT_SPAM
				snprintf(effect_desc, _EDLEN, "Proc Chance: +%+i%%", effect_value);
#endif
				// handled with bonuses
				break;
			}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 10-06-2008, 03:51 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Here's where it's calculated w/ the bonuses (zone/bonuses.cpp):
around line 723
Code:
                        case SE_AvoidMeleeChance:
                        {
                                //multiplier is to be compatible with item effects
                                //watching for overflow too
                                effect_value = effect_value<3000? effect_value * 10 : 30000;
                                if(newbon->AvoidMeleeChance < effect_value)
                                        newbon->AvoidMeleeChance = effect_value;
                                break;
                        }
around line 857
Code:
                        case SE_ProcChance:
                        {
                                //multiplier is to be compatible with item effects
                                //watching for overflow too
                                effect_value = effect_value<3000? effect_value * 10 : 30000;
                                if(newbon->ProcChance < effect_value)
                                        newbon->ProcChance = effect_value;
                                break;
                        }
In the case of evasive, the effect_value (base1 in spells_us.txt) is 50, which should equate to 50%. I would think this would mean whatever our chance was would be reduced by that much (so something like chancetohit *= (100 - mitigation) / 100). This is how it's calculated in the attack code:
zone/attack.cpp, around line 269
Code:
	//subtract off avoidance by the defender
	bonus = defender->spellbonuses.AvoidMeleeChance + defender->itembonuses.AvoidMeleeChance;
	if(bonus > 0) {
		chancetohit -= (bonus) / 10;
		mlog(COMBAT__TOHIT, "Applied avoidance chance %.2f/10, yeilding %.2f", bonus, chancetohit);
	}
However, it looks like item Avoidance isn't a straight percentage increase in mitigation. Since the spell effect is multiplied by 10, it looks like 1 point of Avoidance is equal to 0.1% mitigation. In addition, with the rule system, Avoidance is capped at 100, so 10% max. I'm thinking we can do something like this:
zone/attack.cpp
Code:
	//subtract off avoidance by the defender
	bonus = defender->spellbonuses.AvoidMeleeChance + defender->itembonuses.AvoidMeleeChance;
	bonus /= 10; //Change from 10x, make it easier to read when converting to a percentage
	if(bonus > 0) {
		chancetohit *= (100 - bonus) / 100; //Decrease by %, so need to count down from 100, then divide by 100 to make it a percentage
		mlog(COMBAT__TOHIT, "Applied avoidance chance %.2f/100, yeilding %.2f", bonus, chancetohit);
	}
On a side note, I am a little confused: isn't mitigation supposed to be a decrease in damage from a swing, not a chance to completely avoid a hit? Shouldn't it only be completely avoiding a hit if we mitigate 100% (or more) of the damage? So, as a result, if a mob hit for 5000 damage max, and you had 50% mitigation, they would only hit for 2500 max? That's the way I remembered it from Live (although I never actually played a Warrior w/ Defensive), and why it was used for hard hitting mobs. It also made Warriors better tanks than other classes, because if you can mitigate 50% of the damage over a long duration (50% for 3 min w/ Defensive) vs all damage for a short duration (10000% for 2 ticks on Fortitude Discipline), then you don't have to be healed as much. The reason I remember this specifically is because I wasn't in a huge guild, so our MT was a Shadowknight (RIP Eldark), which made a lot of the Velious bosses almost impossible to do without a Warrior tagalong because of the additional healing needed to keep him alive, even with better equip than the warrior (I think this was around Luclin?) If that's the case, then mitigation is very broken at the moment, but shouldn't be impossible to fix (just need to change what happens when, and how).

Now, as far as ProcBonus, it ends up being calculated in the attack code also:
zone/attack.cpp, around line 3664 (in Mob::GetProcChances)
Code:
	ProcBonus += float(itembonuses.ProcChance + spellbonuses.ProcChance) / 1000.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f; //Base chance, based on dex + static chance to proc
	ProcBonus += (ProcChance * AABonus) / 100; //AA modifier in addition to normal ProcBonus from items & spells, percentage of base chance?
	ProcChance += ProcBonus; //Add the bonuses to the base chance
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;
So, if we use Jonthan's Mightful Caretaker as our example, the effect_value is 102, which ends up being 1020. In GetProcChances, we start with 0, then the spell value gets divided to 1.02. When we try the proc in Mob::TryWeaponProc (both with & without augs), also in zone/attack.cpp (around line 3674), we generate a random float between 0 & 1. Since 1.02 is always > anything between 0 & 1, we will proc 100% of the time.

I assume this is supposed to be a multiplier (200% = 2x as likely vs base, etc) instead of a direct mod on the proc chance. We should be able to do something like this:
Code:
	ProcBonus += float(itembonuses.ProcChance + spellbonuses.ProcChance) / 1000.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f;
	ProcBonus += (ProcChance * AABonus) / 100;
	ProcChance *= ProcBonus; //Multiplier instead of flat bonus
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;
If someone wants to try this and/or commit to SVN, feel free (I'm having some issues w/ Visual Studio after the change to zone.vcproj).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
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 08:29 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3