CanRecalcApproachTarget
| Flag: | CanRecalcApproachTarget |
| File(s): | rules(md).ini |
| Values: | Boolean values: yes or no, true or false, 1 or 0 |
| Default: | yes |
| Applicable to: | InfantryTypes, VehicleTypes, AircraftTypes |
Controls whether, while chasing a moving target, the unit may give up its current destination and recalculate its route once the target has moved far enough away.
Notes
It only matters while the unit is in the approach flow, where it is read only when the unit already has both a Destination and a Target; it does not check whether the target is moving or stationary. If the unit is not pursuing, this flag plays no part.
It only applies once the approach flow is running: with CanApproachTarget=false the unit often never enters the approach/pursuit flow in the first place, so this flag has nothing to act on - the two flags sit at different layers: the former: whether to chase at all; this one: whether to recalc during the chase.
- Note that under an Attack mission (including retaliation) CanApproachTarget=false is itself ignored, so the unit still enters the flow there and this flag remains effective.
If the distance from the unit's current Destination to the Target exceeds the weapon's adjusted range budget times the global multiplier ApproachTargetResetMultiplier, the unit drops its Destination and recalculates a route. This "drop and recalc" is one of the main sources of the stutter felt when switching to attack a moving target.
Setting it to false makes the unit keep its current Destination when the target moves, and keep moving along it, adjusting only when close; this noticeably reduces the stutter when chasing a moving target.
It is per-unit, and mission-agnostic only in the sense that it never checks the current mission itself; whether it takes effect depends on whether the unit enters the approach flow in that mission (e.g. it does not during Guard / Area Guard, since a guarding unit that stays put does not actively pursue at all).
Bugs/Side-Effects/Unexpected Limitations
Setting false sacrifices pursuit responsiveness: if the target relocates by a large distance, the unit keeps heading to the old point for a while and looks slow to react, especially when chasing fast units.
It does not distinguish moving targets from stationary ones: false applies the same "keep the old destination" behaviour when shooting at buildings, so you cannot make it "only stop recalculating for moving targets".