A Linear Crit/Hit/Graze/Miss rework

Post Reply
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

I spent a couple days working a more straightforward system that still captures much of the same feel as LW2's Crit/Hit/Graze framework and is much simpler (I think) to understand.

In pictures: (1) Image
(2) Image
To play with the numbers yourself (and see a few more examples) click here for a Google Sheet: https://docs.google.com/spreadsheets/d/ ... edit#gid=0

The benefits are that
(1) everything is linear (no multiplying of percentages with other percentages) and results in a simple single roll (like the Hack bar);
(2) higher crit and higher chance to hit = lower % chance of graze;
(3) now, 70 means 70: 70 aim against a target (with 0 defense) always means a 70% chance of some kind of hit and a 30% chance to miss completely; and
(4) it accommodates hit and crit above 100 pretty easily.

If you've seen xylthixlm's "Crit Chance Change" mod, this is pretty similar in spirit.

The formulas are, in terms of the displayed TO-HIT, CRIT, and DODGE:
  • %crit = CRIT – 0.2×(100 – TO-HIT)

So at 100% chance to hit, 30 crit = 30% chance to crit, but as your chance to hit decreases, so does your crit %chance (at a rate of 20%).

  • %graze = 20 + DODGE – 0.5×%crit

As is currently the case, there is a base 20% chance of a graze, to which the target's Dodge gets added. But then, the higher that the previously calculated %crit is, the lower the chance of a graze is (by half that amount). So increasing Crit not only makes a crit more likely but also decreases the chances of ending up with a graze.

  • %normal hit = TO-HIT – %crit – %graze

Finally, all the leftover %chance to hit goes to regular hits. Again, this means that 80 aim against an exposed target (with 0 defense) means exactly what you think it does: a 80% chance of some kind of hit and a 20% chance to miss completely.

tl;dr: Proposed new method for calculating % chance of crit, hit, graze is simpler to understand, easier to represent in the current interface, and doesn't result in almost every shot having a 20% chance of graze.
Last edited by wobuffet on Fri Mar 03, 2017 8:02 pm, edited 1 time in total.
Goumindong
Posts: 193
Joined: Tue Jan 24, 2017 11:04 pm

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Goumindong »

You could just turn off the graze band
wei270
Posts: 96
Joined: Mon Jan 30, 2017 6:07 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wei270 »

and why would you want a linear system anyway isn't it better to have more variance?
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

wei270 wrote:and why would you want a linear system anyway isn't it better to have more variance?
There is more variability here: instead of Graze almost always being 20% likely to happen, now you can reduce (or even eliminate) the %chance graze by increasing your To-hit or Crit.

This would open up more interesting gameplay decisions: flank that Viper with a Shotgun to get high Crit and reduce its Dodge abilities, or just take several 50% shots that each are 20% likely to graze? You don't have that decision right now: all of your shots are just 20% likely to graze no matter what.
Jadiel
Posts: 214
Joined: Tue Jan 24, 2017 9:28 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Jadiel »

wobuffet wrote:
wei270 wrote:and why would you want a linear system anyway isn't it better to have more variance?
There is more variability here: instead of Graze almost always being 20% likely to happen, now you can reduce (or even eliminate) the %chance graze by increasing your To-hit or Crit.

This would open up more interesting gameplay decisions: flank that Viper with a Shotgun to get high Crit and reduce its Dodge abilities, or just take several 50% shots that each are 20% likely to graze? You don't have that decision right now: all of your shots are just 20% likely to graze no matter what.
That's not true. At the moment, increasing your crit (through flanking or any other means) also reduces the chance to graze.
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

Jadiel wrote:That's not true. At the moment, increasing your crit (through flanking or any other means) also reduces the chance to graze.
True, but not as effectively, right? At present, you can never under any circumstances eliminate Graze against any target with positive Dodge, unless you have literally 100 Crit.
Jadiel
Posts: 214
Joined: Tue Jan 24, 2017 9:28 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Jadiel »

Currently, you need both 100% crit and 110% to-hit to eliminate graze completely if your target has positive dodge.
User avatar
Devon_v
Long War EU Crew
Posts: 297
Joined: Fri Jan 20, 2017 3:17 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Devon_v »

You make it sound like 20% of your hits will graze. This is not true. 10% of your hits will graze, and so will 10% of your misses.

IMO LW2's system makes way more sense than vanilla's linear system.
Jadiel
Posts: 214
Joined: Tue Jan 24, 2017 9:28 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Jadiel »

Devon_v wrote:You make it sound like 20% of your hits will graze. This is not true. 10% of your hits will graze, and so will 10% of your misses.

IMO LW2's system makes way more sense than vanilla's linear system.
Under his rework though, that's true. With 0% crit and 0% dodge, 20% of the time you will get a graze which would have been a hit if the graze band was 0.

Under the current system (with 0 crit and 0 dodge and ignoring extreme ends of the spectrum), 10% of the time you will graze with a shot which would have been a hit if the graze band were 0, and 10% of the time you will get a graze which would have been a miss if the graze band were 0.

I think a system which is transparent to the player and behaves they way they expect is important, but I don't think yours does. For example, say I'm taking a shot with 50% TOHIT and 50% CRIT (which is quite common when flanking from range in the early game). Under your system I have:

%crit = 50 - 0.2(100-50)=40%
%graze = 20 - 20 = 0
%hit = 50- 40 = 10

So overall I crit 40% of the time and get a regular hit 10% of the time, and miss the rest of the time. This is not what I'd expect from 50% crit and 50% hit, with a 20% graze band.

If my enemy is, say, a snake and has 20% dodge then I now have:

%crit = 50 - 0.2(100-50) = 40%
%graze = 20 + 20 - 20 = 20%
%hit = 50 - 40 - 20 = -10%

Yeah, not sure what happens here?
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

Devon_v wrote:IMO LW2's system makes way more sense than vanilla's linear system.
I agree! I just don't like the current system's
"Your chance of dealing any damage to the target is your displayed chance to hit, plus 10%... unless the target has Dodge, in which case it's somewhat less.
How likely you are to Graze? Who knows?
What does accumulating 50 Crit from flanking and weapon mods translate to? Who knows?"
Jadiel wrote:I think a system which is transparent to the player and behaves they way they expect is important, but I don't think yours does. For example, say I'm taking a shot with 50% TOHIT and 50% CRIT (which is quite common when flanking from range in the early game). Under your system I have:

%crit = 50 - 0.2(100-50)=40%
%graze = 20 - 20 = 0
%hit = 50- 40 = 10
True, understanding this rework would require some undoing of LW2's expectations. But it would be much more transparent: displayed TO-HIT = %chance of any hit on the target, and the linear/single roll system would (I hope) make it possible to display accurate %chances to crit and graze, too.

As you point out, crit is a bit more powerful in my system than the current system.
This makes high (say, 50%+) crit more dependable, especially when paired with high accuracy: I think this opens up strategy more by increasing your ability to lower/eliminate %chance of Graze. (See pictures/examples in Google Sheet.)

I do imagine some tweaks cutting down on Crit abilities would be in order, if you were thinking more macro-scale in the context of the game/mod.
Jadiel wrote:If my enemy is, say, a snake and has 20% dodge then I now have:

%crit = 50 - 0.2(100-50) = 40%
%graze = 20 + 20 - 20 = 20%
%hit = 50 - 40 - 20 = -10%

Yeah, not sure what happens here?
That's what the Google Sheet https://docs.google.com/spreadsheets/d/ ... edit#gid=0 is for! This turns into 40% crit, 10% graze, 50% miss: Crit gets priority.
User avatar
Devon_v
Long War EU Crew
Posts: 297
Joined: Fri Jan 20, 2017 3:17 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Devon_v »

50% crit in Long War means 50% of your hits will be crits. If you have 40% to hit, then you have 20% to crit. That's half. It also means that half of your grazes will be hits instead.

Dodge does the opposite. If the enemy has 20 dodge, and you have 50% to hit, then 10% of your hits will be grazes, that's one-fifth. 4% of the grazes will miss. Also one fifth of your crits will be normal hits.

It's actually really straight forward, it's just not what you might be expecting coming from vanilla's low-hit auto-crit system.
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

Devon_v wrote:50% crit in Long War means 50% of your hits will be crits. If you have 40% to hit, then you have 20% to crit. That's half. It also means that half of your grazes will be hits instead.

Dodge does the opposite. If the enemy has 20 dodge, and you have 50% to hit, then 10% of your hits will be grazes, that's one-fifth. 4% of the grazes will miss. Also one fifth of your crits will be normal hits.

It's actually really straight forward, it's just not what you might be expecting coming from vanilla's low-hit auto-crit system.
Crit, Dodge, and their interaction is not straightforward at all.

Here are some questions:
(1) You take a 50% To-hit shot with 50% Crit against an enemy with 20 Dodge. What is the probability that, at the end of the day, you get a normal hit?
(2) You take a 100% To-hit shot with 50% Crit against an enemy with 50 Dodge. What is the probability that, at the end of the day, you get a graze?

To answer these correctly, you need to know whether the crit/upgrade check fires first, the graze/downgrade check fires first, or they both fire off the same original To-hit and Crit values. I doubt even 10% of LW2 users know the answer. It's a mess.
User avatar
Devon_v
Long War EU Crew
Posts: 297
Joined: Fri Jan 20, 2017 3:17 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Devon_v »

wobuffet wrote:
Devon_v wrote:50% crit in Long War means 50% of your hits will be crits. If you have 40% to hit, then you have 20% to crit. That's half. It also means that half of your grazes will be hits instead.

Dodge does the opposite. If the enemy has 20 dodge, and you have 50% to hit, then 10% of your hits will be grazes, that's one-fifth. 4% of the grazes will miss. Also one fifth of your crits will be normal hits.

It's actually really straight forward, it's just not what you might be expecting coming from vanilla's low-hit auto-crit system.
Crit, Dodge, and their interaction is not straightforward at all.

Here are some questions:
(1) You take a 50% To-hit shot with 50% Crit against an enemy with 20 Dodge. What is the probability that, at the end of the day, you get a normal hit?
(2) You take a 100% To-hit shot with 50% Crit against an enemy with 50 Dodge. What is the probability that, at the end of the day, you get a graze?

To answer these correctly, you need to know whether the crit/upgrade check fires first, the graze/downgrade check fires first, or they both fire off the same original To-hit and Crit values. I doubt even 10% of LW2 users know the answer. It's a mess.
It's what the shot breakdown says. The effects of Dodge on to-hit, and to-hit on Crit are displayed.

The game maps the probabilities to the d100 roll, the percentages are used to generate that map. As far as I understand it Crit and Dodge negate each other at a 1:1 ratio since they have equal and opposite effects. The answers should be 34% and 10%, respectively. In the first instance you have a net 30 Crit, so 30% of your 40% hits and 30% of your graze band are upgraded on the shot map. In the second instance dodge and crit completely negate one another and you have only the graze band to calculate.

Unless someone from Pavonis indicates otherwise, the displayed values in the shot wings should be correct aside from the missing graze band.

I know the UFOpaedia article implies that three rolls are made for a shot, but as far as I know this is not true, it uses the same system as X2, just taking the values as percentages rather than absolute numbers.
wobuffet
Posts: 92
Joined: Mon Jan 23, 2017 3:09 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by wobuffet »

Devon_v wrote:The answers should be 34% and 10%, respectively. In the first instance you have a net 30 Crit, so 30% of your 40% hits and 30% of your graze band are upgraded on the shot map. In the second instance dodge and crit completely negate one another and you have only the graze band to calculate.
Nope. From amineri herself ( https://www.reddit.com/r/Xcom/comments/ ... d/dcy3yvu/):
50% to hit, 50% dodge, 0% crit => 50% miss, 35% graze, 15% regular damage
50% to hit, 50% dodge, 50% crit => 45% miss, 20% graze, 25% regular, 10% crit

Back-engineering from this, the correct answer to my first question (50% To-hit, 50% Crit, 20 Dodge) is
(1) Calculate normal hit / graze band / miss = 40 hits / 20 grazes / 40 misses
(2) Chance of crit roll success is 50%, and chance of dodge roll success is 20%. These are independently rolled.
__(a) thus with 40% chance they both fail, and with 10% chance they cancel out: in total, 50% of our original cases are unchanged
__(b) with 40% chance only the crit roll succeeds, which upgrades some grazes to hits (we started with 20 grazes, so we will get -8 grazes and +8 hits) and some hits to crits (we started with 40 hits, so we will get -16 hits and +16 crits)
__(c) finally, with 10% chance only the dodge roll succeeds, which downgrades some of the original hits to grazes (we started with 40 hits, so we will get -4 hits and +4 grazes) and downgrades some of the original grazes to misses (we started with 20 grazes, so we will get -2 grazes and +2 misses)
__(d) Now add everything up: we have 0+16 = 16 crits, 40+8-16-4 = 28 hits, 20-8+4-2 = 14 grazes, and so 100-16-28-14 = 42 misses.
(3) So the correct answer to my first question is 28% normal hits, not your answer of 34%: that's off by over 20%.

You can try to figure out question 2 now if you want, but my larger point is that this is mega-complicated and nobody understands it. Plus there is almost no reasonable way to counteract high Dodge.

Devon_v wrote:I know the UFOpaedia article implies that three rolls are made for a shot, but as far as I know this is not true, it uses the same system as X2, just taking the values as percentages rather than absolute numbers.
You're right and you're wrong here. The numbers are pre-crunched so that the game can make a single roll, but in effect there are three rolls made: the regular hit-or-not roll, a crit-or-not roll, and a dodge-or-not roll.


Again, my system is simpler and offers a way to counteract Dodge/Grazes by rewarding high to-hit and crit even when you're not lucky enough to score a crit (because each of these decreases the %probability of graze, whereas in LW2 right now the graze band is not decreased by these unless you get > 90% to hit).
User avatar
Devon_v
Long War EU Crew
Posts: 297
Joined: Fri Jan 20, 2017 3:17 am

Re: A Linear Crit/Hit/Graze/Miss rework

Post by Devon_v »

Okay, it's more complicated behind the scenes then I thought, but does any of that make the displayed shot information incorrect? Also Crit still negates Dodge, and seems to be exactly what it's supposed to do. Aim is "I'll get the lead in the general direction" and Crit is "I'll get it center mass". The whole system seems to recreate Terror from the Deep's 50-150% damage formula, and I'm pretty sure preventing the player from creating a situation where they know that X damage is guaranteed (except when X is minimum graze) is the intent. Basically to get away from "this is my +3 rifle of slaying" board game style of Firaxis and more towards the unreliable outcome simulation of the old games.

Thank you for the reddit link it was very informative.
Post Reply