Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: birdbeast on May 21, 2008, 12:55:00 pm

Title: iff-def vs. ai-ignore/ai-ignore-new
Post by: birdbeast on May 21, 2008, 12:55:00 pm
Greetings

I'm new here -- did a great deal of FREDding back when FS2 had been out for 0-2 years, just now getting back into it.  Excited about all of the new features, enjoying them a great deal.

I was reading some of the forum posts and came across a mention of an iff-def.  I searched all over the FSO wiki and here, and couldn't find any information on what exactly this is.  I'm hoping it's not just a simple way of referring to the domain of IFF values (Friendly, Neutral, Hostile, Unknown, etc.) and might be a way for me to create a new IFF definition in which I could define the behavior of the ships assigned to that definition.  However, somehow I doubt this kind of flexibility has been added to the game.  Could someone let me know what exactly an iff-def is, and/or point me to a resource that would offer a detailed explanation?

Here's my dilemma:

I'm designing a mission in the middle of a campaign in which, after some relatively simple dogfights, two wings of fighters jump in with IFF signature Unknown.  A few seconds later, their capital ship jumps in, another Unknown ship from an earlier mission who is central to the plot at this point in the campaign.  A few seconds after THAT, another capital ship jumps in, this one with IFF signature Hostile, since it is a known Hostile capship of a particular known hostile faction, and launches two transports (which eventually dock with the Unknown capship), and pulls alongside the Unknown capship; during all this, a Shivan cruiser also jumps in, pulls alongside the first capship, and jumps out again.  The whole idea is to "show" the player that the Unknown faction is actually not a separate faction at all, but rather a previously-unaccounted portion of the Hostile faction.

So at this point in the mission, the IFF signature for all of the Unknown forces is changed to Hostile.

Unfortunately, making the ships hostile wreaks havoc with the choreography that is supposed to occur between the three capships and the docking operation for the transports launched from the second capship trying to dock with the first.

If all of the ships above remain Unknown, everything goes without a hitch: The second capship jumps in, pulls alongside the first (using a waypoint path), and after both transports are launched, it jumps out.  Meanwhile, on a slightly different timeline and on the other side of the first capship, the Shivan cruiser jumps in, pulls alongside, vectors away (also using a separate waypoint path), and jumps out.  The two transports dock, one after the other, and the original larger capship jumps out.

So I know my expressions are working properly.  But when I make the ships IFF-Hostile, they immediately begin reacting to proximity of the player ships and any IFF-Friendly ships, which removes capships 2 and 3 from their waypoint paths.  The transports also react to proximity of IFF-Friendly ships and run away, ensuring that they will pretty much never dock with capship 1.

I'm hoping I'm able to solve the above using some creative orders of ai-ignore/ai-ignore-new.  But when I saw this iff-def term being thrown around, I wondered.

Anyway.  Any help is appreciated.  Thanks in advance for any information.
-bb
Title: Re: iff-def vs. ai-ignore/ai-ignore-new
Post by: Galemp on May 21, 2008, 01:12:54 pm
Very weird. Capships, transports, and in fact anything except fighters and bombers should just continue to follow their FRED orders (waypoints, docking, etc.) I don't know what your issue here is; maybe you need to ensure they all have 'no dynamic goals' in their properties.

Alternately try using 'Neutral' instead of 'Hostile.' They're still enemies of Friendlies, but at least they're not as aggressive.
Title: Re: iff-def vs. ai-ignore/ai-ignore-new
Post by: FUBAR-BDHR on May 21, 2008, 01:27:26 pm
You can make new IFF definitions that will attack only certain teams or no teams.  If you extract the iff-def table  you will see how it is set up.   
Title: Re: iff-def vs. ai-ignore/ai-ignore-new
Post by: karajorma on May 21, 2008, 02:26:02 pm
You didn't stick the transports in a wing did you? I've just finished posting elsewhere that you sometimes get some odd behaviour if you do that.

As for IFF defs. The Wiki (http://www.hard-light.net/wiki/index.php/Iff_defs.tbl) is the best place for an explanation.
Title: Re: iff-def vs. ai-ignore/ai-ignore-new
Post by: birdbeast on May 22, 2008, 03:11:51 pm
You didn't stick the transports in a wing did you? I've just finished posting elsewhere that you sometimes get some odd behaviour if you do that.

As for IFF defs. The Wiki (http://www.hard-light.net/wiki/index.php/Iff_defs.tbl) is the best place for an explanation.

Thanks, I'll check it out.

I didn't put the transports in a wing, although your question makes me wonder if the engine doesn't think they're in a wing anyway, because they are named like ships in a wing are named, e.g. "name 1" and "name 2."  Do you think that's confusing the engine?

I would be a lot more comfortable if only the transports were behaving weirdly, but I have a Vasudan Cruiser that is also failing to adhere to its "ai-waypoints-once" order after the IFF changes to hostile.  Grr. 

Thanks everyone for your input. 

One more question -- I wanted to experiment with ai-ignore/ai-ignore-new, but I can't seem to add-goal with either of them -- I forget if they're greyed out or simply don't appear.  Am I going about it the wrong way? 

This is FSO 3.6.9, by the way.  Haven't checked for an update since then -- is this version too old?

Thanks again for all your help
-bb
Title: Re: iff-def vs. ai-ignore/ai-ignore-new
Post by: karajorma on May 23, 2008, 02:57:12 pm
You can't add either if you don't have any hostile ships in your mission yet IIRC. FRED has a habit of greying out SEXPs it thinks you can't use even if you actually can.

As for the wing thing, I doubt the game is confused. It can tell the difference between ships in a wing and ships named as if in a wing.