Jump to content

[v21.1 Exp. - GC] Aimed Shots Causing Lowered Accuracy (?!)


Recommended Posts

EDIT: Oops, wrong version number. Should be 22.1

Just had a situation where a soldier armed with a precision rifle was about to take a shot. I was scrolling through the shot choices and found that the aimed shot coming out with a lower accuracy than the others.

The cause seems to be that the increased accuracy level was increasing the cover penalty from shooting past a soldier. Some pics to illustrate:

Snap Shot: The soldier cover penalty is 23%

2014-03-29_00003.jpg

Normal Shot: The soldier cover penalty is 43%

2014-03-29_00004.jpg

Aimed Shot: The soldier cover penalty is 66%

2014-03-29_00005.jpg

2014-03-29_00003.jpg

2014-03-29_00004.jpg

2014-03-29_00005.jpg

2014-03-29_00003.jpg.861c13ad1697a0a8a20

2014-03-29_00004.jpg.bc97206170d29145b5d

2014-03-29_00005.jpg.90ee7549e8fb7069022

Edited by kabill
Link to comment
Share on other sites

Was just coming on to post this myself. I have a save game with this in place so people can run it through the debugger if they want:

[ATTACH]3149[/ATTACH]

To test, select soldier number 2 (Heike Koch, I think), and then take aim at the pistol-armed Seb in the doorway just to the north facing the (very stupid) Xenonaut, and cycle through the aim options.

The effect changes if you get stupid Xenonaut to crouch; I think he has just enough TU to do that.

WeirdAimingIssue.sav

WeirdAimingIssue.sav

Link to comment
Share on other sites

Was just coming on to post this myself. I have a save game with this in place so people can run it through the debugger if they want:

[ATTACH]3149[/ATTACH]

To test, select soldier number 2 (Heike Koch, I think), and then take aim at the pistol-armed Seb in the doorway just to the north facing the (very stupid) Xenonaut, and cycle through the aim options.

The effect changes if you get stupid Xenonaut to crouch; I think he has just enough TU to do that.

I've been meaning to look at the debugger anyway, so I thought I'd just do this myself:

Output on taking a snapshot:

00000001 0.00000000 [1440] >>> Begin calc. projectile trajectory <<<

00000002 0.00005525 [1440] Target tile = (28, 27)

00000003 0.00007027 [1440] Unmodified accuracy calculation:

00000004 0.00015165 [1440] range penalty (1.000000) = 1 - ( max(0, dist. to target (12.529964) - weapon range (30)) / weapon range (30) )

00000005 0.00018558 [1440] shoot accuracy from props: 0.880000

00000006 0.00022702 [1440] shoot accuracy (1.000000) = shoot accuracy (0.880000) * kneeling boost (1.200000)

00000007 0.00028017 [1440] shoot accuracy (1.000000) = shoot accuracy (1.000000) - max(0, weapon recoil (0) / 100 - strength (0.660000) )

00000008 0.00032641 [1440] weaponAccuracy (62.000000) = weaponAccuracy (50.000000) * accuracyModifier (1.250000)

00000009 0.00036635 [1440] unmodified accuracy (62.000000) = shoot accuracy (1.000000) * range penalty (1.000000) * weapon accuracy (62.000000)

00000010 0.00039788 [1440] Damage for unit:

00000011 0.00046845 [1440] damage mul. (1.100000) = ( weapon range (30) / max(weapon range (30), dist. to target (12.529964)) ) * difficult mul. (1.000000) * ai race damage bonus (1.100000)

00000012 0.00052010 [1440] normal damage (37) = weapon damage (55) * random bonus/penalty (0.620000) * damage mul. (1.100000)

00000013 0.00057085 [1440] stun damage (0) = weapon stun damage (0) * random bonus/penalty (0.890000) * damage mul. (1.100000)

00000014 0.00062100 [1440] emp damage (0) = weapon emp damage (0) * random bonus/penalty (1.440000) * damage mul. (1.100000)

00000015 0.00064622 [1440] Terrain bullet score:

00000016 0.00071979 [1440] unitStopChance (0.096) = shooterAccuracy (62.000) * unitStopChance (0.310) * noTargetPenalty (0.500)

00000017 0.00071979 [1440] unitScore (0.904) = 1.0 - unitStopChance (0.096) / 100.0

00000018 0.00076424 [1440] obstacle: level = 0, cell = (83, 83), bulletScore = 0.690

00000019 0.00080057 [1440] terrain bullet score = 0.612500

00000020 0.00085643 [1440] chanceToHitTargetTile (37.975) = (unitAccuracy (62.000) + shortRangeHitBonus (0.000)) * terrainAccuracy (0.613)

output from aimed shot

00000001 0.00000000 [1440] >>> Begin calc. projectile trajectory <<<

00000002 0.00004264 [1440] Target tile = (28, 27)

00000003 0.00008768 [1440] Unmodified accuracy calculation:

00000004 0.00016066 [1440] range penalty (1.000000) = 1 - ( max(0, dist. to target (12.529964) - weapon range (30)) / weapon range (30) )

00000005 0.00017207 [1440] shoot accuracy from props: 0.880000

00000006 0.00022882 [1440] shoot accuracy (1.000000) = shoot accuracy (0.880000) * kneeling boost (1.200000)

00000007 0.00027026 [1440] shoot accuracy (1.000000) = shoot accuracy (1.000000) - max(0, weapon recoil (0) / 100 - strength (0.660000) )

00000008 0.00030870 [1440] weaponAccuracy (162.000000) = weaponAccuracy (130.000000) * accuracyModifier (1.250000)

00000009 0.00034653 [1440] unmodified accuracy (162.000000) = shoot accuracy (1.000000) * range penalty (1.000000) * weapon accuracy (162.000000)

00000010 0.00035795 [1440] Damage for unit:

00000011 0.00044863 [1440] damage mul. (1.100000) = ( weapon range (30) / max(weapon range (30), dist. to target (12.529964)) ) * difficult mul. (1.000000) * ai race damage bonus (1.100000)

00000012 0.00048076 [1440] normal damage (36) = weapon damage (55) * random bonus/penalty (0.600000) * damage mul. (1.100000)

00000013 0.00051440 [1440] stun damage (0) = weapon stun damage (0) * random bonus/penalty (1.050000) * damage mul. (1.100000)

00000014 0.00055103 [1440] emp damage (0) = weapon emp damage (0) * random bonus/penalty (0.840000) * damage mul. (1.100000)

00000015 0.00057025 [1440] Terrain bullet score:

00000016 0.00062520 [1440] unitStopChance (0.656) = shooterAccuracy (162.000) * unitStopChance (0.810) * noTargetPenalty (0.500)

00000017 0.00062520 [1440] unitScore (0.344) = 1.0 - unitStopChance (0.656) / 100.0

00000018 0.00065824 [1440] obstacle: level = 0, cell = (83, 83), bulletScore = 0.190

00000019 0.00068286 [1440] terrain bullet score = 0.000000

00000020 0.00072250 [1440] chanceToHitTargetTile (0.000) = (unitAccuracy (162.000) + shortRangeHitBonus (0.000)) * terrainAccuracy (0.000)

(emphasis mine)

Unfortunately I cannot see in this output how the bolded value is calculated; however it does seem to increase based on the accuracy of the shot taken. It seems that in certain circumstances this block chance grows faster than the actual hit chance, meaning that the more you aim, the more likely you are to hit the cover.

Link to comment
Share on other sites

Unfortunately I cannot see in this output how the bolded value is calculated; however it does seem to increase based on the accuracy of the shot taken. It seems that in certain circumstances this block chance grows faster than the actual hit chance, meaning that the more you aim, the more likely you are to hit the cover.

The stopping chance in your example is increasing in exact proportion with the shooting accuracy (62/162 = 0.3827; 0.31/0.81 = 0.3827).

I think where the chance to hit goes down is where there's over cover as well. In the example I posted, there's also an object with 45% stopping chance and it's not until the aimed shot that the stopping chance of the soldier increases above the stopping chance of the object (shots only use the highest cover modifier).

Link to comment
Share on other sites

And armour degradation value? How it work? The amount of damage absorbed in 1 hit degrades 1 level of armor?.

Off topic, but to answer your question: armour is degraded (by default) by 25% of the damage it absorbs. So, for example, if a soldier with 50 points of armour is hit for 40 damage, the soldier will be uninjured (all the damage is resisted by the armour) and the soldier's armour value decreased by 10 (40*25%) for the rest of the mission. Alternatively, if the soldier was hit for 100 damage, the soldier would take 50 damage and their armour would be degraded by 12.5 (50*25%).

Since this might be of interest, the rate of armour degredation can be set in config.xml. The variable is found in the first block of variables in that file, I think.

Link to comment
Share on other sites

The stopping chance in your example is increasing in exact proportion with the shooting accuracy (62/162 = 0.3827; 0.31/0.81 = 0.3827).

I think where the chance to hit goes down is where there's over cover as well. In the example I posted, there's also an object with 45% stopping chance and it's not until the aimed shot that the stopping chance of the soldier increases above the stopping chance of the object (shots only use the highest cover modifier).

Interesting, and probably the case in my shot as well (it's around the edge of a door which is probably giving a blocking chance).

The weird part of that to me is that it implies that the chance to hit static cover (walls, rocks etc.) does not really alter with the accuracy of the shot, while the chance to hit a living creature (Xenonaut, civ, different alien) scales up with the accuracy of the shot. Or at least the two scale at different rates.

Link to comment
Share on other sites

But since this guy got a sniper rifle, he is suppose to receive a penalty if he moved ? Also he is at short range... Am I incorrect ?

Short range doesn't negatively affect sniper-rifle accuracy; they just don't get the short range bonus (and the effect is only within 5 tiles, anyway). The move-and-shoot penalty has also been removed. In any case, the example I posted above was all from the same soldier in the same position on the same turn; all I was chaning was the accuracy-level of the shot.

Interesting, and probably the case in my shot as well (it's around the edge of a door which is probably giving a blocking chance).

The weird part of that to me is that it implies that the chance to hit static cover (walls, rocks etc.) does not really alter with the accuracy of the shot, while the chance to hit a living creature (Xenonaut, civ, different alien) scales up with the accuracy of the shot. Or at least the two scale at different rates.

Yeah, I think that's the problem. I'd assume aliens/soldiers are supposed to provide 'cover' in the same manner as static cover, only for some reason they're not.

Link to comment
Share on other sites

Off topic, but to answer your question: armour is degraded (by default) by 25% of the damage it absorbs. So, for example, if a soldier with 50 points of armour is hit for 40 damage, the soldier will be uninjured (all the damage is resisted by the armour) and the soldier's armour value decreased by 10 (40*25%) for the rest of the mission. Alternatively, if the soldier was hit for 100 damage, the soldier would take 50 damage and their armour would be degraded by 12.5 (50*25%).

Since this might be of interest, the rate of armour degredation can be set in config.xml. The variable is found in the first block of variables in that file, I think.

Thanks you solve my issues ;) great kabill

Link to comment
Share on other sites

Kabill, did you know how to mod cover values of items?

I know that smoke and interaction tiles can be modified.

To avoid this thread becoming too cluttered for dev's reference, I've posted an answer over on your mod's thread.

Link to comment
Share on other sites

Question about accuracy.... there is some kind of sucky weird coding for fire modes..... let me guess

Even if snap shots has less % accuracy per se, the equation of calculation is different compared to normal and aim.... right?

Snap shot and normal (even burst) sometimes dont follow the % rule showed in game.....

I had test make 60% snap shot ten times... resulting in only 2 scores.....

What a %$/ is this.... -.-

Link to comment
Share on other sites

Question about accuracy.... there is some kind of sucky weird coding for fire modes..... let me guess

Even if snap shots has less % accuracy per se, the equation of calculation is different compared to normal and aim.... right?

Snap shot and normal (even burst) sometimes dont follow the % rule showed in game.....

I had test make 60% snap shot ten times... resulting in only 2 scores.....

What a %$/ is this.... -.-

So far as I know the only difference fire mode makes is the % to hit, so if the game says you have a 60% chance to hit then that's what you have. I actually did a test yesterday - because people keep bringing this up - to check the firing accuracy and out of a few hudred shots (fired with various weapons and fire modes), the proportion of hits to misses were pretty much spot on and in all cases there was no statistically significant difference between the displayed hit chance and the actual number of hits.

It's possible, however, that there's some kind of situational bug which is causing misses even where there shouldn't be, or something like that. But, in general at least, the game seems to be working correctly.

Link to comment
Share on other sites

You can see the issue easily if you try to aim at something on the far side of the scout car while kneeling with a precision rifle.

I mentioned the original problem to Chris a couple of weeks ago but completely forgot to post up the bug report.

He said it was a known issue.

He also said that the the stopping chance of objects along the aim path should increase as you spend more TU to aim but only by 25% of the increase on the actual target.

Link to comment
Share on other sites

He also said that the the stopping chance of objects along the aim path should increase as you spend more TU to aim but only by 25% of the increase on the actual target.

So in fact it's regular cover that's not working properly because it's not scaling with firing accuracy?

(As an aside, I'm not sure why stopping chance needs to increase with accuracy. Since it's a % chance, it already scales upwards with increased accuracy: reducing a 95% chance-to-hit shot to 48% is a larger effect than reducing a 50% chance-to-hit shot to 25%. Increasing the stopping chance for higher aim shots just exacerbates that and has the effect of more frequent, less accurate shots being better at hitting against targets in cover than less frequent, more accurate shots.)

Link to comment
Share on other sites

Not certain, I could have misunderstood his reply.

The unitstopchance you highlighted could be related to the cover save.

If that is the case then it makes sense that it would increase as you aim more.

It is used to calculate the unitscore (subtracted from 1.0) which means the higher stopchance from the aimed shot translates into a much lower unitscore which could reflect a lower chance to damage the cover so a greater chance to damage the enemy.

For example if you have a crouched alien behind a wall and fire a snap shot that hits the combined alien/wall target you have a 50/50 chance of damaging the alien or the wall.

If you hit with an aimed shot you have a 70/30 chance to damage the alien rather than the wall.

It would be nice to have some information on what the terms really mean though.

Link to comment
Share on other sites

OK, so in the OP's example, what's happened is that each level of shot adds more accuracy to the shot. The Stopping Chance of the cover is remaining at 45% right the way through, which is why it rises for the first two shots, but on the third shot the chance of hitting the intervening Xenonaut increases to 66%.

The key thing is that the game only chooses the prop with the highest stopping chance to "block" each shot. For the first two accuracy levels, that's the cover - the other Xenonaut may as well not be there. But as soon as his stopping chance goes over 45% in the third accuracy level, that is used instead (and the cover may as well not be there).

Therefore the cover is working as intended. The issue is that the chance of hitting the intervening Xenonaut increases as you increase your accuracy - it's always 0.387 of the shooter's accuracy, as Kabill points out.

I'm not sure we need that system in place, now I think about it. It used to be that all units would have a 100% stopping chance, that if a shot passed through their tile then there was a 100% chance it would hit them. But because the bullets have quite a narrow scatter cone (to stop misses looking so ridiculous) people would abuse it by aiming at the tile behind the alien, knowing that the majority of shots would hit the alien they were aiming behind.

A flat 25% stopping chance for any unit not being specifically targeted would probably work just as well, and wouldn't cause these oddities. Maybe. I'm actually wondering why we used a scaling stopping chance originally...I'm sure there must have been a reason for it...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...