Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: New Weapon A.I Hint  (Read 4431 times)

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
New Weapon A.I Hint
« on: February 23, 2014, 10:43:16 AM »

I am not really sure if this has been implemented and I just missed it, but I think it would be a really good idea to add an A.I hint:

"no_fighter"

so that certain weapons will not fire at fighters with their automated fire control.

For some weapons, especially in mods, it just doesn't make sense that they do and becomes a huge drain on flux. You could always switch to "local control" and snipe them yourself if you want  :)

I know making it a "strike" weapon works... but it unfortunately changes the A.I in other undesirable ways. Not attacking frigates and sometimes not firing until the ship is overloaded for example.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: New Weapon A.I Hint
« Reply #1 on: February 23, 2014, 11:06:03 AM »

How about STRIKE, USE_VS_FRIGATES? That's what the stock AM Blaster uses.

... sometimes not firing until the ship is overloaded for example.

I don't think that happens. At least, if you turn the AM blaster on autofire, it'll be happy to fire at anything that's not a fighter.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: New Weapon A.I Hint
« Reply #2 on: February 23, 2014, 11:14:27 AM »

How about STRIKE, USE_VS_FRIGATES? That's what the stock AM Blaster uses.

... sometimes not firing until the ship is overloaded for example.

I don't think that happens. At least, if you turn the AM blaster on autofire, it'll be happy to fire at anything that's not a fighter.

Well, I have tried this and for whatever reason the weapons don't always shoot when in range of a ship that qualifies. It tends to use the weapons more like reapers and less like the AM blaster. I am honestly not sure why. Keep in mind I am referring to A.I controlled ships not just my personal ship set to autofire.

I will try it again. Maybe I missed something. Wouldn't be the first time  :D
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: New Weapon A.I Hint
« Reply #3 on: February 23, 2014, 11:17:27 AM »

The ship AI does some odd things with Strike weapons in general; it's trying to be conservative with them and use them carefully, but it often ends up not firing at all. 

I think that it's trying to wait for the target to Vent or for certain other conditions to be met, but in the process it's often outsmarting itself and ends up contributing far less DPS than if it was taking more risks.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: New Weapon A.I Hint
« Reply #4 on: February 23, 2014, 11:27:31 AM »

The ship AI does some odd things with Strike weapons in general; it's trying to be conservative with them and use them carefully, but it often ends up not firing at all. 

I think that it's trying to wait for the target to Vent or for certain other conditions to be met, but in the process it's often outsmarting itself and ends up contributing far less DPS than if it was taking more risks.

That's true for missile weapons, I can't say I observed it with AM blasters. They are often hindered from firing by a high flux level, though. One thing I noticed is that heavily damaged ships only panic-fire with Salamanders, never with Harpoons or torpedoes, so those are often wasted as the ship is destroyed.
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: New Weapon A.I Hint
« Reply #5 on: February 23, 2014, 12:26:03 PM »

With AM Blasters, it frequently doesn't get into range to use them, though; this is more of an issue if the ship has ITU+ range boosts.

I agree also that it should Vent while backing, then plow in with the AMB, like a player would. 

It's a problem that's real, real specific to that weapon though, because of its range, Flux use and slow RoF; using AMB's well is tricky for an AI without pretty much writing a specific mode just for that weapon being mounted, at least on Frigates and Destroyers.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: New Weapon A.I Hint
« Reply #6 on: February 23, 2014, 12:36:39 PM »

Hrrm, well I tried it again and it seemed to work fine.  ;D

It could be the "use_vs_frigates" that is key there. I am not sure if I had that on the heavier weapons before or not.

I will keep my eyes open for situations where it doesn't seem to work right.

Solved with reservations!

Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: New Weapon A.I Hint
« Reply #7 on: February 26, 2014, 11:32:47 PM »

Hrrm, well I tried it again and it seemed to work fine.  ;D

It could be the "use_vs_frigates" that is key there. I am not sure if I had that on the heavier weapons before or not.

I will keep my eyes open for situations where it doesn't seem to work right.

Solved with reservations!



Ahh now I see!

After further exploration I remember now why I don't like that A.I hint.

The A.I for NPC ships will never put a group with that weapon hint on autofire. It seems like a small thing but it has a couple major drawbacks. The first is that if you change your heavier weapons to this A.I hint so they do not waste ammo or flux on fighters, they can only fire one group of weapons at a single target at a time. If you have more than two groups of weapons in this category, one group is almost always just ignored.

So ships with both heavy turrets and heavy hardpoints will never actually fire the hardpoints and the turrets at the same time. Even if the ship has multiple turrets with different arcs, the ship will only ever fire those weapons at a single target instead of the multi-targeting that normal weapons can achieve through the use of autofire.

Also if weapons have slow turning rates, the A.I tends to miss quite a bit since it starts firing manually at a target even if the turrets are not directly pointed at it yet.. as long as at least one weapon can achieve a hit.

I assume the purpose of handling the hint like this is to conserve ammo on the AM blaster, but standard assault and heavy weapons do not cope well with this A.I hint


Soo.. I maintain my suggestion  :P

We really could use an A.I hint that just makes weapons ignore fighters and otherwise act just like a normal weapon. Either that or change the "STRIKE, USE_VS_FRIGATES" hint to use autofire when appropriate. Seems like the first would be easier though.
Logged

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
Re: New Weapon A.I Hint
« Reply #8 on: March 03, 2014, 01:34:52 AM »

Not to derail the topic, but what does USE_VS_FRIGATES even mean? Does it prioritize only just frigates, or does it target other classes as well?
Logged

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: New Weapon A.I Hint
« Reply #9 on: March 03, 2014, 03:27:34 AM »

STRIKE hint forces AI to ignore fighters AND frigates when firing that weapon. USE_VS_FRIGATES allows the STRIKE weapon to be used against frigates.

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: New Weapon A.I Hint
« Reply #10 on: March 03, 2014, 09:00:58 PM »

STRIKE hint forces AI to ignore fighters AND frigates when firing that weapon. USE_VS_FRIGATES allows the STRIKE weapon to be used against frigates.

It also means that a "strike" order given during battle will include said ship if it has a weapon with this hint.

I am actually not sure if frigates can be targeted for a "strike" however if the hint includes USE_VS_FRIGATES. My guess is probably not.
Logged