Fractal Softworks Forum

Starsector => Suggestions => Topic started by: TaLaR on September 18, 2019, 10:22:50 PM

Title: AI disables PD too easily
Post by: TaLaR on September 18, 2019, 10:22:50 PM
PD tends to have quite bad flux efficiency, so it often tends to be first on chopping block when AI starts to prioritize what to disable due to rising flux levels.
And it's more often then not wrong in doing so. Usually enemy itself isn't even in PD firing range, so the only thing disabling PD does is allowing missiles through.
Particularly common with IPDAI IR Pulse - yes it's expensive to fire. But still better than eating Sabot or Squall fire.

At the very least there should be an overriding behavior to enable PD if missiles are incoming.
Title: Re: AI disables PD too easily
Post by: Alex on September 19, 2019, 08:50:39 AM
(Just in general, I'd prefer for ship AI-related things not to go in the "Bug Reports" forum. What is and isn't a bug here is usually extremely fuzzy, and aside from that, AI things often need a bunch of discussion, which I'd prefer not to happen in that forum.)

It actually is coded to turn on PD regardless of flux level when there are incoming missiles, btw, though It'd probably do it when they're closer than might be optimal. Giving it a quick try, it seems to be working.

PD should also be one of the last things turned off as flux rises, since that's based on flux costs, and PD tends to low have flux costs, though, yeah, for the IR Pulse, that wouldn't work out.

If you've got an example where this behavior is easy to observe, I'd be happy to take a look!
Title: Re: AI disables PD too easily
Post by: TaLaR on September 19, 2019, 10:19:04 AM
Flux-cheap PD options like PD lasers and LRPD work as you said, being enabled almost always.

But it definitely fails with IPDAI IR pulse:
Spoiler
https://www.youtube.com/watch?v=4HnrJmgE7Ao
[close]
Disabled at about 40% flux and let's Sabots through past that point.

More weirdly, Burst PD lasers suffer from same problem:
Spoiler
https://youtu.be/mQfU35ot7u0
[close]
They aren't even flux expensive to fire...

As result, PD lasers can't stop Sabots due to range, LRPD due to lack of dps and options that should work mechanically fail due to AI.
Title: Re: AI disables PD too easily
Post by: Alex on September 19, 2019, 10:54:55 AM
Hmm. Checked into this a bit more; made a few tweaks. In particular, it'll 1) be willing to autofire PD groups for longer, and 2) will factor in sustained (in addition to burst) flux use for PD weapons when making the decision for whether to turn it on or not.

I think it'll be better overall, but just in general, it's a tricky balance. Like, it's not going to calculate whether it'll just be hitting missiles with the PD or something else, and in the absence of that information, well. Sabots in particular are tough because they ought to be shot from further away, at a point where they're not yet seen as a collision danger.

(Edit: thank you for the examples, btw. Makes it much easier to understand what's going on.)
Title: Re: AI disables PD too easily
Post by: TaLaR on September 19, 2019, 11:13:30 AM
I agree that IPDAI IR pulse is particularly tricky - very expensive to fire and may not always be worth it. Definitely is against Sabots though.

Title: Re: AI disables PD too easily
Post by: Plantissue on September 19, 2019, 02:30:11 PM
I've noticed that sabots sometimes "fire" from a very high distance at times, so perhaps that is a contributing factor?
Title: Re: AI disables PD too easily
Post by: TaLaR on September 19, 2019, 07:11:26 PM
No, I didn't notice any Sabots going 2nd stage at abnormally long range.
Time you have to intercept them does greatly vary depending on your speed relative to sabots though, not backpedaling against Sabots is yet another mistake AI likes to commit (at least when this could get it out of radius or would allow interception).