Author Topic: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP  (Read 4311 times)

0 Members and 1 Guest are viewing this topic.

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Two brief requests. I spoke to The_E to make sure I had clearance to post without annoying people. Obviously these are not for 3.6.12.

1. It would be lovely to get an AI standoff attack mode in which the AI ship would stop at the maximum range of its weapons and engage from there. Trebs, Maxims, what have you. If the target approached it would seek to maintain this distance while turning to make snapshots (maybe there'd be a minimum distance that'd trigger the withdraw behavior.)

2. Could we get a generalized version of cap-waypoint-speed that would simply cap a ship's speed, no matter what behavior they're engaged in? This can be faked on warships by sabotaging the engine system, but it's an ugly hack. This would allow for better warship behavior in tightly FREDded scenarios (something currently impossible until dynamic waypoint movement via set-object-position is implemented.) I understand this could be somewhat difficult and I'll happily take 'no for an answer.

 

Offline Sushi

  • Art Critic
  • 211
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
You do know that other people are allowed to work on AI behaviors, right? :p

I agree that standoff attacks would be interesting, though. And very, very annoying to fight. :) How would you decide which weapon's range to use? For example, if the AI is packing trebs and maxims, how do you determine whether it should try to maintain Treb range or Maxim range?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
You do know that other people are allowed to work on AI behaviors, right? :p

I agree that standoff attacks would be interesting, though. And very, very annoying to fight. :) How would you decide which weapon's range to use? For example, if the AI is packing trebs and maxims, how do you determine whether it should try to maintain Treb range or Maxim range?

hrrrrrrrrrghhh

That's a very tricky question. I feel like ai-primary-standoff and ai-secondary-standoff is horrible, especially as you could have multiple secondaries with different ranges. I think the most elegant solution is just to have the AI use its longest-ranged weapon.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Why not have the sexp specify the range as one of the arguments? Or a list of preferred weapons?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Why not have the sexp specify the range as one of the arguments? Or a list of preferred weapons?

This isn't a SEXP, it's an AI order. But those are interesting suggestions for a related SEXP.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Just make two.
Ai-standoff-primary, and "-"-secondary.
 
You can set priority as needed.
 
 
If you ask the question, "What if an Ursa has a bank of rockeyes and a bank of helios. which will they use?" There's a preferred-secondary-use sexp or similar isn't there?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
What about just an ai-chase-distance sexp (yea I know it's not actually a sexp).  It would be initially implemented via sexp only until wxFRED when the interface can be updated to take the distance field.  Giving this version of the attack order would cause the AI to match speed if behind, attempt strafe, or fall back when the given distance is reached.  Giving a value out of weapon range would just make the AI follow the ship and not attack.   Of course you can get fancy with min and max range and even a logical for switching to ai-chase if out of weapons useable from the range. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
how do you determine whether it should try to maintain Treb range or Maxim range?
Easy answer to this one. AI uses whatever weapon does most damage to the particular target, as it should especially when coupled with $smart primary weapon selection and $smart secondary weapon selection. This is the current behavior with those two flags enabled. Meaning AI will pick whatever weapon does the most damage to currently selected target depending whether it has any shields or not.

For example. If AI fighter is equipped with a weapon that does 50 DPS hull damage and 100 DPS shield damage and a weapon that does 100 DPS hull damage, 25 DPS shield damage and is currently targeting unshielded ship, then it uses the second weapon at 90% of the weapon's maximum range. Why 90%? Because larger value can make it possible for the weapon to miss depending on target's velocity and what the AI is targeting.

Of course, for maximum fredder flexibility you could control this behavior via sexps and this sexp could take weapon preference and range for arguments. I don't see it necessary to create two sexps, just one is enough. Only make this accept either weapon type as argument. You can even make it a list-type argument, the AI will attempt to use the first weapon, then second if first is unavailable, then third if first and second are unavailable and so on. Each listing will need its own distance preference however.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
AI standoff is exactly what I have been thinking about for a while to improve the efficiency of EAF Proteus fighters and other comparable spacecraft. Battuta has pretty much anticipated me at requesting this feature. :)

I would like it to be as much as customizable as possible, without letting the AI take full control of it. If raw damage is the only parameter taken in consideration, as evidenced in the first part of Fury's latest post, additional parameters like armor types, weapon types and effectiveness of the defenders risk compensating the awesomeness of standoff attacks.

I believe a SEXP with the following arguments would do the job:

1 - Ship or wing supposed to employ standoff attacks;
2 - Mininum range;
3 - Maximum range;
4 - Preferred weapon;
5 - "Risk" value;
6+ - Ship(s) or wing(s) to attack;

Before you ask - yeah, it's kind of based on good-secondary-time. :) Please note that 2 and 3 may be used to randomize standoff attacks, or attackers would end up positioning themselves at the very same distance. 5 would indicate how many risks the attackers are willing to take to employ standoff attacks, and may work by simply overriding the default courage value of the attackers' AI class.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Cut #5 and I generally like it.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Why? I think 5 is pretty useful if a FREDder wants standoff attackers to defend themselves instead of playing the role of sitting ducks. Would you sacrifice an entire wing of valuable attackers for, let's say, a single freighter?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
What you just said has absolutely no bearing on how this AI order should work. Dynamic goals will allow AI ships to defend themselves just as they do with other orders like ai-chase.

  

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Yeah this would be very cool.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Mobius: You do know that "Courage" isn't used anywhere in the AI Code, right?
EDIT: Okay, it's used in two places. A ship with high courage has a greater probability of attacking turrets on a big ship, and a higher chance of staying on target during dogfighting.

Also, this is probably easier to code in using the standard ai order system, and letting the AI figure out what weapons to use by itself.
« Last Edit: August 04, 2010, 05:27:19 pm by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
What you just said has absolutely no bearing on how this AI order should work. Dynamic goals will allow AI ships to defend themselves just as they do with other orders like ai-chase.

But with dynamic goals you wouldn't have full control of AI behavior. Imagine to do the following in an escort mission:

12 heavy fighters jump in at safe distance and commence a standoff attack with long range missiles and primaries. The player, ordered to eliminate these threats, doesn't know that each one of them has a different "courage" value. The player gets closer, and 2 heavy fighters abort their strike to target the player and his attending wings. They get even closer, and more enemy fighters abort their attack to defend themselves. At some point, you may have 10 fighters trying to repel the player while the remaining 2 continue their attack.

This is just an example of customization that may be possible to see ingame with that SEXP. Realistic and almost certainly cool, I believe.

EDIT: The E, maybe not exactly the same as Courage but supposed to work pretty much like Courage would.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
All of that can be done using existing FRED features. An additional argument to an already complex AI order is not required.

Furthermore the method you're suggesting, modifying courage, is not a great one because courage is barely called at all in the AI code (yep, The_E apparently confirms this.)

Don't overcomplicate things that can already be done. I want an AI order here, not a good-secondary-time analogue.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
I would still maintain that using the current ai order system, in combination with the "courage" value and maybe a clever use of weapons.tbl flags would be preferable to using a sexp.
I mean, the good thing about the fact that courage is barely used is that we can easily add another use for it.

You may not be aware of this, but orders are processed quite a bit differently than sexps. Mixing the two, while not necessarily difficult, would also introduce a bit of complexity I, for one, would want to avoid.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
What I'm asking for here is an ai order like ai-chase. Not a SEXP like good-secondary-time. I should've clarified that.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Yes I just suggested implementing via add-goal sexp first as the current gui doesn't have the fields required for the option. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Feature request: ai standoff attack (Sushi take heed?) and cap-speed SEXP
Yes I just suggested implementing via add-goal sexp first as the current gui doesn't have the fields required for the option. 

Exactly my thought.