DarkstarProject / darkstar

DEPRECATED - FFXI Server Emulator - See Project Topaz
https://github.com/project-topaz/topaz
GNU General Public License v3.0
455 stars 549 forks source link

Stun (dark magic spell) being resisted way too often #1526

Open Kthulupwns opened 9 years ago

Kthulupwns commented 9 years ago

Not sure if its the formula itself for resistance vs dark magic skill or the spell itself, but it doesn't land nearly as much as it should, a good example would be like nin/drk or rdm drk landing stuns on tiamat fairly consistantly, whereas it's nigh impossible to land 1 10% of the time on pretty much anything over lvl 80

takhlaq commented 9 years ago

dumping on @maxtherabbit

Kthulupwns commented 9 years ago

The problem is I have no idea how to rebalance the equation here

local dINT = caster:getStat(MOD_INT) - target:getStat(MOD_INT); local resist = applyResistanceEffect(caster,spell,target,dINT,37,0,EFFECT_STUN); if(resist <= (1/16)) then -- resisted! spell:setMsg(85); return 0; end

if(target:hasStatusEffect(EFFECT_STUN)) then
    -- no effect
    spell:setMsg(75);
else
    if(target:addStatusEffect(EFFECT_STUN,1,0,duration*resist)) then
        spell:setMsg(236);
    else
        spell:setMsg(75);
    end
end

return EFFECT_STUN;

end;

Kthulupwns commented 9 years ago

it looks like thats not the actual problem the problem is that dark magic skill is actually being calculated into stuns accuracy.

TeoTwawki commented 9 years ago

the problem is that dark magic skill is actually being calculated into stuns accuracy.

That is not the problem, that is supposed to be happening. On retail you can stack +dark skill gear to increase success rate on high resistance mobs. Problem has to lie elsewhere, especially if you are only seeing the problem on specific mobs or at specific level ranges.

A mobs lv, thunder resistance, stun resistance, int, and magic evasion stats will all aid its resistance while a players level, dark magic skill, int, and magic accuracy will aid in landing the spell. Maybe the level correction bits don't fair so well on higher levels? I've never seen the math for how that is done on retail, only how DarkStar does it in a handful of places like ranged ammo with add effects so I really can't be sure.

Kthulupwns commented 9 years ago

well i mean as a drk with Maxed merits on stun and + drk skill @75 cap i can barely land stuns on sky gods let alone jailers or tiamat, and a rdm/drk with a really low grade int dark skill should be able to land them at least 90% of the tiem

Deadwing888 commented 9 years ago

If MOD_STUNRES could be configured to accept a negative value, we could just lower stun resistance on every mob that matters? Or maybe add 50 magic accuracy on top of what gets calculated via dark magic skill etc?

teschnei commented 9 years ago

nobody is going to remember to add negative stun resistance every time they add a new mob

the solution is not to throw random bonus accuracy for no reason, it is to fix the actual resistance formula

On Sat, Jun 27, 2015 at 11:35 PM, Deadwing888 notifications@github.com wrote:

If RES_STUN could be configured to accept a negative value, we could just lower stun resistance on every mob that matters? Or maybe add 50 magic accuracy on top of what gets calculated via dark magic skill etc?

— Reply to this email directly or view it on GitHub https://github.com/DarkstarProject/darkstar/issues/1526#issuecomment-116196370 .

maxtherabbit commented 9 years ago

the base resistance formula is correct as far as I can tell, one option is to use the bonus param in the call to applyResistanceEffect(caster,spell,target,dINT,37,0,EFFECT_STUN);

the '0' param is bonus macc

teschnei commented 9 years ago

well, I wrote the resistance formula and I definitely made up a ton of shit for it

Deadwing888 commented 9 years ago

Is there any info I could lift from retail that would help you with this?

Hozu commented 9 years ago

I'm going to say that Flash is another spell that's supposed to have higher than usual accuracy. It almost never fully resists on retail.

maxtherabbit commented 9 years ago

a while back I reviewed the base magic resistance calculations and they appeared correct based on all information I was able to find online

it is my belief that either: 1) certain spells like flash and stun simply have bonus accuracy, in which case it would be appropriate to use the bonus param or 2) divine magic and dark magic obey different rules from elemental and enfeebling with respect to resistance - this could be tested on retail by comparing drain/aspir and banish resistances against dsp

bendangelo commented 9 years ago

I been looking into magic resistance for a while now. I definitely believe flash / stun are special spells that have a bonus magic accuracy. They do not act like regular spells, I used to play blm and stun would rarely get resisted.

Deadwing888 commented 9 years ago

@bendangelo Any update on stun?

bendangelo commented 9 years ago

I need a data point. I would say change to rdm/drk and chainspell stun an IT. Tell me the total number of casts and the number of resists.

teschnei commented 9 years ago

By the way, I was digging around for sudden lunge sets when I found someone on xiah mention that the spell stun had bonus macc that head butt and sudden lunge did not, if that helps

bendangelo commented 9 years ago

Yeah flash / stun / dispel / magic finale. They must all have a magic bonus of no higher than 50 because the formula just doesn't work for those spells. I'll probably hop onto retail and test it out later.

Hozu commented 9 years ago

Possibly Actinic Burst as well. If it doesn't, well then the 200 bonus mag acc it currently has should be removed, heh.

bendangelo commented 9 years ago

That should be removed, with 200 magic acc it can land flash on anything

TeoTwawki commented 9 years ago

I think that was the idea when it got added. Whoever added that assumed it'd work like the spell flash, which is crazy accurate.

bendangelo commented 9 years ago

The thing is that's overkill, you'll end up always landing flash on Kirin and magic resistant mobs. It has to be balanced in some way. I think 50 magic accuracy is reasonable or maybe even 75.

TeoTwawki commented 9 years ago

Depends. In the case of that blu spell, it may not even be correct to have the bonus at all. I have no idea. Just stating what I think the thought was by whoever.

Somewhat unrelated thought, but: do we floor/cap the hit rate after all the math is done?

TeoTwawki commented 9 years ago

"does DSP" do that, I should say.

bendangelo commented 9 years ago

Yeah magic is capped at 5-95%

teschnei commented 9 years ago

Isn't floor 20?

bendangelo commented 9 years ago

Floor is currently 5

teschnei commented 9 years ago

I mean supposed to be

bendangelo commented 9 years ago

From what I've seen it's been 5%. http://ffxiclopedia.wikia.com/wiki/Magic_Hit_Rate

teschnei commented 9 years ago

Ah, silly being different from melee hit rate..

Hozu commented 9 years ago

Well if it were 20% it'd be pretty easy for a few people to say... spam silence on things like Suzaku. So probably balance reasons.

Deadwing888 commented 9 years ago

In my mind Elemental seal caused you to ignore the 95% cap in addition to it's magic accuracy bonus. I've seen a lot of ES sleeps and sleepgas and can't recall a single one that wasn't full duration. Anyone know what I'm on about?

Hozu commented 9 years ago

I swear I've seen ES things fail before... on things that are vulnerable to the spell. Though, the acc bonus is probably still too small, even at +200.

teschnei commented 9 years ago

never heard of such a thing, so I probably would not put it in unless it could be tested (which would be a huge pain to do)

On Thu, Oct 15, 2015 at 6:56 PM, Deadwing888 notifications@github.com wrote:

In my mind Elemental seal caused you to ignore the 95% cap in addition to it's magic accuracy bonus. I've seen a lot of ES sleeps and sleepgas and can't recall a single one that wasn't full duration. Anyone know what I'm on about?

— Reply to this email directly or view it on GitHub https://github.com/DarkstarProject/darkstar/issues/1526#issuecomment-148563635 .

brokenboredom commented 8 years ago

To make an alternate suggestion, is it possible to add a 1/32 tier to the maigic.lua and leave the checks for 1/16 spells "<=(1/16)" or "0.0625" but adjust the aforementioned spells like stun to accept a lower value of "<= ( 1/32 )"?

Just as an alternative to the magic accuracy bonus train of thought. I'm sorry I don't have a statistical example of whether or not 50-100 magic accuracy is stronger than doubling the resistance range but this line here 412 in magic.lua:

p = 70 - 0.5 * (magiceva - magicacc) + levelDiff * 3 + percentBonus;

If p is magicHitRate, 1/16 > 1/32 is comparing it to 3.125 instead of 6.25. Unfortunately I do not posses the mathematical skills to compare doubling the full resist range to adding base magic accuracy. At least I don't think I do.

Doubling the range would ensure you half as likely to get a full resist, so you're twice as likely to cast stun unresisted for example. Adding 50 magic acc is more or less effective depending on where your current resist chance lies. if its at the cusp at 5% it would make it... 30%? That would be a 600% increase? I don't know if that is accurate, I'm bad at statistics.

bendangelo commented 8 years ago

That's not a bad idea adding a 1/32 resist case. We still need some data points from retail, or we can just make it up for now.

TeoTwawki commented 8 years ago

We already know that is not how retail handles it..