OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: SIMON BAILIE on January 06, 2018, 11:25:40 pm

Title: MISSING @MORE THAN 100% CHANCE
Post by: SIMON BAILIE on January 06, 2018, 11:25:40 pm
I know this has been discussed many times before but is this one of the worst misses ever?
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: The Reaver of Darkness on January 08, 2018, 11:16:43 pm
I've had this happen a few times. When shots have a high hit chance, they seem to miss considerably more commonly than they should. Even over 100%, it is not uncommon for a shot to miss. It usually happens when the line of fire is partially obstructed, but sometimes it seems to be based on the angle to the target. I had one shot in which the soldier missed six times, all six following exactly the same trajectory and skimming right behind the target's back.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: bulletdesigner on January 08, 2018, 11:23:40 pm
Yap reaver is right cover makes a diference, but the calc is only for weapon soldier and other variants , personaly idont know the rules, but someone in forum must know
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on January 09, 2018, 12:00:58 am
The issue is terminology and way of displaying the info.

1/ Display: "136%" should be displayed just as "136" ... the percentage sign does not belong there and is just plain wrong

(I think) I understand the reason why Julian decided to display it this way... but it will forever create confusion.

2/ Terminology: "136%" is not "136% chance to hit"... it means "your firing skill adjusted to this particular situation is a number 136"

There are situations where "100%" will always miss... and vice versa there are (many) situations where "0%" has a non-zero chance to hit.

Under ideal conditions, the displayed value corresponds roughly to chance to hit... under less ideal conditions, there is a big margin for error... under bad conditions, it doesn't correspond at all.


Summary: if you're not convinced you have ideal conditions, try to move into a better position... a "70%" shot under ideal conditions is MUCH better than a "130%" shot under bad conditions.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: tkzv on January 09, 2018, 12:17:07 am
The issue is terminology and way of displaying the info.

1/ Display: "136%" should be displayed just as "136" ... the percentage sign does not belong there and is just plain wrong

(I think) I understand the reason why Julian decided to display it this way... but it will forever create confusion.

2/ Terminology: "136%" is not "136% chance to hit"... it means "your firing skill adjusted to this particular situation is a number 136"

There are situations where "100%" will always miss... and vice versa there are (many) situations where "0%" has a non-zero chance to hit.

Under ideal conditions, the displayed value corresponds roughly to chance to hit... under less ideal conditions, there is a big margin for error... under bad conditions, it doesn't correspond at all.


Summary: if you're not convinced you have ideal conditions, try to move into a better position... a "70%" shot under ideal conditions is MUCH better than a "130%" shot under bad conditions.
What other conditions apply? Besides terrain partially blocking the target.

If it's blocking terrain, it's possible to check the 1st-person screenshot (F10), although it differs slightly from the "gun-eye" view.  As far as I can tell, the Floater on the screenshot was partially covered by the edge of the roof. Probably still is.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: 7Saturn on January 09, 2018, 10:06:04 pm
Just take it as it is. This really has been discussed on several occasions and the only way to change it is, to do the required code change on your own. I know, it's annoying (I 100% agree), but there is really no one around who will change it. (No, me neither, as I'm not that well acquainted with C++ to even try and do it.)
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: The Reaver of Darkness on January 10, 2018, 02:17:27 am
It seems reasonable to me. It always made sense that the listed chance becomes wrong when the target is partially obscured. I had thought it was simpler, however, that a partially obscured target is either always hit or always missed when the hit chance is over 100%. The truth is, I find, more like what it should be.


I have small concern with some trajectory issues, probably bugs. Sometimes the game seems to think a miss trajectory is a hit, or vice versa--like the 6 shots that went just behind the target I mentioned earlier. I don't recall as many hits that should have been misses for two reasons: one, it's hard to tell it really should have been a miss, and two, we're just too willing to accept it when the game works in our favor. But there have been times when I've had a soldier take quite a few shots from the same position, and repeatedly hit when their hit chance was very low and they weren't very close to the target. I've also seen some shots that don't seem to have had a line of fire and will hit anyway, or shots which the soldier claims don't have a line of fire but still hit when they are told to fire anyway. Usually these can be blamed on loftempset bugs or shortcomings, but sometimes I feel really convinced that the system doesn't always distinguish a hitting trajectory or a missing trajectory correctly.

I am curious: do some units have weird hitboxes that can make a hitting shot miss? If so, that's probably a good thing. I would then wonder if a sufficiently high number above 100% accuracy can help guarantee an actual target hit if such a trajectory is available, or is it possible-with some hitboxes-for a higher accuracy to have a lower chance to hit? (Imagine a unit that was a circle, a central hit is a miss.) Ideally we want the first option, not the second.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Warboy1982 on January 10, 2018, 07:49:47 am
here's what the hitboxes look like to the engine: cylinders.
the yellow 2x2 one is an xcom tank, and the purple one is a floater.
the green one in the middle is a street light, geometry gets slightly more detailed 3d representation.
i can't speak for mods, but the aliens in xcom are solid masses.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: yrizoud on January 20, 2018, 03:17:13 am
At this point I think the sanest thing would be to have a special case where : If chance to hit is > 100%, and there is no obstruction : let's skip the 3D physics. Fire the projectile in a special way which ignores the geometry, and hits only the target.
The "line of fire" algorithm is certainly not perfect, but at least the actual shooting will be more consistent with it.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: 7Saturn on January 20, 2018, 10:25:54 am
Now they will tell you, that the value shown ingame is not »percent«, so there is no 100%. Although of course pretty much every player perceives it this way..
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: heu3becteh on June 08, 2018, 03:40:20 pm
May the distinction between 101% and 143% be meaningful in some cases?
Over 100% is confusing and just defies the meaning of percent (fraction of 100), I believe it could just be capped at 99% (or 100%, if it absolutely hits when not partially obstructed?), showing that value when >99% too. Or drop the % symbol...
I was surprised too when >100% shot have missed several times.
It does not bother me personally much though.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: ohartenstein23 on June 08, 2018, 03:45:25 pm
The distinction between 101% and 143% is meaningful only in that 143 is greater than 109 - all numbers 110 and above act like 110 for the sake of calculating trajectories.  Meridian's post covers why 110+ shots miss and will always miss in the same circumstances.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Player701 on July 30, 2018, 06:12:21 pm
From what I've just read above, I can understand the "%" is misleading. However, I still can't believe the following case is not a bug... try out the attached save file (using OXCE+ build 2018-07-29). Aimed shots seem to pass right through the floater, as if he were a ghost or something. I think I've had it happen before with aliens standing in the exact same position (one square away from an abductor's entrance hatch) and trying to hit them from the side. This simply doesn't look like it can't be a bug... from a (mostly) casual player's point of view, at least.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on July 30, 2018, 11:17:04 pm
I'll check... it may take a few days.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: The Reaver of Darkness on July 31, 2018, 06:23:10 am
I have also seen many shots switch occlusion from behind to front or vice versa while the shot graphic is in the same space as the unit, causing it to appear to travel through them without hitting them. I don't recall this ever happening with any versions of UFO Defense other than openxcom.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on July 31, 2018, 06:35:16 pm
From what I've just read above, I can understand the "%" is misleading. However, I still can't believe the following case is not a bug... try out the attached save file (using OXCE+ build 2018-07-29). Aimed shots seem to pass right through the floater, as if he were a ghost or something. I think I've had it happen before with aliens standing in the exact same position (one square away from an abductor's entrance hatch) and trying to hit them from the side. This simply doesn't look like it can't be a bug... from a (mostly) casual player's point of view, at least.

Not a bug.
I attach the bullet trajectory (just start, relevant tile and end, because of post length restriction) and simple visualization in voxel space.
Orange color is the floater, red color is the bullet.

EDIT: the front view is a bit wrong, floater is floating 2 voxels above the ground... and has height of 21 voxels, so probably the topmost voxel row should also be empty... but it makes no difference since the bullet goes approximately through the vertical centre (voxel 12)

Code: [Select]
[31-07-2018_17-14-41] [INFO] Start trajectory
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[737,632,42]; tile[x,y,z]=[46,39,1]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[736,632,42]; tile[x,y,z]=[46,39,1]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[735,632,42]; tile[x,y,z]=[45,39,1]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[734,632,42]; tile[x,y,z]=[45,39,1]
<snip>
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[163,620,13]; tile[x,y,z]=[10,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[162,620,13]; tile[x,y,z]=[10,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[161,620,13]; tile[x,y,z]=[10,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[160,620,12]; tile[x,y,z]=[10,38,0]

[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[159,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[158,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[157,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[156,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[155,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[154,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[153,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[152,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[151,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[150,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[149,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[148,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[147,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[146,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[145,620,12]; tile[x,y,z]=[9,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[144,620,12]; tile[x,y,z]=[9,38,0]

[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[143,620,12]; tile[x,y,z]=[8,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[142,620,12]; tile[x,y,z]=[8,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[141,620,12]; tile[x,y,z]=[8,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[140,620,11]; tile[x,y,z]=[8,38,0]
<snip>
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[1,617,4]; tile[x,y,z]=[0,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[0,617,4]; tile[x,y,z]=[0,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[-1,617,4]; tile[x,y,z]=[0,38,0]
[31-07-2018_17-14-41] [INFO] voxel[x,y,z]=[-1,617,4]; tile[x,y,z]=[0,38,0]
[31-07-2018_17-14-41] [INFO] End trajectory
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Player701 on July 31, 2018, 09:22:31 pm
Wow. Just... wow.

Then, I guess, the question is: why doesn't the trajectory go through the target? Would it hit something in between the shooter and the target if it did? If this is the case, then why does the game think there is a line of fire at all?
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on July 31, 2018, 09:33:42 pm
Then, I guess, the question is: why doesn't the trajectory go through the target? Would it hit something in between the shooter and the target if it did? If this is the case, then why does the game think there is a line of fire at all?

There is a perfect trajectory, the game finds it and thus allows firing.

The real trajectory doesn't go through the target, because even at perfect accuracy (110 or more), there is still deviation possible... very small deviation, but over longer distances it can accumulate enough.

Try turning on save scumming... I think after a few reloads, it will hit... RNG man :)

PS: the perfect trajectory might be very very narrow, I didn't check... so it might be very hard to hit... I can investigate more if you're reeeeally curious... but it takes time
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Player701 on July 31, 2018, 09:56:35 pm
Try turning on save scumming... I think after a few reloads, it will hit... RNG man :)

Hmm. I actually do have it on most of the time, and now that you mentioned it, I've tested it some more, and aimed shots actually do hit sometimes. For some reason, though, it feels as if auto shots hit much more often - though it might just be my imagination at play. I don't think I have the patience to test it enough times for the results to be statistically significant...
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on July 31, 2018, 10:59:31 pm
I did a couple thousand simulations, and there's roughly a 5% chance to roll a good RNG

Code: [Select]
[31-07-2018_21-55-45] [INFO] Out of 1000: 45
[31-07-2018_21-56-51] [INFO] Out of 1000: 52
[31-07-2018_21-57-26] [INFO] Out of 1000: 51
[31-07-2018_21-57-33] [INFO] Out of 1000: 44
[31-07-2018_21-57-38] [INFO] Out of 1000: 39

Means the perfect trajectory in this particular situation is VERY narrow.

EDIT: damn, one zero not enough, did only hundreds, not thousands

Code: [Select]
[31-07-2018_22-06-10] [INFO] Out of 100 000: 50212

It's actually 50% chance to hit, after doing hundred thousand simulations.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Player701 on August 01, 2018, 07:02:55 am
I see... well, 50% is much more than nothing. Thank you for wasting time on this, I guess :)
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: The Reaver of Darkness on August 03, 2018, 02:02:07 am
I have found my soldiers in certain positions in which high accuracy shots will miss a clear shot several times in a row, generally by passing the target along the same or almost the same trajectory, ie. passing by the left side of the target every shot several times in a row.

What you described above could be attributed to the inherent inaccuracy of the weapon (bullet comes out a bit different every shot), unless the misses were almost always going on the same side of the target, in which case it would indicate maybe a positioning glitch of some kind.

I have had high-accuracy misses that went on the same trajectory several times in a row, on shots that were fairly short range. What I found would fix them was to move the soldier a bit and shoot again. I've also never seen it on angles that were a direct orthogonal or diagonal, rather it seems to happen mostly on angles that make a more complicated triangle on graph paper.

If I see it happen again, I'll attach a save file.
Title: Re: MISSING @MORE THAN 100% CHANCE
Post by: Meridian on August 03, 2018, 11:32:51 am
I'm 99.9% sure there's an explanation that doesn't involve bugs.

Feel free to upload a save (once in a while) and I'll explain.