Looking for tweaks about fleet engagement rules and attack cap ships command

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Looking for tweaks about fleet engagement rules and attack cap ships command

Post by Kadatherion » Mon, 16. Dec 13, 19:25

I don't use fighters. I like them, but they are a pain to manage, as we all know. Some scripts like ADS or CODEA try to make them a more feasible option when managing fleets, but for my tastes these scripts themselves require a bit too much micromanaging. As such, my fleets are usually composed of only cap ships, and a few, fast M6s take the role of "fighters", homebased at capital ships that allows for them to dock, like the Kyoto.

I really like the idea behind fleet commands in AP, they try to do their (rather simple) job as automatically as possible, but with my fleets composition I keep stumbling on an annoying issue: as the fleet commander tries to assign ships to engage targets of a similar class as their own, a fleet without fighters completely ignores the activity of enemy M3s or smaller crafts.
If you individually order an M2 to defend a sector, it will do just that, engaging even the pesky pirate harrier passing by, if need be; if your order a whole fleet only composed of big ships to defend a sector, it will ignore even a full swarm of small enemies. What's worse, if in the swarm are some dangerous M6s which do qualify as targets, it will only send its own M6s to intercept, the cap ships won't provide support: which, in turn, might end up causing pretty silly losses against vastly inferior enemy forces.


When for various reasons I have instead to rely on the old, individual commands in more varied engagements, I'd like to order the flagship to attack capitals, and the escorts to protect/attack target of, etc, as needed.
In this case the issue is the opposite, the attack capital ships command doesn't seem to really work as I'd wish: the flagship will sometimes follow an harmless M3 even though in the opposite direction there's a capship I'd need to bring down as quickly as possible, as it's either spamming us with missile barrages or endangering a station I need to defend.
Ideally, the attack capitals command should completely ignore targets smaller than an M6: let them come to us, if they wish, flaks will take care of them, and if they don't come who cares, they can wait, they aren't a priority (usually: and if they happen to be, there's the more generic attack all enemies for that, right?).


So, what I'm looking for is a way to change these two behaviours: if somebody already tackled the issue outside of a major modification it would be sweet, but I wouldn't spit on some pointers about how to edit relevant fight logic scripts myself either (if it's within my grasp: I can and do mess a little bit with some easily understandable scripts when everything is already clearly laid out, but I'm no scripter myself).

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV » Mon, 16. Dec 13, 19:54

Doubt you will find a simple way without a good understanding of scripts and how they tick ingame

I completely re-wrote fight logic for RRF pretty much how you ask but the one big issue is once that cap decides to attack something it will not break until attacked by something else, the target dies or docks/leaves sector

This means destroyers can be flying from one said of a sector to the other following its mark it will never catch

feel free to look at the plugin.rrf.fight.~.... and rrf.find.ship scripts for ideas though
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Mon, 16. Dec 13, 20:04

You are talking about substantial changes to the vanilla AI fight commands. It is not impossible to do, although testing under various conditions can be time-consuming. I don't know of standalone scripts that completely address what you want. As LV suggested, you may have to make your own.

That said, DCS2 works with the vanilla fleet commands, and is designed from the start to be much easier to manage than ADS or CODEA. I am still ironing out a few rough edges, but it does the job. Quite effectively. Just turn it on and let DCS2 handle the fighters.

Also, wings make fighter management easier, as does "broadcast to all m3/m4/m5's in sector". Command the fighters to attack fighters, while your larger ships attack capitals.

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Post by Kadatherion » Mon, 16. Dec 13, 21:56

Heh, thought it would be more than I could handle, but you never know, if it happened to be feasible with adding/removing something like a simple IF ---> ship class X THEN ----> ignore, I'd have jumped on it ;)

I'll take a peek into your RRF scripts though, LV, thanks for the input. I might still learn something from it even though I probably won't be able to adapt it elsewhere.

DrBullwinkle wrote: That said, DCS2 works with the vanilla fleet commands, and is designed from the start to be much easier to manage than ADS or CODEA.
Yep, I did give it a try a couple weeks ago, but I was on XRM and it wasn't really compatible back then. Might give it another roll now that I'm on a more vanilla platform, although to tell the truth another reason while I like having fleets made of only bigger ships is performance related: when battles get big (especially in AP where the AI actually knows how to use missiles), adding to the chaos 50 more ships of my own can be the straw that breaks the camel's back.

Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 » Tue, 17. Dec 13, 04:01

@Kadatherion

I wonder if Cronos988 could give you pointers as he modified small/big/huge ship fight behavior with his Advanced Fight Scripts?
I fly an OWP. What about you?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 17. Dec 13, 04:07

DCS2 had a major update a couple of days ago. Reports are that it is fully functioning in XRM now. ADS support seems to be working correctly, as well. Plus some other good stuff.

Good point about too many ships, though.

Tip: DCS2 replaces killed drones during combat (albeit slowly). So you do not need to fill your Raptor with fighters in order to be effective. Set the Maximum Number of Drones low, and let DCS2 maintain replacements. Try 10 or 20 for starters. That will give the Fleet Commands fighters to work with, but will limit the number of those fighters to some reasonable amount.

d_ka
Posts: 254
Joined: Wed, 15. Feb 12, 18:00
x3ap

Post by d_ka » Tue, 17. Dec 13, 06:31

@Kadatherion:
It might not be exactly what you´re looking for, but have you tried Lucikes SRD? ( Security and Resque Service ). Aside the fact, that your ships manned by real pilots, the settings allow them to behave in a pre defined pattern ( patroulling sectors etc. ), and also to work together ( requesting help from their colleges if odds are not in their favour ). To avoid losses they are quite efficiently making use of emergency jump, can rearm and repair themselfs at pre defined home stations etc. Another good thing is that you main carrier ship, which is normaly unpiloted if set as a CODEA main carrier, would be piloted, and follow all the SRD routine as well. As for CODEA, you can always manually ( hit a hotkey ) instruct the accompanying escorts ( like M6 for instance ), to execute a "major attack" on a specific target, without the carrier acting at all, as long as the targets are withing an active carrier perimeter ( which should be no problem with XRM´s military scanners range ).
"Only fools seek power, and only the greatest fools seek it through force".

dizzysoul
Posts: 22
Joined: Wed, 22. Feb 12, 01:34

Post by dizzysoul » Tue, 17. Dec 13, 11:01

I think myself and OP are both looking for the same thing, which is a way to configure "Rules of Engagement" for our own ships. I don't want my carriers chasing scout drones, nor my fighters shooting back at overzealous red transport ships (and getting in trouble with local police).

I tried searching to see if such a mod exists, and I found this: Logain Industries Light Support Drone Carrier (LSDC)

It's appears to be an old carrier management script for specifically protecting FDN modded factories, however this script offers a fully configurable rules of engagement, right down to the quantity and size of each ship class. If this feature could be expanded into a configurable RoE script for any ship, the possibilities are huge. From preventing lone patrol ships from picking the wrong fight, to creating complex fleets where ships have specific roles to play. It would be amazing!

Apparently the script still works in X3AP, The download link for the script is here.

What do people think?
but the one big issue is once that cap decides to attack something it will not break
I understand this is a big problem with how aggression is handled in X3. Someone did find a way to make a retreat script (which I think just spams move commands faster than your ships can ignore them, lol), which gives me hope there's possible solutions for finer RoE and combat control, ugly as they may be. :P

Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 » Tue, 17. Dec 13, 11:16

Once my pick target script works properly again (it doesn't atm, but I am on it), it should do basically that: loop through all enemies in sector and have everyone attack the best target. If the largest target happens to be an M5, even Capitals will attack that M5.

It should be relatively simple to implement a periodic search script on some high task that checks for new enemies in range and orders the ship to change targets once a new target surfaces.

What's harder is getting that check to always behave like you want it to. Ships with protect commands have different priorities from ships with "kill all enemies". Might work if I set some local variables and work with those.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 17. Dec 13, 12:40

dizzysoul wrote:I think myself and OP are both looking for the same thing, which is a way to configure "Rules of Engagement"
Cronos988 wrote:What's harder is getting that check to always behave like you want it to.
There is your answer, dizzysoul.

LSDC is the predecessor to the original DCS v1. It is a very cool-looking script. However, as Cronos suggests, the cool-looking "Rules of Engagement" don't actually work that way. What happens is that LSDC unleashes drones until framerate drops to a crawl, and there is no way to stop it. Once unleashed, the drones pretty much do whatever they want -- that is the way that the vanilla fight scripts work. When the drones run out, the carrier becomes an easy target for the enemies (who are usually very annoyed by that time).

Perhaps, as suggested, there will be a better way to control target priorities someday. That would be nice!

Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 » Tue, 17. Dec 13, 14:11

To elaborate a bit: Getting ships to attack the best target of a given group of enemies isn't easy, but is more a question of lots and lots of testing than of general feasability.

The problem occurs when the situation in the sector changes. It's easy enough to have the search and pick script run periodically on another task and have it change targets once a "better" target enters the arena. Just that isn't what you usually want to happen, because you generally want ships to stick to their targets. You only want them to change in some cirumstances, like when you capital attacks a fighter and another capital suddenly turns up.

You'd also want ships to behave differently based on what they are protecting. At the same time, no matter their task, they should also watch out for their own survival.

For example: If the fighter escort of your M6 sees an enemy M8 enter the sector, they should immediately engage it. But then whatever you had engaged previously will use that opportunity to attack. So the group should split: A bunch of ships keep the old targets busy, while the rest of the group attacks the new threat.

That's a lot of conditions, it could very easily get out of hand.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 17. Dec 13, 14:32

Cronos988 wrote:That's a lot of conditions, it could very easily get out of hand.
Yep. And, as you said earlier, what fighters "should do" and what they "really do" are two different things.

With vanilla X3 fight scripts, when a ship is attacked, it usually turns and fights back. In a furball, the ship under attack may be destroyed before it ever returns back to its original target.

In real life, some ships will always stay on target (even when attacked). It is the job of their wingmen to protect them. Ships that have lost their wingmen may join other wings; possibly resulting in a "leader" becoming a "wingman" for another wing. Or, a defender may try to complete the original mission if his leader is lost. There are too many on-the-fly decisions to be made. If you invested the time to handle every possible scenario, then the scripts may become "heavy" (and slow). As you say, it can rapidly get out of hand.

And all of this effort is for a fighter that has a short life-expectancy anyway.

The vanilla scripts are a compromise. They are simple, but they more or less work. They can certainly be improved, as you, LV, Litcube, and others have demonstrated. But it would be difficult to ever make them as sophisticated as some players might like.

Besides, isn't it more fun for the "admiral" of the fleet (the player) to address changing conditions during battle by re-directing priorities for various assets? In your M8 example, a reserved wing of fast interceptors could be deployed by the player, rather than putting the burden on the script. The game would not be as much fun if *everything* were to be automated.

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Post by Kadatherion » Tue, 17. Dec 13, 18:04

Well, of course sometimes part of the fun is keeping track of the evolving battlefield, issuing new orders as new threats appear. It can be a bit bothersome given the clunky interface we are stuck with, but it's been so many years we are used to it anyway.

Fact is, other times you want to simply jump into the fray in your (relatively small) playership, getting that X-Wing vs Tie Fighter feeling, and be able to trust your fleet to follow the simple orders you have issued at the beginning without further need to babysit them.

The issue with ships getting stuck with that hardcoded behaviour of prioritizing retaliation (over all commands except a jump one) against the last entity who has attacked them is well known: I've sometimes even seen my OK traders falling prey to it (happens when they have not enough jump fuel to escape, and thus they simply try to fly to the nearest SPP: the fly to command gets interrupted and they try to fight back; with them it's a rare happening enough that I did not feel like I needed to bother with Bullwinkle's free jump workaround, but you know the issue is there).
If I remember correctly, someone explained that for instance ADS has to continuously reissue the retreat command to actually get its fighters to abide to a return home command, which is probably what dizzysoul was referring to.

What I've seen happening with the attack capital ships command, though, seems somewhat unrelated: sometimes the ship given that order decides to follow a pesky fighter 20 km away from the get go, well before having been under attack by anyone, even when there'd be more sensible targets in another direction (and I've seen it happening both in vanilla and with Cronos' nice fight logic scripts).
For instance, the other day I decided it was time to do some hurt to the Phanon corp, so that it would reach the last generation and be my main enemy for a while; I jump in a small boat picking at the bombers with missiles, and when these major threats are dealt with I call for my Kyoto and two destroyers to engage the fleet of capitals. I give the Kyoto the attack capitals order, and the two destroyers to attack her target... more often than not, the Kyoto decides her first target should be that far away, harmless mercury superfreighter, when there is a dozen of angry looking M2s running (well, crawling :P ) towards us.

Anyway, I'm also very curious to see how Litcube implemented the fleet planning feature in his upcoming mod. From what I've seen in one of his teaser videos, it does just what we are talking about (although manually, not automatically and dynamically as Cronos is working hard to achieve): among other things, you set which ships should engage which class of enemies, then jump the fleet in and it will (supposedly) act based on the strategy and rules of engagement you had set up.

d_ka wrote:@Kadatherion:
It might not be exactly what you´re looking for, but have you tried Lucikes SRD? ( Security and Resque Service ).
No, not really, I'll look into it. To tell the truth, I thoroughly love Lucike's trade scripts, but when I gave his other scripts like CODEA or the transport network a try I was split between these 2 thoughts:
1 - Holy shit this man is a genius!
2 - But urrr, I don't really want to have to even set how many cigarette breaks my pilots can have during working hours, I'm not playing Theme Hospital. :P

d_ka
Posts: 254
Joined: Wed, 15. Feb 12, 18:00
x3ap

Post by d_ka » Tue, 17. Dec 13, 19:05

No, not really, I'll look into it. To tell the truth, I thoroughly love Lucike's trade scripts, but when I gave his other scripts like CODEA or the transport network a try I was split between these 2 thoughts:
1 - Holy shit this man is a genius!
2 - But urrr, I don't really want to have to even set how many cigarette breaks my pilots can have during working hours, I'm not playing Theme Hospital. Razz
Hehe, i know exactly what you mean :lol:
But, a simple "Attack civilian ships" = No would prevent the ships in your CODEA formation from attacking any hostile civilians, and even in case of friendly fire, the script has a feature to keep the firend/foe settings up, interrupting the attack signal, and resetting them to default.

Once the "code of conduct" is set, there is no need to do it again, and if you don´t want to bother with other settings, well, leave them on default, they are well thought, actually.

There is another Lucikes script, called DOBAG, which concentrates rather on a Destroyer leading ship then on a Carrier fleet formation. It´s not on his official DL page, but can be found on forums ( don´t know if you can understand german, though ).

Just providing you with additional infos, maybe you´ll find it helpfull.
"Only fools seek power, and only the greatest fools seek it through force".

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Wed, 18. Dec 13, 14:49

Kadatherion wrote: Anyway, I'm also very curious to see how Litcube implemented the fleet planning feature in his upcoming mod. From what I've seen in one of his teaser videos, it does just what we are talking about (although manually, not automatically and dynamically as Cronos is working hard to achieve):

Yeah, in MLCC, you do have to set it up once. But once that's set for a ship type, you'll never have to bother with it again. Anytime you jump in your ships (with a hotkey), they'll execute your orders automatically. If you get a new ship type that you want to set rules for, do it from the safety of your home sector before you get into the fray. The only management you'll have to do in battle is hit that jump in hotkey (which uses a jump beacon, if availabe, and jumps the whole MLCC fleet right in front of you in a row waiting for you to hit your go code. IT's neat to watch)

Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 » Wed, 18. Dec 13, 18:55

My scripts would then maybe take over the AI side, to give standard AI ships somewhat intelligent targeting, to give them a fighting chance. They would also provide a base intelligence for more generic duties like patrols.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”