---------------------------------------------------------------------------
---------------------------------------------------------------------------
The file tevent.txt, which itself seems to be triggered by the F11 cheat, contains tactical detail about every shot fired during tactical combat. It also lists a "Hit Probability" for each shot.
The formula for the hit probability turned out to be very simple:
[Hit Probability in percent] = ATK - DEF - ( 0.01 * [distance between attacker and target] )
(rounded to a whole percent number, rounding is exact, not simple cutting)
with
ATK: beam accuracy (also called "attack level") of attacker (including crew experience bonus)
DEF: defense level of target (including crew experience bonus)
If the result is smaller than 0.0%, then it's set to 0.0%.
The result can be greater than 100.0%, which is unusual for a "probability".
Although the "Hit Probability" is always rounded to a whole number, it's displayed with one decimal place, like "74.0%" or "82.0%" or "206.0%".
However, the actual chance to hit the target doesn't seem the same as the "Hit Probability", although the name would imply this. What I've observed so far:
- Shots with a Hit Prob. of more than 100% sometimes missed, but only if the target was outside of the maximum beam weapon range.
- On the other hand, shots at targets beyond the maximum beam weapon range sometimes hit.
- Generally quite a lot of shots with a Hit Prob. close to 100% still miss, maybe it has something to do with the maximum beam weapon range.
- Shots with a Hit Prob. of 0.0% never hit.
- The actual damage seems to depend on the Hit Probability, at least to some extent.
- The actual damage sometimes varies in identical situations (random value involved?).
- A beam that hits never does 0 damage. Maybe some (or all) misses in tevent.txt are just hits that do 0 damage.
- It's likely that the "Evade" command also has some influence.