Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Anubis-class Cruiser (12/20/24)

Author Topic: Unexpected carrier AI behavior  (Read 512 times)

JohnVicres

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Unexpected carrier AI behavior
« on: December 14, 2024, 07:18:26 AM »

Hello!

In a personal mod of mine (wait, don't move the thread to Modding) I'm trying to implement a Midline battlecarrier. It is essentially a sidegrade of the Astrum-class from Everybody Loves the Ko Combine. It's features are: it has one large ballistic and one large synergy, 4 bays and is fast (for a capital) at 50 speed.
Now, it has the "COMBAT" hint, so my expectation was that it'd engage targets alongside its wingcrafts; except it doesn't. Even with only fighters or interceptors, it stays at the edge of engagement range, and all weapons (aside the Gauss cannon and long-range missiles) go unused because of that. I thought the problem was the wingcraft, they're also modded as Gorgon-carrying bombers (so they launch the ordnance at longer range), but mounting them on the Legion didn't alter that one's behavior. It really is the ship's AI deciding it cannot engage in direct combat, even against ships that are outmatched against it (I've been using Dominators as my comparison ruler, they have strong PD and are tanky but can't compete with a capital on their own, so this damnable battlecarrier should be running in and pulverising it, no?).

So I started to think: is it related to the doctrine? Does the Legion have a unique AI? Is it the weapon composition, since the ship's not that well armed?
The hint should be overriding this decision-making of not engaging. If a carrier's set with "COMBAT", it should try to use its weapons, no?

Anyway, I hope there's a solution other than making a new custom AI for it. Or, at least, that I can understand what exactly is the trigger for this behavior so I can circumvent it.
Logged

DeMatt

  • Commander
  • ***
  • Posts: 111
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #1 on: December 14, 2024, 11:23:37 AM »

What other weapons does it have?

You've listed off a Large Ballistic with a Gauss, a Large Synergy with some form of missile, and four bays of fightercraft.  If it's using all of that at (near the) max range of the Gauss, then there's no reason for it to close in further.  Do you have medium (or small) anti-ship weapons?  If you swap out the Gauss with something shorter-ranged, does it close to use the shorter-range weapon?

The AI does say "this is a carrier, it has to spend OP on its fighters that it doesn't get for guns, so it doesn't want to get in a brawl with a gunship if it doesn't have to".  Large Gauss + Large missile (+ nothing else) does not exactly say "can win a gunfight against a Dominator" (2 Large ballistics, 2 Medium ballistics, 3 Medium missiles) to me.
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 1781
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #2 on: December 14, 2024, 12:46:50 PM »

you also need to give it NO_AUTO_ESCORT unless it might spend entire combat attached to some other ship in the combat engagement
Logged

JohnVicres

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #3 on: December 14, 2024, 01:37:14 PM »

What other weapons does it have?
PDs and flak, specifically 8 small PDs and 2 flaks.

You've listed off a Large Ballistic with a Gauss, a Large Synergy with some form of missile, and four bays of fightercraft.  If it's using all of that at (near the) max range of the Gauss, then there's no reason for it to close in further.  Do you have medium (or small) anti-ship weapons?  If you swap out the Gauss with something shorter-ranged, does it close to use the shorter-range weapon?
I listed the Gauss as "the only weapon that is within the goldilock zone that the carrier stays in", which is to say it is the only weapon that the carrier shoots, because of its range. I'd estimate the carrier stays at ~2000su from the target, in a controlled 1v1. So no, nothing with less than 2000 total range is useable because the carrier never closes in. Medium weapons included.

The AI does say "this is a carrier, it has to spend OP on its fighters that it doesn't get for guns, so it doesn't want to get in a brawl with a gunship if it doesn't have to".  Large Gauss + Large missile (+ nothing else) does not exactly say "can win a gunfight against a Dominator" (2 Large ballistics, 2 Medium ballistics, 3 Medium missiles) to me.
That's a problem, because even if it those 2 big mounts are 50 OPs, it still has another 60 OPs in bombers (in the variant I'm testing, there are others and the result is the same). That has to count for engagement decisions if the carrier is set for direct combat, it is the definition of a battlecarrier.

For reference of the main testing variant:
1 Mjolnir, 1 Cyclone, 2 flaks, 6 taclasers, 6 pdbursts, 1 small gazer, 4 modded bomber wings (see below)
The bomber wing:
2 bombers, 2 gorgons each, 15 OPs

you also need to give it NO_AUTO_ESCORT unless it might spend entire combat attached to some other ship in the combat engagement
Already has it.
Logged

eert5rty7u8i9i7u6yrewqdef

  • Admiral
  • *****
  • Posts: 540
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #4 on: December 14, 2024, 02:27:01 PM »

Hello!

In a personal mod of mine (wait, don't move the thread to Modding) I'm trying to implement a Midline battlecarrier. It is essentially a sidegrade of the Astrum-class from Everybody Loves the Ko Combine. It's features are: it has one large ballistic and one large synergy, 4 bays and is fast (for a capital) at 50 speed.
Now, it has the "COMBAT" hint, so my expectation was that it'd engage targets alongside its wingcrafts; except it doesn't. Even with only fighters or interceptors, it stays at the edge of engagement range, and all weapons (aside the Gauss cannon and long-range missiles) go unused because of that. I thought the problem was the wingcraft, they're also modded as Gorgon-carrying bombers (so they launch the ordnance at longer range), but mounting them on the Legion didn't alter that one's behavior. It really is the ship's AI deciding it cannot engage in direct combat, even against ships that are outmatched against it (I've been using Dominators as my comparison ruler, they have strong PD and are tanky but can't compete with a capital on their own, so this damnable battlecarrier should be running in and pulverising it, no?).

So I started to think: is it related to the doctrine? Does the Legion have a unique AI? Is it the weapon composition, since the ship's not that well armed?
The hint should be overriding this decision-making of not engaging. If a carrier's set with "COMBAT", it should try to use its weapons, no?

Anyway, I hope there's a solution other than making a new custom AI for it. Or, at least, that I can understand what exactly is the trigger for this behavior so I can circumvent it.
Does it also have the carrier hint? If no, add it and see if that fixes it. If yes, remove all tags and see if that fixes it. Odyssey is a battlecarrier but has no tags.
Logged

JohnVicres

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #5 on: December 14, 2024, 03:07:25 PM »

Does it also have the carrier hint? If no, add it and see if that fixes it. If yes, remove all tags and see if that fixes it. Odyssey is a battlecarrier but has no tags.
It has "CARRIER, COMBAT, NO_AUTO_ESCORT". Removing them fixes it. What boggles my mind is why the Legion doesn't have this behavior, though it has the same hints!
Logged

eert5rty7u8i9i7u6yrewqdef

  • Admiral
  • *****
  • Posts: 540
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #6 on: December 14, 2024, 04:28:59 PM »

Does it also have the carrier hint? If no, add it and see if that fixes it. If yes, remove all tags and see if that fixes it. Odyssey is a battlecarrier but has no tags.
It has "CARRIER, COMBAT, NO_AUTO_ESCORT". Removing them fixes it. What boggles my mind is why the Legion doesn't have this behavior, though it has the same hints!
Yep, it' a bug then.
Drover also has the carrier and combat tags but behaves more in line with regular carriers. So, the carrier AI is considering factors not explicitly mentioned. It would be weird if it was considering its own armaments vs the enemy, but I can't see any other reason why the Legion doesn't have this behavior.

This is also a good time to have a PSA that the Gemini has no tags, which explains why it's so aggressive.
Logged

Megas

  • Admiral
  • *****
  • Posts: 12526
    • View Profile
Re: Unexpected carrier AI behavior
« Reply #7 on: December 15, 2024, 05:39:30 AM »

In the fleet doctrine screen, Odyssey counts as a warship while Legion counts as a carrier.
Logged