Escort AI tweak
🟡 Updated this yearPreview

🔍 Analysis
- ✅ Updated 70 days after the latest game patch — actively maintained
- 🏆 #489 of 591 Gameplay mods in this game by downloads
📋 About This Mod
Escort AI tweak: Adjustable Escort Range and Docking Control
This mod adds 3 main changes to the fleet escorting ship behaviour.
-
[]Adjustable escort pursue range: Global escort range setting per assignment for player fleets.[/]
[]Setting home ship for docking: If the escorted ship does not have enough docks, the player can set a home ship for escorting fighters where they will fly to and dock when idle.[/]
[]Autodock toggle: Global autodock setting for player fleets. All ships with a dock provide carrier-like autodocking behaviour.[/]
This mod adds the following minor changes to the fleet escorting ship behaviour.
-
[]Carriers use the Attack escort range setting to calculate standoff distance. In vanilla, carriers use 60%~90% of the radar distance. This mod adds a slider to adjust the min range to 50%~90% of the Attack escort range. Max is fixed at 95%.[/]
[]Prevent attack escorts from dispatching if the attack target is outside the escort attack range.[/]
[]Adds mod options to include stations in bombardment target types, with separate settings for small ships and capital ships.[/]
[]If a commander docks at a station, escorts will follow and dock at the station. This is a toggle option in the mod options.[/]
[]This mod cancels 'Dock fail' order after 1 sec, and lets ships continue the default AI path.[/]
[](experimental) Adds mod option to remove resupply destination restrictions. Vanilla resupply logic looks for supply type ship only. This removes the condition, so any ship in the same fleet can be evaluated by the vanilla resupply logic. But the logic itself has not been modified.[/]
Additional notes
-
[]If you are only looking for autodocking, I recommend Reactive Docking. It has better controls and scopes for autodocking.[/]
[]If you use many modded ships (especially weapon ranges, radar ranges), this mod has been developed to handle unexpected behaviours from them. See Why this mod has been created at the bottom for more details.[/]
[]This mod changes many lines in order.fight.escort.xml, focusing on pursuit distance and docking evaluations for home ship; therefore, it will not work with other escort AI mods, including Reactive Docking. Mod conflicts may not be obvious.[/]
[]The function that applies escort ranges and autodock settings finds all ships in the player fleets by iterating through 3 layers of command: Settings will not be applied to ships below these layers, because the iteration is a fixed nested loop with (x,y,z).[/]
How to use this mod
-
[]Automatic home target patch for escort orders run on every game load. This also works as a save game migration function.[/]
[]Whenever you change Autodock or Escort range settings, click [ Refresh escort scripts on all player owned ships ] in the Extension option > Escort AI settings. This is for existing escort orders. New escort orders always use updated logic.[/]
Why this mod has been created
If you are interested in the reasoning behind this, continue reading below.
No additional feature is planned currently, but I am willing to take suggestions.
Adjustable escort range
The vanilla logic of engagement is based on:
pursuedistance = max(this ship's radar range, commander's radar range, 1km)This is ok for the most normal gameplay, but I play a heavily modded game. My ships have increased radar by 200%, and escorting fighters engaged almost every enemy in a sector, so it was quite uncontrollable. I started this mod to solve this problem by making Adjustable escort range, for example, a ship can have a super radar that covers a 200 km range, but escorting ships will only engage within 30km.
Autodock toggle
After implementing Adjustable escort range, I reduced the intercept ranges down to something like 20km for testing, then encountered an unexpected behaviour.
-
[]In a fleet with several ships flying in a formation, the distance between them is too far, a 20km pursuit range creates almost no overlaps. So, fighters basically fight only for their own immediate commanders.[/]
[]In another test, a carrier commander ordered fighters to engage an enemy at 100km away, but the fighters refused, which caused the carrier to keep tracking the enemy with no combat happening.[/]
-
[]Automatic home target patch for escort orders run on every game load. This also works as a save game migration function.[/]
-
[]If you are only looking for autodocking, I recommend Reactive Docking. It has better controls and scopes for autodocking.[/]
-
[]Carriers use the Attack escort range setting to calculate standoff distance. In vanilla, carriers use 60%~90% of the radar distance. This mod adds a slider to adjust the min range to 50%~90% of the Attack escort range. Max is fixed at 95%.[/]
📊 Mod Details
- Game
- X4 Foundations Mods
- Author
- NamelessCosmicDust
- Version
- 009
- Downloads
- 208
- Endorsements
- 3
- Category
- Gameplay
- Created
- 7/21/2026
- Updated
- 8/19/2026
🔧 How to Install X4foundations Mods
Download from Nexus Mods.
📖 Full step-by-step install guide for X4foundations →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for X4foundations commands, item IDs, and more.
Keep browsing — more X4foundations mods await