[HELP] How to deprioritize launching defense drones?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

runekn
Posts: 116
Joined: Sun, 21. Mar 21, 19:24
x4

[HELP] How to deprioritize launching defense drones?

Post by runekn »

Hello forum

I'm making a mod that changes the docking behavior of subordinates of non-carriers, to be the same as that of carriers. In vanilla, 'launched' only makes subordinates dock when not needed if the commander shiptype == 'carrier', which has annoyed me. Through some simple changes to order.fight.scort.xml I've made this change. However I'm noticing the issue of commander ships with defense drones will prioritize launching drones over subordinates, even if the subordinate is on the pad and ready to takeoff.

So basically the desired behavior if both drones and subordinate on pad are triggered:
1. Launch subordinate on pad
2. Launch defense drone

Actual behavior:
1. Stow subordinate
2. Launch defense drone
3. Launch subordinate

This makes launching ships take longer than necessary due to having to first stow the subordinate. I cannot find this behavior script for defense drones. Does anyone know how to make this change?
j.harshaw
EGOSOFT
EGOSOFT
Posts: 2170
Joined: Mon, 23. Nov 15, 18:02

Re: [HELP] How to deprioritize launching defense drones?

Post by j.harshaw »

runekn wrote: Mon, 12. Apr 21, 11:19 I cannot find this behavior script for defense drones.
defencenpc scripts: fight.attack.object.capital, fight.attack.object.medium, and fight.attack.object.station. look for launch_drone.
runekn
Posts: 116
Joined: Sun, 21. Mar 21, 19:24
x4

Re: [HELP] How to deprioritize launching defense drones?

Post by runekn »

j.harshaw wrote: Tue, 13. Apr 21, 00:40
runekn wrote: Mon, 12. Apr 21, 11:19 I cannot find this behavior script for defense drones.
defencenpc scripts: fight.attack.object.capital, fight.attack.object.medium, and fight.attack.object.station. look for launch_drone.
Thanks. I'm playing around with these, but I'm not having much success. Also, what conditions are required for these scripts to rerun init?
Also noticed that even if I disable drones completely, launching still involves stowing current ship as first step. So I also wanna ask whether controls landing pads makes any priority for ships current on the pad?

Return to “X4: Foundations - Scripts and Modding”