Page 1 of 1

Graze Issue

Posted: Sun Feb 26, 2017 6:51 pm
by antoniosteve
So, first off - I love this mod; it took what I thought was a good game, and turned it into a damned amazing game where every mission and the strategy layer actually feels like you're leading a resistance (which is what I always thought vanilla XCOM2 lacked, there was never the same sense of fighting from a position of weakness).

There's just one slight issue I'm having - the graze mechanic. I tend to log my shots and things, because it helps me when planning my moves while trying to keep my soldiers alive, and I just hit the point where I took my 3,000th shot. I took a quick break from the game, and noticed something when I went and looked at the numbers.

Total shots: 3,000
Average to-hit: 61%
Misses: 1131 (37.7%)
Criticals: 217 (7.3%)
Hits: 714 (23.8%)
Grazes: 938 (31.3%)

[Filtered to 90%+ to hit shots]
Total shots: 543
Average-to-hit: 92%
Misses: 40 (7.4%)
Criticals: 141 (26.0%)
Hits: 231 (42.6%)
Grazes: 131 (24.1%)

I'm reluctant to mess around with the "Graze Band" setting, as I don't know what it does, but looking at this backed up one thing that I felt - the number of grazes was way higher than anything I'd consider reasonable (and in many cases makes it impossible to actually "plan" properly, because shots that would have been guaranteed kills in XCOM1/LW1/XCOM2 vanilla are quite frequently hitting as grazes (I'm talking about shotguns from 2 spaces away, with 100% hit chance).

My question is - am I doing something wrong/is there some way to lessen the enemies chance of dodging shots like this? If not, I'll probably have to drop the graze band to 0 as it's kind of killing the game a bit for me, now that I'm doing retaliation missions and things.

Re: Graze Issue

Posted: Sun Feb 26, 2017 8:21 pm
by Goumindong
Maybe. Maybe not. Some enemies have dodge (which will effect graze but not effect to hit). Otherwise the "graze band" takes off on the top and bottom (i think in the newest patch there are some bounding fixes around 100% so that you should not graze 100% shots anymore) of the to-hit distribution

So if your "to-hit" is 60% with a 10% graze band then you would see 20% graze, 50% hit. And 30% miss.

Then dodge and crit are calculated. A crit moves the hit up one scale. So if you have 10% crit, then 10% of hits become crits, 10% of grazes become hits, and 10% of misses become grazes(i think on this last one, but not exactly sure). A dodge moves the hit scale down one. So if the enemy has 10% dodge then 10% of hits become grazes and 10% of graze become misses.

Re: Graze Issue

Posted: Sun Feb 26, 2017 8:45 pm
by sacho
I think aim past 100 negates the graze band. Crit chance negates dodge chance. 30% doesn't seem unnatural to me, considering enemy dodge and your own grazing fire perks. Holotargeter sharpshooters are basically anti-graze bots.

Re: Graze Issue

Posted: Sun Feb 26, 2017 9:08 pm
by aimlessgun
The number of grazes and misses actually does surprise me. It would be due to dodge, but most enemies don't have dodge as seen here http://www.ufopaedia.org/index.php/ADVE ... tats_(LW2) But maybe the number that do (and are there any dodge TDEs?) are enough to account for these stats.

Someone correct me if I'm wrong on this. So for hits at 90% of above, against an enemy without dodge, you have a 0% chance to miss right? So for that category, on hits of an average of 92%, getting 7.4% as misses is pretty crazy, as if nearly half your grazes are being downgraded into misses.

Re: Graze Issue

Posted: Sun Feb 26, 2017 9:15 pm
by Devon_v
The way Graze works is that anything within 10 of the target number is a graze. 65 aim will give you a shot breakdown of 55% to hit, 20% to graze, 25% to miss. It has equal odds of giving you a hit that you should have missed by vanilla rules as it does to steal half your damage on what would have been a solid vanilla hit.

Crit and dodge adjust the results proportional to the existing odds rather than being a flat chance, so 20% dodge doesn't make the graze band 40, it changes 20% of whatever the existing hit chance was to graze. If you had 100 aim, then it would add 20 graze. But at 50 aim it only adds 10. At 25 aim it adds 5.

Crit works the same way, upgrading a percentage of the existing hit band into a critical band. So an Assault at point blank range and 100% to hit would have their full crit chance applied, while a soldier taking a poor shot into heavy cover with a 35% to hit would only get 35% of their crit chance applied.

Edit: I was at work posting in a hurry and I typed a few mathematically incorrect statements. They have been excised.

Re: Graze Issue

Posted: Sun Feb 26, 2017 9:17 pm
by johnnylump
I'm going to put this in the elevated bug reports thread to make sure Amineri sees it and makes sure those numbers are in line with what she'd expect.

Re: Graze Issue

Posted: Sun Feb 26, 2017 11:45 pm
by antoniosteve
Thanks everyone, some of this is quite useful in terms of my move planning, particularly the explanation of how the graze mechanic is actually calculating things. It also explains some of what I've been seeing, because particularly in some of the more recent, high-enemy-count missions I've been doing, I've been seeing probably as many vipers as ADVENT troops, which having looked at the dodge on units like the Viper Serpens would certainly tie up to the numbers I've had.

(I'd not pay too much attention to the 90%+ numbers, since I think 540 is not an adequate sample size, I just included those for illustration of why it was causing me so many headaches in making tactical decisions.)

(Edited out a question that I edited in originally because I think I was imagining things, nothing to see here)

Re: Graze Issue

Posted: Mon Feb 27, 2017 3:36 am
by bountygiver
That looks normal, the graze band will usually be 20% wide barring dodges/crits changing them or shots below 10% or above 90%. The increase in grazes is usually due to enemies having grazes (if you have more high crit shots than enemies with dodges this number should get lower)

Re: Graze Issue

Posted: Mon Feb 27, 2017 6:28 am
by sectoidfodder
Are you using anyone with grazing fire? If so then those results make a lot of sense.

If not then something's off, because graze is 20% in the absence of crit and dodge, and unless a huge portion of your shots were taken against vipers I can't imagine your average dodge chance being higher than your average crit chance, especially if flank shots are counted.

The relevant source code looked alright to me, but logic errors tend to be easy to miss.

Re: Graze Issue

Posted: Mon Feb 27, 2017 11:03 am
by Clibanarius
I, too, have noticed an exorbitant amount of grazes, especially on high-hitrate shots going out, but I don't have the numbers to back up my claim like AntonioSteve does. Hopefully we can see some clarification done on whether or not this is working wholly as intended or not. Thanks for the good work, Pavonis guys and gals!

Re: Graze Issue

Posted: Mon Feb 27, 2017 3:39 pm
by steave
sectoidfodder wrote:Are you using anyone with grazing fire? If so then those results make a lot of sense.

If not then something's off, because graze is 20% in the absence of crit and dodge, and unless a huge portion of your shots were taken against vipers I can't imagine your average dodge chance being higher than your average crit chance, especially if flank shots are counted.

The relevant source code looked alright to me, but logic errors tend to be easy to miss.
No, grazing fire would make it be even more off. Currently he has 37.7% misses on a 61% hit chance average. That would make expected amount of misses 100-61-10 = 29%, which is lower. In other words, he's missing 10% more than he should, almost as if the game was setting 41-61 as the graze band instead of 51-71.
Dodge is a thing, so it may be correct, but grazing fire would take away from the already over represented miss section and add to the graze section