Magic Attack bonus vs Int gear

Forum rules

Try to keep the noise down on the reports on github, emails go out for every post on a bug report. :-)
Posts: 8
Joined: Tue Aug 07, 2012 10:22 pm

Re: Magic Attack bonus vs Int gear

Post by kabitokaii » Sun Aug 19, 2012 3:53 am

i'm sure kjLotus will love you if he sees this post as this is supposed to be his project lol

Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Magic Attack bonus vs Int gear

Post by PrBlahBlahtson » Sun Aug 19, 2012 1:59 pm

I do not deny that I went well beyond what I intended. All I probably accomplished was to figure out why HNMs are so hard to nuke, because the resist check is just so easy to script. Data on the level correction also seems limited, and a non-mage is probably the worst possible one to be speculating these things.

So I probably reinvented the wheel, except mine is square and doesn't hold air for more than 30 seconds.

But it was fun! :D

I'm an idiot for how I built the level adjustment. For melees, it's completely linear. 1 acc = 0.5% hitrate.

For mages, it's different. If you have more accuracy than the target's evasion, then 1 acc = 1% hitrate. If you have less accuracy, then the deficit is halved, so that it's 1 acc = 0.5% hitrate.

Presumably, level correcting should do the same, so that having more accuracy than the target's evasion isn't so dominating. A quick check with the highest geared set revises hit rate to 60% unresisted, 24% halved, 9.6% quartered, and 6.4% eighthed. That gave the formula some teeth, but it might be too much. I'd need a realistic scenario and retail result to be sure.

And also, the circumstances I illustrated are "lol don't exist." It's all boiled down to an Excel spreadsheet, so I can plug in any circumstances I want if anyone wants to see a better vetting of the correction.

Edit edit:
Threw some numbers at the old formula, just to watch its toes curl. Assume 276 elemental skill, mage int = 81 (L75 tarutaru BLM/RDM) and target int = 81 (Fafnir's INT, if you're ever curious.) No acc gear at all.

Against targets L75 - 81, the old formulas actually have your accuracy capped at 95% unresisted even if you're naked. At 82, your chance of a half resist is now 13% instead of 4.75%, and at 83 you now have a 42% chance of a half resist. At 84, the target's MEva jumps from a C skill (274) to a B (299,) and your half resist is now 75.9%. Putting on an HQ staff will lower that to 72.9, and raising your INT to 96 and Elemental skill to 300 will give you a 67.6% chance of a half resist.

So basically, everything catches up to you at L83 targets, and then a mob's magic evasion increases from 263 @ 83 to 299 @ 84, which is a literal difference of 36 accuracy before level adjustment. At 83, your "p" is reduced by 80%, and at 84 by 90%. At 85+, you're taking a 100%+ penalty, so there's no point in equipping anything except raw damage, since you cannot defeat the formula.

Umm... nuke some L82-83 stuff until it's fixed? I sympathize, but I can't fix it on Whasf's server. :)

I'm also going to look into the formulas that delayedlaw originally posted about, to entertain myself and to get the thread back on topic. These numbers are kind of fun.

Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Magic Attack bonus vs Int gear

Post by PrBlahBlahtson » Sun Aug 19, 2012 10:19 pm

So, back on topic, the issues delayedlaw brought up. You're going to get a look at what bug diagnosing actually is :)
The resist rate seems about the same.
Correct. Under the current trunk formulas, you're capped on accuracy even if you're naked against mobs L75-79. :) See previous posts if you want to know how fun that is to fix. You also might want to read below concerning this, though.
"Today, a fairly common rule of thumb is that “2INT ≈ 1MAB,” which has been largely shown to be true from general observation.
Problem: Those squiggly lines mean "about." This is a rule of thumb, and not completely accurate for every single calculation. Note the "largely shown to be true." That's a way to say "but there are exceptions."
Then he goes into the testing he did with complicated math formulas that make my head swim.
Unfortunately, those are the important bits to proving if you're right or wrong. I'ma probably make your head spin a bit again, since we're going to dive into this bug.

On the suggestion that MAB is handled incorrectly, I would be tempted to agree. tells us that MAB traits are +20 at L10 BLM, +4 at 30, +4 again at 50, and a final +4 at 70, for a total of +32. In the formula, this would look like 0.32. "Magic Attack Bonus" from gear that looks like Moldavite Earring would be +5 in the same way as traits, or +0.05. I believe there was a second group of gear that's handled differently, but I can't find anything on it at the moment. Just know that it may exist.

Wandering back to the formulas, Magic Attack Bonus vs Magic Defense Bonus should be handled as such: (100 + MAB)/100 / (100 + MDB)/100. You would end up with 132/100 / 100/100, as a naked L70+ BLM vs a target with no MDB.

The current formula does... something else. It drops the division by 100, and looks like this:

Code: Select all

mab = (100 + caster:getMod(MOD_MATT)) / (100 + target:getMod(MOD_MDEF))
I'm going to throw a Moldavite Earring (MAB +5) into the mix for fun. If we assume a target does not have Magic Defense Bonus, then this would be (100+37)/(100+0), or 1.37, which is correct. If we give the target magic defense bonus I, it would be 137/110 or 1.2454, which is also correct. So the formula is sound, even if it looks different. I guess my concerns were unfounded. Burrower Worms don't have MDB, since they're BLMs however.

A quick check shows that Burrower worms belong to groupid 10749, which has a level range of 81-84 (should be 75-79), and a poolid of 4053. That will actually uncap and possibly kill your resist rate very quickly. The formula does not tolerate nuking L83 and 84 mobs. Poolid 4053 belongs to worms, and assigns them a main job of 4 (BLM) and a support job of 5 (RDM). Wait, a support job? Red Mage? Red mage gets +10 MDB at 25, and +2 more at L45 and L96. So, the worms would be 81 BLM/40 RDM to 84 BLM/42 RDM, giving them a magic defense bonus of +10. Quick recalculation with this new information gives us 137/110, or 1.24545, instead of 1.37. A 13% penalty to the face, all over a little trait. So, looks like that might have thrown your math off. Now, unfortunately you didn't provide your stats/gear, so I can't check the math. That kinda makes this kind of hard, since any attempt to check the math is raw speculation. You may have thought Sorcerer's Ring and Uggalepih Pendant were contributing, but... they're not actually scripted, so they have a REAL latent effect of inventory -1.

Back to the formulas, you end up with spell damage * bonus from a magic burst * bonus damage from magic burst traits and gear * mab * "staff", which would be 1.1 or 1.15 depending on the staff. This is... pretty much accurate. As near as I can tell, you were packing +22-25 MAB that actually functioned, and as much as +18 that you thought functioned. This would have been 1.54 if you had gotten the expected 0 MDB, but you got a surprise instead.

Naked taru BLM/RDM:
Stone IV - 563
Water IV - 608
Aero IV - 653
Fire IV - 702
Blizzard IV - 753
Thunder IV - 807

I can tell if I resist from my server console, but sadly I can't tell if I crit. Guess I'd better hope I didn't. The +50 stepping suggests I'm okay.

Divide by 132/110 (1.1) to remove BLM's MAB traits, and we have some raw damage that we can play with:
511.81, 552.72, 593.6, 638.18, 684.54, 733.63

Now, we can multiply by 1.54 and then by 1.15 (HQ staff) to see what you would normally expect with +22 MAB:
906, 978, 1051, 1130, 1212, 1299

That looks like it falls right inside your INT set, which I'm predicting was roughly +43 (22 * 2 :D), from AH gear.
Let's try it with the real MAB (154/110, or 1.4):
824, 889, 955, 1027, 1102, 1181

Huh, that unexpected MDB is kind of a bummer, ain't it. Knocked about the expected 10% off the damage from MDB +10. Glad to see that's working right.

Either way, the formula's actually accurate from what I can see, apart from not including day/weather bonuses. I don't have any actual figures to be certain I'm right. I could write those right now if the core functions exist and kjLotus wasn't already working on magic.lua.

Confirmed bugs:
- Burrower worm level is incorrect. This might mess with your resist rate pretty heavily if you find a L84.

Possible bugs:
- All worms have a support job of Red Mage. Unexpected MDB ftw!

Post Reply