aliens

Author Topic: The X-Com Files online Wiki  (Read 120837 times)

Offline PltSgtMac

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: The X-Com Files online Wiki
« Reply #15 on: March 17, 2020, 06:46:12 pm »
The percentages seen in game are not true Chance-To-Hit indicators. They are more like Chance-Not-To-Mess-Up. Values 109% and higher will give you the best possible CTH (lowest deviation). Values below 100% will give you a chance to get extra deviation added to your (already lower accuracy) shot. Minimum deviation/spread is never zero so you always have a chance to miss if you are far enough away.

Offline zoli

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: The X-Com Files online Wiki
« Reply #16 on: March 17, 2020, 07:14:48 pm »
Thank you! Its a pity that we cannot see the true percentages.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: The X-Com Files online Wiki
« Reply #17 on: March 17, 2020, 08:29:23 pm »
Thank you! Its a pity that we cannot see the true percentages.

The true percentages don't exist, the game doesn't operate on the hit chance concept.
That's why they cannot be shown, not even theoretically.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: The X-Com Files online Wiki
« Reply #18 on: March 17, 2020, 08:31:25 pm »
Thank you! Its a pity that we cannot see the true percentages.

You misunderstand - there is no "true percentage" for chance to hit. The shooting mechanics aren't a simple dice roll whether you hit or not.

A line is drawn between where a unit is firing from and the target. Random deviation is applied to the target end of the line according to the accuracy you see. If the new, deviated line happens to pass through or end in your target, then you hit. Whether or not you hit the intended, the projectile travels along that line until it hits something or goes off the map.

If a percent chance to hit was given based on the mechanics of the code, it would only be accurate for the simplest of cases and be much less helpful than you'd think.

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: The X-Com Files online Wiki
« Reply #19 on: March 18, 2020, 04:01:39 am »
doesn't that just mean that the actual percentage would need to be calculated in relation to the source/target geometry?
Not saying its easy. Or even feasible. ^^
But hella sure it is possible to give a proper hit percentage for any kind of shot.

But thanks for the info. Was wondering why several +100% shots didnt hit...
Basically this means, regardless of displayed hit chance, reduce circular error probability when lining up for a shot. makes sense.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: The X-Com Files online Wiki
« Reply #20 on: March 18, 2020, 02:35:58 pm »
Theoretically, we could try to calculate it based on the geometry of the shot, but we'd have to make a number of assumptions in the math that would make the displayed chance to hit inaccurate, and we'd still have players asking "why didn't my 100% hit?" - it's no better off than we are now.

Another option is that we could simulate a large number of theoretical shots based on the exact situation and display a percent of how many times those theoretical shots hit, but in order for that to be reliable the number of simulated shots would significantly slow down the game whenever you're aiming.

In either case it's not helpful to show "true percent chance to hit" and not worth discussing the fact that it's theoretically possible.

Offline zoli

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: The X-Com Files online Wiki
« Reply #21 on: March 18, 2020, 07:47:31 pm »
I've just found some parts of the accuracy calculations in the OpenXcom source code, and the 109% accuracy limit that PltSgtMac had mentioned. But how do hitboxes look like and where is the center of target when it is selected using the crosshair?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: The X-Com Files online Wiki
« Reply #22 on: March 18, 2020, 07:50:57 pm »
Hitboxes are defined by LOFTemps: https://www.ufopaedia.org/index.php/LOFTEMPS.DAT

The crosshair is not aiming at the center of the target.
Crosshair selects only the tile, not the target voxel(s).

Offline zoli

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: The X-Com Files online Wiki
« Reply #23 on: March 18, 2020, 11:51:07 pm »
Very interesting! Thank you. I hope I'll have more questions later :)
I suspected that the crosshair is only for selecting the tile.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: The X-Com Files online Wiki
« Reply #24 on: March 19, 2020, 12:51:41 pm »
Theoretically, we could try to calculate it based on the geometry of the shot, but we'd have to make a number of assumptions in the math that would make the displayed chance to hit inaccurate, and we'd still have players asking "why didn't my 100% hit?" - it's no better off than we are now.

Perhaps we could do the same as GMs have done since forever and use a simple descriptive scale:

"practically guaranteed"
"resonably easy"
"fair chance"
"challenging"
"difficult"
"are you a pro?"
"forget it"

:P

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: The X-Com Files online Wiki
« Reply #25 on: March 19, 2020, 09:11:23 pm »
Don't even think about it ^^
6% vs 1% (or less) makes a tremendous difference when you´re firing in 15 shot salvos... ;)

Offline zoli

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: The X-Com Files online Wiki
« Reply #26 on: March 27, 2020, 11:30:35 pm »
I also think its worthwhile to see 20% instead of 0% or 90% instead of 111%.  :)

The main problem is to quickly get a list of target voxels which are in LoF, right? Isn't there a well used method for this problem in 3D graphics? I think there are less than 600 voxels that can be hit in a target tile. Once there is a list of target voxels, calculating probabilities should be quick?

About LOFTEMPS:
https://www.ufopaedia.org/index.php/LOFTEMPS.DAT
Why is the height of a voxel is 2 instead of 1 unit?

Offline TheCurse

  • Colonel
  • ****
  • Posts: 334
    • View Profile
Re: The X-Com Files online Wiki
« Reply #27 on: March 27, 2020, 11:49:23 pm »
well what you´d basically do is create a cone. starts from firing point (spiky end of cone) and goes to target (round end of cone, with angle "maximum angle error"). then you look at the circle you´ve just made (the cone end) from firing position. everything that is target unit voxel in the circle is hit. everything that is anything else (e.g. a tree standing 20m before target, covering like half the circle from your sight) is not. count voxels and the ratio is your hit probability. accurate, fast and technically simple. (if distortion is not linear need to calculate a factor in)
Of course the concept being easy has no correlation to implementation effort...

Offline anothrgamer1234

  • Colonel
  • ****
  • Posts: 124
    • View Profile
Re: The X-Com Files online Wiki
« Reply #28 on: June 02, 2020, 08:15:16 pm »
Is the wiki still being worked on? I noticed it's missing nearly all the new content added in the most recent update.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: The X-Com Files online Wiki
« Reply #29 on: June 02, 2020, 09:53:38 pm »
Is the wiki still being worked on? I noticed it's missing nearly all the new content added in the most recent update.

Generally yes, but since Finnik moved on to working on his own project, we're currently in the transitory state. Which essentially means that I need to start doing this myself, and I haven't gotten around to learning this yet.

If there's interest and skill, I'll gladly push this onto someone else entrust a worthy hero with this noble task. :D