Page 1 of 1

Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 3:55 am
by awalwang
On 1.0 and 1.1, I'd maybe have a 145% critical chance total after all bonuses on say, a ranger with a shotgun. Say the enemy is a Naga Serpens that reduces crit chance by 20% due to dodge.

Before 1.2 that meant a 125% critical chance, a guaranteed critical hit.

After 1.2, I noticed that my critical chance was being reduced to 100% first, and then the dodge critical chance penalty applied after that, giving me 80% critical chance in the end.

Is this just a bug on my end (perhaps I should just do a clean install of the mod)?

I'll probably try to reinstall the mod when I get off work and provide you with any other information then, should you need any.

Edit: Got some screenies of what I'm talking about. Set up a theoretical situation with all possible bonuses for my Assault.

https://i.imgur.com/Tur45pU.jpg

https://i.imgur.com/RORZYGx.jpg

Not just a UI bug, as shown here:
https://i.imgur.com/d8mA7LL.jpg

I should have 135% crit; 170% before the penalty is applied, 135% after.

Right now it's clamping my crit bonus to 100%, and then deducting the crit penalty from dodge.

Long War 2 is the only mod I have active at this time.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 6:10 am
by sectoidfodder
I'm going to argue against this being a bug. You can't be any more successful than all of the time in your crit promotions, so as long as the target has any dodge it makes sense that 100% crit chance isn't possible. Crit already reasonably counters dodge in 1.2, just not to the extent that OP expected. The result of those two mechanics countering each other should be the standard "hit" result, and OP still has 100% chance between hit and crit, though what he seems to want is to allow excessive crit to overwhelm dodge to the point where it doesn't exist.

The argument would make sense if promote/demote were one combined roll based on (crit - dodge), but it isn't.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 6:38 am
by TerribleName
Does anyone know if the roll is clamp(crit-dodge,0,100) or clamp(crit,0,100)-clamp(dodge,0,100)?

If its the former thats fine, everything is great. More crit overcomes enemy dodge and things work how the player expects. If its the latter thats not cool at all and it needs to be communicated to the player that crit over 100 is worthless and dodge trumps everything. Real work needs to be put into the shot wings and tool tips.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 6:57 am
by sectoidfodder
TerribleName wrote:Does anyone know if the roll is clamp(crit-dodge,0,100) or clamp(crit,0,100)-clamp(dodge,0,100)?

If its the former thats fine, everything is great. More crit overcomes enemy dodge and things work how the player expects. If its the latter thats not cool at all and it needs to be communicated to the player that crit over 100 is worthless and dodge trumps everything. Real work needs to be put into the shot wings and tool tips.
Neither. My whole point was that they're two separate rolls:

Start with 100% hit

Roll 100+% crit clamped between 0 and 100

You now have 100% crit

Roll 35% dodge clamped between 0 and 100

You now have 65% crit and 35% normal hit

The opposite example:

Start with 100% hit

Roll 35% crit clamped between 0 and 100

You now have 35% crit and 65% normal hit

Roll 100+% dodge clamped between 0 and 100

You now have 35% normal hit and 65% graze

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 8:16 am
by Sporadix
Two separate rolls, but crit/dodge over 100% is still worthless for the sake of these calculations it seems.

I think this is a pretty glaring problem, because the calculations are presented to the player in the UI the same way that hit chances are presented: with additive and subtractive modifiers, and a net result. But base hit chance DOES have value over 100 because it can overcome defensive modifiers plus the graze band.

You can see how this could be very confusing to players.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 7:25 pm
by TerribleName
sectoidfodder wrote:
Neither. My whole point was that they're two separate rolls:

Start with 100% hit

Roll 100+% crit clamped between 0 and 100

You now have 100% crit

Roll 35% dodge clamped between 0 and 100

You now have 65% crit and 35% normal hit
So what youre saying is that its clamp(crit,0,100)-clamp(dodge,0,100), exactly the case I said was not great because it misrepresented information to the player and makes stacking crit worthless.

Roll 100+% crit clamped between 0 and 100 = clamp(crit,0,100)

Roll 35% dodge clamped between 0 and 100 = clamp(dodge,0,100)

You now have 65% crit and 35% normal hit = clamp(crit,0,100)-clamp(dodge,0,100) for max crit chance.

So exactly the thing that I said previously but you disagreed with and then went on to show was actually the case.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Mon Feb 27, 2017 8:09 pm
by Sporadix
So what youre saying is that its clamp(crit,0,100)-clamp(dodge,0,100), exactly the case I said was not great because it misrepresented information to the player and makes stacking crit worthless.

Roll 100+% crit clamped between 0 and 100 = clamp(crit,0,100)

Roll 35% dodge clamped between 0 and 100 = clamp(dodge,0,100)

You now have 65% crit and 35% normal hit = clamp(crit,0,100)-clamp(dodge,0,100) for max crit chance.

So exactly the thing that I said previously but you disagreed with and then went on to show was actually the case.
Technically it's not clamp(crit,0,100) - clamp(dodge,0,100).

It's actually something like clamp(crit,0,100)*(1-(clamp(dodge,0,100)) as far as determining your chance to crit because you're effectively making two independent rolls that apply simultaneously. They're joint probabilities, the values are not combined additively.

Still, crit/dodge over 100% has 0 value and it's not communicated to the player in any way, so we're totally in agreement there.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Tue Feb 28, 2017 8:08 pm
by nmkaplan
Right, it's only subtractive when crit chance = 100%.

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Wed Mar 01, 2017 12:57 am
by Jadiel
So the patch notes say that negative dodge is transformed into extra crit chance. Is negative crit turned into additional dodge? Seems like it probably shouldn't be... It would be nice to have an indication of how it's meant to work, so we can see if it's bugged or WAD.

Likewise, is dodge/crit over 100 intended to be worthless? Or should excess dodge remove crit, and vice/versa?

Re: Issue with the Crit "Clamping" introduced in 1.2

Posted: Wed Mar 01, 2017 9:15 pm
by bountygiver
Negative crit is clamped, otherwise resilience will produce extra dodge.

Still, I agree excess crit should start eating away dodge.