X4: Foundations

X4: Foundations

209 ratings
Reactive Docking
3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
11.568 MB
20 Apr, 2021 @ 11:17am
31 Mar @ 12:35pm
15 Change Notes ( view )

Subscribe to download
Reactive Docking

Description
Description
In vanilla X4: Foundations subordinates assigned to a carrier with the 'Launched' option will remain docked until something relevant to their standing order happens.
For example if the leader is attacked then groups with 'defend' will launch to defend.
Most other subordinate groups just have the options to always be launched, always docked, or no dockiong options at all. The overall intend with this mod is to expand this carrier 'reactive' docking behaviour to more ship types.

READ: You may need to disable UI Protection mode ("Settings" -> "Extensions" -> "Protected UI Mode") before you can see the extension settings.

3.0 Update Info!
In prior version of Reactive Docking, the "Reactive" option selection was tied to the commander pilot. This lead to problems where taking over manual control of a ship, or changing pilot, would reset or otherwise change the docking behaviour.
For 3.0 I wanted to fix this by switching where I store the selected docking behaviour to a place such that it could now be tied to the ship, rather than the pilot. 3.0 includes some migration code which will migrate the selected docking options to the new storage and delete the old.
This means that loading a save that has used 3.0 of Reactive Docking with an earlier version, will result in a full or partial reset of reactive docking options.

Docking behaviour options

You can change the default option for any of these cases in the Extension Options (requires SirNuke's Mod Support API). **It is recommended this is only done once at the start of the game, as changing the default options will flip all reactive/launched docking options**.

Non-carrier escort wing
Example: Fighter assigned to intercepting for Colossus XL carrier.

1. Docked: Same behaviour as vanilla. Subordinates will remain docked.
2. Launched (default): Same as vanilla. Subordinates will remain launched, and only dock if leader wants to travel far distances.
3. Reactive (added): Subordinates will dock, but launch if something happens that is relevant to their standing order.

Carrier escort wing
Example: Fighter assigned to attacking with Behemoth L destroyer.

1. Docked: Same behaviour as vanilla. Subordinates will remain docked.
2. Launched (added): Subordinates will remain launched, and only dock if leader wants to travel far distances.
3. Reactive (default): Same as vanilla launched. Subordinates will dock, but launch if something happens that is relevant to their standing order.

Station defence wing
Example: Fighter assigned to defence of player HQ station.

1. Docked (added): Subordinates will remain docked.
2. Launched (default): Same as vanilla. Subordinates will patrol around the station in a random pattern, and engage any enemy entering the zone of control.
3. Reactive (added): When no enemies are detected, ships will move towards available docking pads while keeping a lookout. If within 8km of docking pads they will initiate dock. Will launch and attack if enemies enter the zone of control.

Auxiliary trader
Example: Courier Vanguard assigned to trade for Nomad.

1. Docked: Option not available.
2. Launched (default): Same as vanilla. Ships will look for trades for the auxiliary ship, and launch as soon as it has completed a trade.
3. Reactive (added): Trader will dock at auxiliary if it has found no valid trades for some time. Will remain docked to auxiliary after completing trade, until it has found another.

Requirements

* (OPTIONAL) SirNuke's Mod Support API Steam | Nexus[www.nexusmods.com] - Required for changing default docking options, but otherwise not needed. Will require UI Protection mode be disabled.
* (OPTIONAL) Kuertee's's UI Extension and HUD version >= 2.0.6 Nexus[www.nexusmods.com] - Increase compatibility with other UI mods.

Compatibility

This mod is save compatible. You can add it to an existing save, and remove it without errors. If removed then groups with the 'Reactive' option enabled will simply change to 'Launched'.

This mod achieves compatibility with other UI mods through the UI Extension and HUD mod.
To work with Subsystem Targeting Orders you need to install Kuertee's's UI Extension and HUD which can only be found on Nexusmods (see above for link).

FAQ

1. When I have ships in storage, and one on the pad, and all are to launch why does the ship currently on the pad not launch first, rather than stow only to launch after another has?
- As far as I can tell this is vanilla behavior for the game. So I dunno what I could do about it. The game doesn't seem to make any priority for ships already on a pad if both it and one in storage needs to launch.

2. When they return to dock on my leader with one pad, only 1 ship docks and the rest just cancel their docking?
- Again, seems to be vanilla behavior. They get cancelled because the pad is occupied. Why they don't just queue up to dock I don't know atm.

3. I wanna fix your ♥♥♥♥♥♥ code
- You are very welcome to make requests to the github[github.com].

4. My auxiliary trader is not docking after switching to Reactive
- Reactive mode for auxiliary traders will not dock until it has failed to find valid trades for some time.

Thanks to

* Allectus for making another mod that does somewhat the same things, so that I could easily see how to achieve what I wanted despite this being my first mod :P
* Forleyor for making the integration with UI Extension and HUD
117 Comments
AtaKosh 2 May @ 10:53pm 
This Mod should be vanilla. Dockingbays other than on carriers are so obsolete for fleets. Thanks for the work!
Stroichik 23 Apr @ 2:50am 
tried launching wings with leaders from ISD, half launched ok, but quite slowly. several wings (about 30%) didn't launch at all. Probably some vanilla scripts problem. I suppose i have to forget idea of having fighter wings for now.
Stroichik 21 Apr @ 7:36am 
Update: i think that behaviour happens when i load full fighter capacity on a ship and then try to launch them. for example - i got 24 S storage capacity + 5 landing pads. so i have 24 fighters on a ship all docked.
Stroichik 21 Apr @ 7:05am 
Hello. thanks for great mod. I wanted to ask a thing about docking with subordinates. I`m playing SWI and i want to make cinematic fighter wings. They do work if i assign 4 fighters to a squadron leader fighter and make them fly in V formation. With this mod those fighter wings dock nice, after their squad leaders dock. However, when i try to launch those fighter squadrons only those that are not in internal storage are launched. Maybe because their squad leaders were first to land and are inside internal storage.

I know that this kind of setup is not intended by Egosoft or you. But is it possible to do something about it, and make those fighter squadrons launch properly when i switch to "Launched" state?
Runekn  [author] 10 Apr @ 10:10am 
@Virkful Not really intended. Mostly just consequence of vanilla code for carriers. Not sure I want to fix it though since fighters can easily get stuck on the XL while trying to dock with M that is itself docked on XL.
Virkful 10 Apr @ 3:41am 
Not sure if it's intended or not, all ships are docked at the commander instead of their group leader.
For example, I have a XL ship as commander, and a medium frigate in XL's group, and a small fighter in medium frigate's group.
Suppose M is docked at XL and S docked at M, but no, both M and S are docked at XL.
Runekn  [author] 5 Apr @ 12:38am 
I'm talking about the Extension settings, which is added by SirNuke API mod. Without SirNuke API Mod Reactive Docking will still work, but you just can't change the settings since the menu item is gone.
Konaan 4 Apr @ 9:24pm 
@Runekn, let me get clarification. By change default settings, what did you mean by that? What settings?

I loved how I could set destroyer to reactive (and carriers for that matter). I know there are some settings in the extension settings that I played with a little.

If you can clarify your statement a little more, I would love to reinstall the mod.
Cinnebula 4 Apr @ 9:42am 
@Konaan https://www.nexusmods.com/x4foundations/mods/552?tab=files&file_id=3153 Kuertee's UI extensions and HUD fixed the issue i had

@Runekn in my experience, say I was in Hatikvah's Choice I, and a xenon SE passed by on the highway, appearing in range for about 4 seconds. my fighter escorts would undock, and by the time they undocked, the SE on the highway would be long gone. they would promptly redock, since there are no longer any targets in range
Runekn  [author] 3 Apr @ 10:56pm 
@Konaan SirNuke API was actually no longer a requirement. Only needed if you want to change the default settings. I had forgotten to remove it from steam requirement list, but did just now.

@Cinnebula Reactive ships should actually ignore highway targets. Are they not?