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 |
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% 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. |
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 |
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. |
I think this is the code that evasive is using to add the bonus to avoid chance:
spell_effects.cpp Code:
case SE_AvoidMeleeChance: Code:
case SE_ProcChance: |
Here's where it's calculated w/ the bonuses (zone/bonuses.cpp):
around line 723 Code:
case SE_AvoidMeleeChance: Code:
case SE_ProcChance: zone/attack.cpp, around line 269 Code:
//subtract off avoidance by the defender zone/attack.cpp Code:
//subtract off avoidance by the defender 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; 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; |
LOL, you are right about the chance to hit. If you had max avoidance from items (100) and added evasive to that (50*10 = 500), the current code would subtract 60 from chance to hit. Even with no item avoidance, it would subract 50 from it. And according to this code here from attack.cpp, you would be getting hit at most 4% of the time down to 0 if you had just 40 avoidance lol.
Code:
bool Mob::CheckHitChance(Mob* other, SkillType skillinuse, int Hand) I am still looking over your code for proc bonuses though. I am not sure I understand exactly what is going on there yet lol. EDIT: I moved the Proc Chance Discussion to another thread here: http://www.eqemulator.net/forums/sho...353#post158353 |
Even though I thought that code looked good, it isn't right yet. Looks like I will have to review everything that Mob::CheckHitChance is doing:
Code:
bool Mob::CheckHitChance(Mob* other, SkillType skillinuse, int Hand) |
I figured out what the problem was. There is just too much stuff being done with chancetohit at the point that the defense bonuses are calculated to actually set it with a percentage. I set the spell bonus check to do a percentage on the final value of chancetohit.
In attack.cpp remove this line: Code:
bonus = defender->spellbonuses.AvoidMeleeChance + defender->itembonuses.AvoidMeleeChance; Code:
//subtract off avoidance by the defender Code:
mlog(COMBAT__TOHIT, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll); Code:
//Reduce final chancetohit by % based on spell bonuses Really, the code that AndMetal posted would probably work great as well if it was just moved to the end of Mob::CheckHitChance instead of being done in the middle of it. Doing it in the middle as a percentage really throws off the rest of the calculations. I have no idea why "case SE_AvoidMeleeChance:" and "case SE_ProcChance:" are multiplying the spell values by 10, but if there is no other use for them, I think we could remove that multiplier and then remove the "/ 10" from the related code in Mob::CheckHitChance. No reason to do unneeded math 2 times! |
Quote:
Avoidance = 1 (from items) Avoid Melee Chance = 21 (from spells) The way is/was originally, it would end up being 1 + (20 * 10), so a bonus 211. Then we divide by 10, so 21.1, which gets rounded to 21 (this is our percentage to mitigate). Using the new code, we would first calculate 1 / 10, which is .1, which rounds to 0. Later, we calculate (100 - (211 / 10)) / 100 which ends up being 0.789, which technically, because it's rounded, ends up providing no bonus, so nothing happens. That's the main reason I calculated the bonus first, without dividing, then did the "conversion" to a percentage ((100 - bonus) / 100) in the chancetohit calculations, because it won't round until after it stores the result back to chancetohit. I think what we might want to do is make bonus a float, and that should take care of most of these rounding issues, especially if you have less than 10 Avoidance (although we might have to do some casting for everything to work as expected). Since we're not talking rocket science, we shouldn't need to worry about using a double instead of a float. However, we're still running into a much larger issue: mitigation isn't a reduction in the chance to land a hit, it's a reduction in the amount of damage done. Unfortunately, if we change it right now, everyone who has +mitigation is going to be hit a lot more often, but for less damage, which will probably mean retuning a lot of content. |
I changed the way evasive type effects are calculated to be like all other melee effects. Multiplicative not additive.
|
I think that is the way that they should be done. But I also think that may throw off the current combat system considerably. I was mainly just wanting to figure out how to fix the evasive disc without messing with everything else. I imagine with that change, we would probably have to rewrite alot of the chancetohit code to get things more in line with what they should be.
Though, making them multipliers instead of adding them will probably fix miss rates being so high in the high end stuff for NPCs. It also means a pretty major overhaul on all high end encounters to balance them again. I don't think NPCs get any avoidance bonuses like players, so it probably means players will still miss alot. I will give it a try and see how it feels. Looked at the code and I think it is missing a dividing factor of 10 for the bonus. 100 avoidance from items should only reduce hit rate by 10%. Also, since spell avoidance is multiplied by 10, Evasive Discipline would be 500. So, I think you can just add the 0 in red below to correct it: Code:
//subtract off avoidance by the defender |
All times are GMT -4. The time now is 10:43 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.