[QUESTION] Modding Carrier Subordinate Behavior

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

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

CloneSargaent
Posts: 69
Joined: Wed, 16. Jul 14, 19:27
x4

[QUESTION] Modding Carrier Subordinate Behavior

Post by CloneSargaent »

Is it possible to add more subordinate roles like a bomber role? Like intercept but for targeting capital ships instead of fighters.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [QUESTION] Modding Carrier Subordinate Behavior

Post by BlackRain »

CloneSargaent wrote: Tue, 25. May 21, 05:03 Is it possible to add more subordinate roles like a bomber role? Like intercept but for targeting capital ships instead of fighters.
Sure, just make a script which codes what exactly you want the ship to do. You can add it to the UI too and it will use the script you designed.
proximiy
Posts: 1
Joined: Wed, 26. May 21, 06:20
x4

Re: [QUESTION] Modding Carrier Subordinate Behavior

Post by proximiy »

I'm also interested in doing this. Let's say I have an aiscript that I want the subordinate the follow. How do I add an option into the subordinate role selection to assign the default order to all ship in that group as well as group them together into a separate wing? I assume this will involve using an md script but I have no idea where to start. I tried to look through existing mods for example but didn't have any success. Maybe you can point to a mod that had customized the subordinate role selection so we can see how it's done. Or maybe the file(s) in the base game that govern subordinate roles.

Thank you much

[edit]
I found assignments.xml in libraries/ that seems to define assignments.
lib.request.orders.xml and order.assign.commander.xml in aiscripts/ that can create orders based on which type of assignments a ship is assigned to.
what I still need help finding is where does it define which which assignments a commander can have. I looked in the ship-specific macros but didn't see any thing related.
[edit]
CloneSargaent
Posts: 69
Joined: Wed, 16. Jul 14, 19:27
x4

Re: [QUESTION] Modding Carrier Subordinate Behavior

Post by CloneSargaent »

proximiy wrote: Tue, 1. Jun 21, 02:08 I'm also interested in doing this. Let's say I have an aiscript that I want the subordinate the follow. How do I add an option into the subordinate role selection to assign the default order to all ship in that group as well as group them together into a separate wing? I assume this will involve using an md script but I have no idea where to start. I tried to look through existing mods for example but didn't have any success. Maybe you can point to a mod that had customized the subordinate role selection so we can see how it's done. Or maybe the file(s) in the base game that govern subordinate roles.

Thank you much

[edit]
I found assignments.xml in libraries/ that seems to define assignments.
lib.request.orders.xml and order.assign.commander.xml in aiscripts/ that can create orders based on which type of assignments a ship is assigned to.
what I still need help finding is where does it define which which assignments a commander can have. I looked in the ship-specific macros but didn't see any thing related.
[edit]
It's in ui -> addons -> ego_interactmenu -> menu_interactmenu.lua. Lines 3190-3222
I also found what limits interception's targets: order.fight.escort.xml -> Line 192

Return to “X4: Foundations - Scripts and Modding”