Author Topic: ai-chase-any-except  (Read 5857 times)

0 Members and 1 Guest are viewing this topic.

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Was this sexp removed in some recent FSO version? I have a few missions that use this and which work okay with builds from the last month, but the current 2/20 FSO and FRED2 builds don't seem to recognize it at all and give errors when loading any mission with it. Although I'm not sure if it even works as it should in the builds that support it.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Well, what do 'ya know... its not there anymore.  Just checked under 2006/02/20, and that ai command isn't in the list.  What gives?
The Trivial Psychic Strikes Again!

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I removed it. :nervous: I realized when fixing the ignore-target bug that ai-chase-any-except only works superficially; i.e. the AI can still chase ships on the exception list in several circumstances.  The new ignore code does a much better job.  Just replace ai-chase-any-except with an ai-ignore-new followed by a conventional ai-chase-any, and you should be good to go.

All the missions that used this are still in development, right?  I knew this would create a few problems but I want to make sure the changeover can happen smoothly.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
I figured that it would be something like that (assuming that it wasn't removed by accident).  While on the topic of AI ignoring orders, here's one for you.  I encountered this while testing out bugs with multi-dock and wings (you may want to check that bugreport BTW).  I had the fighters (not winged) docked to a cap-ship and gave them "none" for their AI class, and ai-play-dead 89 orders.  When I shoot at them with primaries and anti-fighter missiles, they sit there and take it.  On the other hand, when I shot an anti-cap secondary at one of them, they suddenly start to maneuver around and shooting at me, taking their cap-ship with them.  Furthermore, the stress of these fighters all trying to pull their mothership this way and that way all at the same time, caused 4 of the 6 fighters to break off and blow up.  Anyway, what kind of AI bug would cause ships to suddenly develop a brain... or AI in this case?  I could use the "no dynamic goals" checkbox, but if I want the ships to undock and fight later in the mission, I have no way of restoring dynamic goals for them.  The only solution I can see is th break engines and weapons on any fighter in a situation like this, then restore them later when I want them to fight.
The Trivial Psychic Strikes Again!

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Yeah, your Mantis description about that was pretty funny. :D

Honestly, I don't know.  I'm guessing it's a retail problem that was only revealed now that docking fighters is commonplace.  Usually if a fighter is docked with something in FS1 or FS2 it's disabled (c.f. Enter the Dragon).  Try your mission in retail, with just one fighter docked, and see what it does.

Probably the best thing to do would be to disable ship AI for all docked ships except dock leaders.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Probably the best thing to do would be to disable ship AI for all docked ships except dock leaders.
Um, I did disable the ship AI.  Under "ship AI class" in the ships editor, I selected "none".
The Trivial Psychic Strikes Again!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
I removed it. :nervous: I realized when fixing the ignore-target bug that ai-chase-any-except only works superficially; i.e. the AI can still chase ships on the exception list in several circumstances. The new ignore code does a much better job. Just replace ai-chase-any-except with an ai-ignore-new followed by a conventional ai-chase-any, and you should be good to go.

All the missions that used this are still in development, right? I knew this would create a few problems but I want to make sure the changeover can happen smoothly.

It should be fine; it's just that I'll need to playtest some bits of those missions again. Whatever ai-chase-any-except does, it seems to work out in these missions. :D

Although I guess it means I'll finally have to ditch the 9/17 build and environmental mapping for good (all November and later FRED2 builds save in a format that this build can't read and only the latest FRED2 versions support this new ignore command). I suppose I had to catch up with the times at some point. It's a good thing the 2/20 build is generally very good aside from that minor bug with the mission loading screens.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Probably the best thing to do would be to disable ship AI for all docked ships except dock leaders.
Um, I did disable the ship AI.  Under "ship AI class" in the ships editor, I selected "none".

I mean disable it in the code.  "None" in FRED doesn't mean the AI does nothing; it still carries out its default actions.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Ah!
*understands*
The Trivial Psychic Strikes Again!

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
I removed it. :nervous: I realized when fixing the ignore-target bug that ai-chase-any-except only works superficially; i.e. the AI can still chase ships on the exception list in several circumstances.  The new ignore code does a much better job.  Just replace ai-chase-any-except with an ai-ignore-new followed by a conventional ai-chase-any, and you should be good to go.

You should have called it "at-ignore-no-seriously". Good idea though removing chase except and replacing it with two seperate ai goals. Makes much more sense.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
I'm updating my missions with this sexp. If I use multiple ai-ignore-new commands, will the AI ignore all the ships or does each ignore goal override the previous one?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
While we're asking how do you cancel an ai-ignore order? Will giving an explicit attack order work? Or do you have to clear goals?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
You should have called it "at-ignore-no-seriously".

That's actually more suited for the retail version.  "Seriously, I want you to ignore this ship, and I want you to ignore it so hard that you mentally force everyone else to ignore it too." :D

If I use multiple ai-ignore-new commands, will the AI ignore all the ships or does each ignore goal override the previous one?

They're cumulative; the AI ignores every ship you tell it to.  It has a limit though... if you issue more than seven ignore-new goals, it will "forget" the first one and go back to treating it as a valid target (even if it doesn't attack it right away).  I based this on the human memory model, where the rule of thumb is that you can store up to seven things in your short-term memory.  It seemed like a good way to handle it. :)

While we're asking how do you cancel an ai-ignore order? Will giving an explicit attack order work? Or do you have to clear goals?

The only way, currently, is to issue an explicit ai-chase order.  I could add ai-stop-ignoring[-new] if necessary.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Quote
I based this on the human memory model, where the rule of thumb is that you can store up to seven things in your short-term memory.  It seemed like a good way to handle it.

Now that's realism. :D

Seven should be enough for me. Are wings counted as a single ignore target or are the ships in them taken individually?

Quote
The only way, currently, is to issue an explicit ai-chase order.  I could add ai-stop-ignoring[-new] if necessary.

That would be useful actually. I am finding that I could use exactly that in one mission I have.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
How about rescind-goal, so that you can use it on more than just ignore situations.

event 1
-when
--true
--add-goal
---Beta 1
---ai-guard
----GTC Georgia
----60

Event 2
-when
--true
--rescind-goal
---Beta 1
---ai-guard
----GTC Georgia

Lets say that a ship or wing has 6 ai goals, but at one point in the mission you want 1 of these orders to be cancelled.  Right now, you'd have to use clear-goals, then re-do the other 5 orders.  With rescind-goal, you can cancel one order.  In fact, you could give an order for a wing, then later cancel it for just one fighter of that wing.
The Trivial Psychic Strikes Again!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
It seems that there is no way to rescind the ignore orders. This is causing a bit of a problem in two of my missions; the old ai-chase-any-except order could be removed using clear-goals but I can't find any simple way to replicate what that did using the new ignore system. One thing I could do is to just put in 7 dud Pegasus ships somewhere very far away (disabled and disarmed) and just use them to fill up the ignore lists so the existing ships in the lists are cleared up, but this is obviously a pretty clumsy way of doing it.
« Last Edit: February 26, 2006, 10:33:01 pm by CP5670 »

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
It seems that there is no way to rescind the ignore orders. This is causing a bit of a problem in two of my missions; the old ai-chase-any-except order could be removed using clear-goals but I can't find any simple way to replicate what that did using the new ignore system. One thing I could do is to just put in 7 dud Pegasus ships somewhere very far away (disabled and disarmed) and just use them to fill up the ignore lists so the existing ships in the lists are cleared up, but this is obviously a pretty clumsy way of doing it.

Okay, well remind me in a couple of days and I'll add it in.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Here is that reminder. :D

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
bump, any update on this?

Hate to nag you about it, but two of my missions are going to remain somewhat messed up until there is some way to remove the ignore commands.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Just keep reminding me. :) I'll be away this weekend but I'll try to get to it next week.