Jump to content
Burzmali

[v22.5 Battlescape] One-way targetting

Recommended Posts

Ignoring adjacent cover, it is my understanding that aim is supposed to be symmetric, especially at range. If I can target you, you can target me. I've noticed that this can be a problem sometimes, which can be a bit rage inducing.

Icantshootyou.jpg

Butyoucanshootme.jpg

Save available on request.

Icantshootyou.jpg

Butyoucanshootme.jpg

Icantshootyou.jpg.1933571df0798f819215ef

Butyoucanshootme.jpg.e01351898b87391791b

Share this post


Link to post
Share on other sites

Did you try that with both soldiers standing?

There is code in place to increase the stopping chance of all props by 25% if the soldier taking the shot is kneeling to simulate their lower viewpoint.

This is due to be removed as it causes confusion but I think it is still present in the current version.

Share this post


Link to post
Share on other sites

Nay, the game is counting squares differently from left to right than from right to left. If that rock plateau was to the south, the reverse would have been true.

Share this post


Link to post
Share on other sites
Not sure what you mean by that.

In the first image, you see where some square are adjacent on an edge instead of a corner? For each tile above or below the horizontal from shooter to target, you are going to have 3 of those connections. Ideally, the pattern for counting those increases would be identical regardless of targeting from left to right or right to left (in fact many games work this way, the targeting function always checks from the endpoint with the lesser x coordinate to the one with the greater, etc.). However, Xenonauts clearly calculates from shooter to target. In the images above, you can see that in the first image, there are 4 corner squares between the target on the right and the first adjacent squares and in the second image, there are only 3 squares coming from the shooter on the right and the next square was adjacent, sending the los into those rocks and terminating it.

What this means is that if those rocks weren't there, the paths from left to right and right to left would be identical, with the exception of the adjacent squares. Due to rounding, those 3 squares might be different by one place on each path. Normally this isn't a problem, but as you can see in this example, on occasion it can result in the path entering a blocked tile in one direction but not the other. I am assuming that the algorithm rounds up, meaning that the steps happen closer to the shooter, meaning that if a rock out cropping with below the horizontal closer to the left shooter/target, then this situation would be reversed as the L-to-R path would have an adjacent square one position closer to the left end than the R-to-L path.

Share this post


Link to post
Share on other sites

The visible squares in the two images are in identical locations.

The only difference is that in the second image the rightmost square is orange instead of green.

That is due to the rock it is partially under being ignored for cover purposes in the first image as it is right beside the shooter.

It is difficult to see because of the quality of the images but if you zoom in you can clearly see it.

You can see this even better if you overlay one of the images over the other with some transparency.

That was why I was a little confused by your previous post.

I have however seen the changes in shot path you mention.

Here is a different picture that shows it a little more clearly.

The first and second images are two soldiers shooting in opposite directions.

The third highlights the difference in shot path in purple.

Your suggestion is that if one of those purple sections crossed into a blocking tile, say when firing from the north, then it could cause the shot to be blocked from the north but not from the south?

That makes sense to me now I see the whole path. ;)

xpCzsKN.jpg

Fixing this could clear up some of those more frustrating situations where you can't target an enemy only for them to shoot you in their turn.

Share this post


Link to post
Share on other sites

Yeah, that is a much clearer view of the situation. In fact, your example does have a magic tile that would block in S-N but not N-S, specifically, that purple circle on the right nearest the south soldier. That circle is the only circle on that tile, if that was a wall or other object, it would block the S-N LoS.

Share this post


Link to post
Share on other sites

That's what I thought at first but on closer inspection I think that is actually sharing a tile with the other purple and the orange north of them.

That doesn't affect the theory though, it's just the plain whiteness of the tiles that makes it difficult to tell and the fact that I deliberately chose an area without intervening obstacles so the whole path would show.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×