[MOD] Assign ships to station with custom behaviour

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

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

Post Reply
Silencer_2021
Posts: 7
Joined: Mon, 26. Apr 21, 23:11
x4

[MOD] Assign ships to station with custom behaviour

Post by Silencer_2021 » Fri, 7. May 21, 10:57

I create MOD for this feature, you can try it if you want: https://github.com/Silencer/X4_assign_to_station
It's my first mod, there only little changes, don't use any XML diffs, so it's save compatible, ship will just change it's owner, ship behavior will be keep. You can add multiple ships and unassign them any time from station (behavior will be lost in case of unassignment - switched to HOLD POSITION)
You can assign fleet to station too, leader and their subordinates will keep their behavior, for example if you have miner fleet where subordinates mimic leader

Code: Select all

I think it's a good idea to allow assign ships to station with custom behavior, station manager is not do that stuff good, I will provide some example what this feature can resolve:

1) Miners - miners try to gather resources in different sectors, when I already have rich enough sector with all requires resources, to fix this - I create mining fleet with sector mine job and set individual rule to sell only to my own station in this sector
This problem it's a management of such fleets, for example to mine in one sector 5 different resources I need to create 5 different fleets and in later games the number of fleets expand and it's require a lot of activity to monitor them, instead of just open concrete station in sector and see all ships assigned to this station

2) Patrol fleets - I have a lot of patrol fleets in different sectors, which can use different jobs, from different mods like: reaction force, sector patrol or maybe custom attack in range + repeat variant. It's again in later game force me to create a lot of fleets.

3) Traders - I use MOD Extended Mule and Warehouses and it already somehow do this, when you assign any mule to station it keep selected behavior, so on this part it's already implemented, but anyway why don't assign ship with vanilla custom trade rule to specific station.

What do you think about that?  maybe you have more convenient ways to manage you sectors and ship in them, thank you in advance for you reply.
KNOWN ISSUES
Miners and Traders not work as expected, only military ships or ships with another than trade/mine order (like inventory collector for example) keep they custom behavior
Last edited by Silencer_2021 on Mon, 10. May 21, 08:25, edited 4 times in total.

daBeschi
Posts: 76
Joined: Mon, 28. Jan 19, 14:04
x4

Re: [REQEUST] Assign ships to station with custom behaviour

Post by daBeschi » Fri, 7. May 21, 18:33

Hello,

I support your request. Long ago in X3 I used to have my universe trader assigned to my HQ so that they do not use the player account and so on. Assigning sector patrol ships to stations is also high on my wishlist.
But the same should be possible for fleets. For example you have a couple of independent sector patrols, operating in different sectors, listed as one fleet to remove clutter in the overview.

Greetings

Silencer_2021
Posts: 7
Joined: Mon, 26. Apr 21, 23:11
x4

Re: [REQEUST] Assign ships to station with custom behaviour

Post by Silencer_2021 » Sun, 9. May 21, 23:45

I create MOD for this feature, you can try it if you want: https://github.com/Silencer/X4_assign_to_station
It's my first mod, there only little changes, don't use any XML diffs, so it's save compatible, ship will just change it's owner, ship behavior will be keep. You can add multiple ships and unassign them any time from station (behavior will be lost in case of unassignment - switched to HOLD POSITION)
You can assign fleet to station too, leader and their subordinates will keep their behavior, for example if you have miner fleet where subordinates mimic leader

daBeschi
Posts: 76
Joined: Mon, 28. Jan 19, 14:04
x4

Re: [MOD] Assign ships to station with custom behaviour

Post by daBeschi » Mon, 10. May 21, 08:52

Hello,

Sounds promising! I will give it a try later this day.

Greetings

Post Reply

Return to “X4: Foundations - Scripts and Modding”