Author Topic: Ignoring targets without a million sexps  (Read 3796 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Ignoring targets without a million sexps
I've got a mission with some mines that I want neither side to attack at the beginning and one side to be able to attack in the middle of the mission.  One hostile cap in particular needs them on the target list.  By default the mines are stealthy so no problem at the beginning of the mission.  Since I need the hostile ships to attack and they aren't friendly I made them neutral.  Now here's the problem.   As soon as I turn stealth off both sides can attack them.  Is there an easy way to get all the friendly ships to ignore them without having to add an ignore order for every friendly ship or wing for each mine?  Not only that but re-adding them every time goals are cleared and new orders are given to a ship or wing.  I don't care either way if the mines are stealth or not but they can't show up as friendly.  Also it's multiplayer so a new iff_def is out. 

Question 2.  What's the difference between ai-ignore and ai-ignore-new?  They both have the same description.

Question 3.  Do ships accept more than 5 orders?  In this case 6 or 7.  I know 10 are listed in the initial orders with 6-10 grayed out but are 6-10 usable with sexps?

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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
2)ai-ignore did a whole bunch of things on top of giving the ship the ignore order in order to bulletproof the ship being ignored. The drawback is that it can lead to everything ignoring that ship. Hence ai-ignore-new which only does what it's supposed to.

3)You have a maximum of 5 AI Goals.


I'll have a think about 1 but without an IFF_def nothing is leaping out at me.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
I was afraid of that.  Kind of tosses a monkey wrench in the whole works.  Have to rethink that part of the mission then since I would have to give each wing or ship 5 ai-ignore orders which leaves no other orders. 

Can a turret (non-beam) be ordered to fire at a stealth object and hit it using the sexp?  I could do something with waypoints and the ship withing weapon range that way.  I also assume that I can't order a hostile to attack another hostile target.
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 FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Do you foresee any problems with making the mines into a wing since there are only 5 of them?  The reason I ask is there will be ships docking with each of them and then doing waypoints.  I've had problems with things like that in the past. 

It's probably as much work as the ignore solution since I already have 90% of the events and goals done but it would cut the ignore orders down to one per ship/wing at a time.  Still going to try the turret firing idea first. 
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 Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Ignoring targets without a million sexps
Come on, this is like an old-fashioned logic puzzle. :D

Friendly attacks Neutral and Hostile.
Hostile attacks Neutral and Friendly.
Neutral attacks Friendly.
Unknown attacks Hostile.

Solution:

Side A: Friendly
Side B: Neutral
Mines: Unknown at beginning, Hostile later on

And that should do it.  It should even work with retail. :D

EDIT: And docking doesn't play well with wings.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Great idea.  Going to try that in a few minutes after I stare at the logic because it seems like it can't be that simple.  Don't even have to make the mines unknown at the beginning because they are stealth then. 

Figured as much with the wings that's why I'm using fake ones.  Just numbered mines and docking ships without being wings.  Though maybe I could get away with the dockees being in a wing but I'd rather not push my luck.
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 FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
New it was too good to be true:


Come on, this is like an old-fashioned logic puzzle. :D

Friendly attacks Neutral and Hostile.
Hostile attacks Neutral and Friendly.
Neutral attacks Friendly.
Unknown attacks Hostile.

Solution:

Side A: Friendly
Side B: Neutral
Mines: Unknown at beginning, Hostile later on

And that should do it.  It should even work with retail. :D


I don't want the mines attacked by friendly ships just hostile but they can't be friendly.   Good thing I took a nap on it before I decided to try it.

I could turn them friendly while they are docked and then set them back when the ships undock but that wouldn't look to good.
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 Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Ignoring targets without a million sexps
I don't want the mines attacked by friendly ships just hostile but they can't be friendly.   Good thing I took a nap on it before I decided to try it.
Maybe you should take another nap. :p Or maybe you should actually try it.

Don't think in terms of "friendly" and "hostile" because Friendly and Hostile are just IFF names.  Think in terms of Side A, Side B, and Mines.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Seems to be working.  Don't understand why the friendly AI aren't blowing the heck out of the hostile mines but I'll take it.  I still need to add hostile fighters in.  Well they are in but their arrival is set to false for testing. 

Now I have another problem.  Think I know what is causing it though.  I have the ship set to warp if the distance from any hostile and any neutral is > X.  Now I think that what is happening is if all the neutral or hostile ships are destroyed the distance is returning 0 which will never be > x.  Need to confirm this. 

Just made a test mission.  Standard ship starts out about 1500 away and does a waypoint toward another ship.  3 events with everytime send message.  One distance > 1000 one < 1000 and > 0 and one = 0.  When the ship is destroyed it just quits giving any message.  Doesn't seem to even evaluate the sexp if there are no hostile ship.  Easy workaround with percent ships destroyed but seems kind of weird that distance > X doesn't work if there are no ships.
« Last Edit: March 18, 2008, 11:14:31 pm by FUBAR-BDHR »
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
If the specified ship isn't present in the mission the distance between them is Not a Number. I suspect it's doing the same thing with Any Neutral. It seems a little counter-intuitive I agree. 
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Well it was easy to get around anyway.  Of course after I fixed it it took me all day to figure out it was now actually working and the event chained to it wasn't firing.   :mad:  Didn't notice because I never added the send message to the distance event.  Still haven't figured out why the chained event isn't working.  It's simple.

(chained 6 seconds)
when
-->not
----->is-destroyed-delay
---------><ship>
--------->0
-->add-goal
-----><ship>
----->ai-warp-out
-------->89
and a bunch of other warps but the first warp never occurs. The previous even even clears the goals for the ship just in case.  The ship just stops dead and that's it. 

Getting ready to take the not is-destroyed-delay out but I don't see why that would cause it since the ship doesn't get killed in those 6 seconds.  It can't I have it set to invincible for testing.
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
Ai-warp-out won't work if the ship is disabled IIRC so check for that (Add a test message so we can check whether the event is actually firing or not) cause I can't see any reason why not is-destroyed-delay would be giving your hassle either.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Well the ship is not disabled as it is moving at a speed of 11 when given the order.  Now one or two of the 4 engines is disabled.  Could that be doing it?  I quit after that post last night so I still need to try it without the not is destroyed delay.  If that doesn't do it I'll make the test mission.
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
That could be it. Ships won't warp out if their engines are damaged below a certain level. I think it's around 30% IIRC.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Is that something specific to the ai-warp-out sexp?  I remember ships warping just fine with no engines, nav, or any subsystems at all using the departure cue.

Looks like that is the problem.  Did a repair to the engines right before the warp and it worked. 
« Last Edit: March 20, 2008, 02:07:01 pm by FUBAR-BDHR »
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
What build are you using? I do seem to remember this being a problem (It was in fact the reason that the Minbari cruiser wasn't jumping out in the Earth-Minbari war campaign) but I thought it was fixed.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
I think it's the latest TBP 3.6.9 but I will need to double check on that computer.   I know this computer has the most current build.  If I copied the test mission up to the network I should be able to confirm it at least.

OK just tried it with the exe that's packed in the next 3.4b.  It's dated 3/3/08.  Same results.  Here's the scenerio:

Ship with 4 engines:

No warp
Engine 1 43%
Engine 2 38%
Engine 3 0%
Engine 4 14%

Repair engines 1 2 and 4 to 99 % and it warps.
« Last Edit: March 20, 2008, 03:28:09 pm by FUBAR-BDHR »
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ignoring targets without a million sexps
The average percentage for all 4 is less that 30%. I remember looking this all up a while back but I've forgotten how it all worked now.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Ignoring targets without a million sexps
Yea it is less then 30% overall.  Still seems like a strange rule for the only sexp available for multi player warpout.  Kind of limits the one ship opening a jump point for another damaged ship or ships.   

Can that info be added to the comments for the sexp? 

Actually the comments for that sexp aren't correct to begin with.  It shows 2 arguments but only accepts one.
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 Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Ignoring targets without a million sexps
I thought the 30% threshold was only valid for fighters and bombers.