Lead, Attack, and Break distances by skill level (research)

Issue #267 resolved
Random created an issue

DIRECTIONAL CONES

The attack and breakoff ranges are different depending on the orientation of the target.

If the target is facing directly toward the attacker, there's a wide 130 degree arc (65 degrees both sides) where the attacker will fire at 1.4 km. If the target is facing directly away from the attacker, there's a 90 degree arc where the attacker will fire at 1.0 km. Everything between those is 1.2 km.

So if we look at just one hemisphere, it's 65 degrees front for 1.4 km, 70 degrees side for 1.2 km and 45 degrees away for 1.0 km.

Those ranges were for top ace. Other skill levels below. But the directional cones are important for other things as well.

ATTACK RANGE
(will pull the trigger for cannons)

Dual fire (for quad cannon craft) is always at 0.40 km or less.
Link fire (for all craft) is always at 0.20 km or less.
Dual and link fire distances are the same no matter the target or skill level of the firing craft.

The craft will NOT use dual fire, but WILL use link fire (at appropriate range) in the following two conditions:
- Attacking a target from within the target's rear-facing cone.
- If the loaded warheads can be used against the target (75% throttle mechanic).

Distances in km.  Sides are based on directional cones.
SKILL       FRONT  REAR  SIDE  TOP  BOTTOM
Top ace    1.40   1.00  1.20  1.20  1.20
Ace        1.40   1.00  1.20  1.20  1.20
Veteran    1.10   0.70  0.90  0.90  0.90
Officer    0.80   0.40  0.60  0.60  0.60
Novice     0.80   0.40  0.60  0.60  0.60

BREAKOFF RANGE
(will pull away when too close)
This distance is the same no matter what skill level, but it does vary depending on the target craft.

Distances in km.  Sides are based on directional cones.
CRAFT    FRONT  REAR  SIDE  TOP  BOTTOM
T/F      0.25   0.12  0.12  0.12  0.12   
B-W      0.25   0.12  0.12  0.12  0.12
TRN      0.25   0.12  0.12  0.12  0.12
SHU      0.25   0.12  0.12  0.12  0.12
TUG      0.25   0.12  0.12  0.12  0.12
CON      0.40   0.40  0.20  0.40  0.40
FRT      0.40   0.40  0.20  0.40  0.40
CRV      0.40   0.40  0.20  0.40  0.40
FRG      0.40   0.40  0.20  0.40  0.40
CRS      1.26   1.35  0.79  0.74  0.81
ISD      1.71   1.31  1.02  0.82  0.83

LEAD DISTANCE

The approximate formula to calculate how far to lead ahead is this:

LeadDistanceMeters = TargetMGLT * AISkillMult * rangeMult

rangeMult I haven't quite figured out. This is the best approximation I have so far, since it seems to ramp down slightly at higher ranges.
If range <= 2.0 km, rangeMult = rangeMeter / 500
If range > 2.0 km, rangeMult = rangeMeter / 480
rangeMult is rounded down to the next lowest whole integer, so it will be 0 if the range is under 0.5 km.

AISkillMult is:
TopAce: 1.0
Ace: 0.75
Veteran: 0.5
Officer: 0.25
Novice: 0

Therefore novices (lowest rank) will not lead at all.

So if an ace AI is leading an X-wing at full speed, the lead will always be in steps of 75 meters at each range tier. If at a range of 1800 meters, it will be a multiplier of 3, and the final lead is 225 meters ahead of the target.

rangeMult is weird. There are distinct tiers depending on certain range thresholds. These numbers were hard to gather since they're somewhat inconsistent, even with the AI thinking time removed. I'm also not sure what the maximum tier is.

Distances in km.
A-wing at each skill level versus X-wing
RMULT  TACE  ACE   VET   OFF  
0      0.47  0.44  0.44  0.43
1      1.02  1.02  1.02  1.02
2      1.53  1.52  1.52  1.52
3      2.01  1.97  1.97  1.95
4      2.43  2.43  2.41  2.40
5      2.90  2.86  2.84  2.83
6      3.34  3.32  3.29  3.30

A-wing versus Y-wing
RMULT  TACE  ACE   VET   OFF  
0      0.49  0.49  0.49  0.48
1      1.02  1.02  1.03  1.03
2      1.50  1.50  1.48  1.51
3      1.98  1.98  1.97  1.97
4      2.44  2.43  2.43  2.43
5      2.92  2.90  2.88  2.88
6      3.38  3.37  3.35  3.34

A-wing versus A-wing
Never got close enough for the lower thresholds.
RMULT  TACE  ACE   VET   OFF  
0      0.43  N/A   N/A   N/A
1      0.96  0.96  0.95  0.94
2      1.54  1.54  1.54  1.53
3      2.00  1.97  1.97  1.96
4      2.42  2.43  2.37  2.38
5      2.87  2.85  2.83  2.80
6      3.31  3.29  3.17  3.22
7            3.72  3.66

Notes: all tests were conducted with the AI thinking time removed so the distance thresholds were easily spotted. Their actual movement will vary slightly as they respond to the AI timer of their skill levels.

In the lead distance tests with A-wing vs A-wing, they were moving at the same speed so the chasing A-wing never got close enough to RMULT 0. The top ace A-wing exhibited some weird behavior once it got around the threshold of RMULT 0 and 1. Versus an X-wing, between the ranges of 0.40 and 0.70 km, the A-wing seemed to have a 2/3 or 3/4 lead. Versus an A-wing, between ranges of 0.43 to 0.5, seems to use a 3/4 lead. As if rigid tiers of RMULT were no longer considered in those specific cases. I didn't notice in any other tests.

Comments (1)

  1. Log in to comment