What do distance units mean?



  • In XCOM configuration files, distances are expressed in some obscure units, that do not translate to grid cells easily.

    Example values:

    • unit vision radius: 27
    • most weapons range: 27
    • sniper rifle range: 100
    • soldier (and most enemies) run distance: 12
    • thin man run distance: 15
    • cryssalid run distance: 20

    A soldier definitely does not run 12 grid cells straight.

    So, what are distance units in grid cells, and how distances are calculated diagonally?


  • QA Engineer

    how distances are calculated diagonally?

    They are simply calculated with pythagorian distance equation, rounded.

    In A column and 1 row, I put 1 to 15. Then I put this formula in B2, and copy pasted it down and to the right: =ROUND(SQRT($A2*$A2+B$1*B$1),0)

    straight line travel distance for half move and full move

    A full move is 15 squares and a half-move is 7 squares (15/2, round down). The diagonal half-move is highlighted red - you can move 5 squares diagonally in a half-move, because that square is 7 units distant from the origin of movement. Obstacles and elevation use some of the 15 unit move allowance, as the soldier no longer moves in a straight line (look at the glow trail before moving).


    what are distance units in grid cells

    various unit conversions

    A couple theories are show in the above picture. We can be pretty sure that a config unit is between 90 and 96 fictional units, between 0.625 and 0.667 cells. This might be precise enough to do whatever you want to do with config units. In game with the default ini, the only distance we don't understand is: at what range does a squadspotted sniper rifle shot fail (62-67 cells - approx 4 full moves). All the other distances are verifiable by examination. Embrace the pragmatic - if you want some distance to be longer, increase the value.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2