Jump to content

How do I change the shooting logic?


TSan98

Recommended Posts

By this I mean how do I change how the game determines what a shot hits.

For those who don't know, XCE makes it so that, when a weapon is fired, the game first checks if the shot hits any obstacles between the shooter and the target, then it checks if the shot hits the target.

This is the opposite of vanilla behavior where the game first checks if the shot hits, then, if it misses, it checks if the shot hits any obstacles.

I want to know how to revert this change because I modded my game so that it's possible to get 100% hit chance, and it frustrates me that, in XCE, I don't actually have 100% hit chance when it says I do.

Edited by TSan98
Link to comment
Share on other sites

I applied the same modification of making it possible to get 100% hit chance to vanilla, and made shots that state that they have 100% hit chance.

Never had a single shot that had 100% hit chance hit anything other than the target in vanilla.

Link to comment
Share on other sites

Worst case scenario you have to change the binary, but the XCE team announced their last version will very most likely be the final version released, and best case scenario you would find something in the moddable files, but i dont know anything about that.

Link to comment
Share on other sites

  • 1 month later...

Interesting, given how the lambda player is only informed that hit chances resulting from accuracy, weapon and distance (e.g. 100% or 68%) are decreased relatively to a cover's percentage (e.g. 25%), as displayed during the aiming animation (e.g. (100-25)x1 = 75% or (100-25)x0.68 = 51%).

So, if I understand well, you are saying that:

  • with Community Edition, a 100% chance shot through a 25% cover:
  1. Hits cover 25% of the time (first test);
  2. Hits target (100-25)x1 = 75% of the time (a 1:3 ratio);
  3. Misses the target (100-25-75) = 0% of the time.
  • with vanilla Xenonauts, a 100% chance shot through a 25% cover:
  1. Hits target 100% of the time (a 1:1 ratio);
  2. Hits cover (100-100) = 0% of the time.
  • with Community Edition, a 68% chance shot through a 25% cover:
  1. Hits cover 25% of the time;
  2. Hits target (100-25)x0.68 = 51% of the time (a 1:2 ratio);
  3. Misses the target by a few squares (100-25-51) = 24% of the time.
  • with vanilla Xenonauts, a 68% chance shot through a 25% cover:
  1. Hits target 68% of the time (a 2:3 ratio);
  2. Hits cover (100-68)x0.25 = 8% of the time;
  3. Misses the target by a few squares (100-68-8) = 24% of the time.

These ratios are both different and simple to test enough to assess whether the shooting logic in vanilla and XCE are different.

Are the info displayed during aiming in vanilla Xenonauts also different?

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...