Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: ReeNoiP on October 05, 2010, 09:20:28 am

Title: Overwriting wing orders for individual ships
Post by: ReeNoiP on October 05, 2010, 09:20:28 am
Is is possible to have ships in a wing act individually?

Basically I want each ship to follow its own waypoint path while still being in the wing. I tried upping the priority of the order (for the individual ships, no wing orders), but they still fly in formation along the same path.
Title: Re: Overwriting wing orders for individual ships
Post by: Sushi on October 05, 2010, 10:58:09 am
Is is possible to have ships in a wing act individually?

Basically I want each ship to follow its own waypoint path while still being in the wing. I tried upping the priority of the order (for the individual ships, no wing orders), but they still fly in formation along the same path.

IIRC this is the way the waypoint-follow code was "designed". Not sure what the best workaround is.
Title: Re: Overwriting wing orders for individual ships
Post by: Mobius on October 05, 2010, 11:56:38 am
Uhm, just use add-goal for that and check priorities accordingly. Even if grouped in a single wing, fighters and bombers can eventually become "independent" thanks to a wise use of SEXPs. For example, you can order Alpha 2 to cover Alpha 1 while Alphas 3 and 4 disarm a target.

If you want fighters/bombers to follow waypoint paths independently, don't use wing orders.
Title: Re: Overwriting wing orders for individual ships
Post by: Scotty on October 05, 2010, 11:57:42 am
Have each ship in the "wing" actually be a ship just named what number you want it to be, with a phantom "wing" in the far off distance.  Use Check-Hits and Set-Subsystem-Strength with a high repeat count and a low repeat delay to make the ships in the wingman display stay the same color as they would be normally.  Disable orders to the phantom wing, enable orders for each individual ship.  The only way to tell that there's a difference is that the individual ships won't show up as a Wing option in the Comms menu.
Title: Re: Overwriting wing orders for individual ships
Post by: ReeNoiP on October 05, 2010, 12:25:45 pm
I gave each individual ship (drones) the goal to follow their respective waypoints 5 seconds into the mission instead of using initial orders. They still fly in formation following the drone 1. Could this have something to do with me using fury AI?

The reason I want them in a wing is so that they are easily targeted with F10, so I can't really use Scotty's suggestion.
Title: Re: Overwriting wing orders for individual ships
Post by: General Battuta on October 05, 2010, 12:29:44 pm
I gave each individual ship (drones) the goal to follow their respective waypoints 5 seconds into the mission instead of using initial orders. They still fly in formation following the drone 1. Could this have something to do with me using fury AI?

The reason I want them in a wing is so that they are easily targeted with F10, so I can't really use Scotty's suggestion.

Well you can hotkey individual ships as F10 so that's not a worry.

But no, Fury AI should not change this. You should be able to give individual orders to each ship that supercede wing orders. Try hitting them with a clear-orders SEXP just before you add the new ones?
Title: Re: Overwriting wing orders for individual ships
Post by: ReeNoiP on October 05, 2010, 12:36:13 pm
Quote
Well you can hotkey individual ships as F10 so that's not a worry.

But no, Fury AI should not change this. You should be able to give individual orders to each ship that supercede wing orders. Try hitting them with a clear-orders SEXP just before you add the new ones?

Well silly me. Somehow I thought hotkeys could only be assigned to single entities (one ship/one wing). That solves my problem, I will just disband the wing.
Title: Re: Overwriting wing orders for individual ships
Post by: General Battuta on October 05, 2010, 12:42:48 pm
Quote
Well you can hotkey individual ships as F10 so that's not a worry.

But no, Fury AI should not change this. You should be able to give individual orders to each ship that supercede wing orders. Try hitting them with a clear-orders SEXP just before you add the new ones?

Well silly me. Somehow I thought hotkeys could only be assigned to single entities (one ship/one wing). That solves my problem, I will just disband the wing.

But you shouldn't have to, and players won't be able to give orders to the wing (well actually you could fake it, but it'd be complex.)  :(
Title: Re: Overwriting wing orders for individual ships
Post by: Shivan Hunter on October 05, 2010, 05:22:19 pm
Meh. I remember having this problem once too. It's only with waypoints- with other orders like attack or defend, you can split up a wing. Just not with waypoints. You can fake them being in a wing- which you'll probably have to- but IIRC there's nothing in the code for members of a wing following different waypoints.

Wait, these are drones? Are they friendly or hostile? (That is, can the player see what their orders are)?
Title: Re: Overwriting wing orders for individual ships
Post by: ReeNoiP on October 06, 2010, 01:46:36 am
Meh. I remember having this problem once too. It's only with waypoints- with other orders like attack or defend, you can split up a wing. Just not with waypoints. You can fake them being in a wing- which you'll probably have to- but IIRC there's nothing in the code for members of a wing following different waypoints.

Wait, these are drones? Are they friendly or hostile? (That is, can the player see what their orders are)?

They are "sneaky", an IFF I added myself. The player can't see their orders.
Title: Re: Overwriting wing orders for individual ships
Post by: Shivan Hunter on October 06, 2010, 06:28:40 am
OK then, put some ships that are invisible to the player but visible to the drones (beyond the player's maximum radar range, keeping the range sufficient to see everything on the battlefield) beyond the waypoints and have the drones attack them. Remove the drones' afterburner capability and there will be no difference between this and using waypoints, except that it will work correctly.
Title: Re: Overwriting wing orders for individual ships
Post by: ReeNoiP on October 06, 2010, 06:42:00 am
OK then, put some ships that are invisible to the player but visible to the drones (beyond the player's maximum radar range, keeping the range sufficient to see everything on the battlefield) beyond the waypoints and have the drones attack them. Remove the drones' afterburner capability and there will be no difference between this and using waypoints, except that it will work correctly.

That could probably work. But since the main issue is hotkeying them, disbanding the wing is a lot easier.
Title: Re: Overwriting wing orders for individual ships
Post by: Trivial Psychic on October 09, 2010, 04:44:48 pm
Does anyone know of a way to force one one member of a wing (without disbanding or faking one) to depart via a fighterbay?  I encountered this quite some time ago while trying to update Den5's TBP campaign "In The Beginning".  It was during the capture of Sinclair, and I wanted his ship to depart into the Minbari cruiser's fighterbay, rather than simply vanish via ship-vanish.  Obviously, an ai-warpout use would do it if it was a warpout, but since it has to be a fighterbay, then it doesn't work.  I would suggest an adjustment to the ai-warpout sexp, so include an option to select a ship, fighterbay, and perhaps even a path.
Title: Re: Overwriting wing orders for individual ships
Post by: Goober5000 on October 09, 2010, 07:47:25 pm
Try setting the no-subspace-drive flag on that ship.
Title: Re: Overwriting wing orders for individual ships
Post by: FUBAR-BDHR on October 09, 2010, 07:49:50 pm
No there isn't as departures are set for the whole wing.  You might (although not a very good idea) be able to get away with setting the departure target in notepad.  That does work for the warpout order.
Title: Re: Overwriting wing orders for individual ships
Post by: Goober5000 on October 09, 2010, 09:13:22 pm
But it is possible to set ship flags on a per-ship scenario, and the no-subspace-drive code should handle departing to hangars.  So for TP's very specific scenario, he might be able to get something to work.
Title: Re: Overwriting wing orders for individual ships
Post by: Trivial Psychic on October 10, 2010, 12:05:25 pm
How would the game know which fighterbay to depart through though?
Title: Re: Overwriting wing orders for individual ships
Post by: Goober5000 on October 10, 2010, 04:28:11 pm
Magic? :nervous:

Or simply finding the closest ship on the same team with a fighterbay.
Title: Re: Overwriting wing orders for individual ships
Post by: Trivial Psychic on October 10, 2010, 04:50:38 pm
But in that scenario, the target fighterbay would be an enemy ship.
Title: Re: Overwriting wing orders for individual ships
Post by: Goober5000 on October 10, 2010, 04:54:56 pm
Uh, you want a fighter to, essentially, turn traitor, but still keep the same IFF?

Why not do a change-iff before calling ai-warpout?
Title: Re: Overwriting wing orders for individual ships
Post by: FUBAR-BDHR on October 10, 2010, 04:56:34 pm
Because the fighter doesn't turn traitor it's captured and guided into the bay. 
Title: Re: Overwriting wing orders for individual ships
Post by: Trivial Psychic on October 10, 2010, 05:00:39 pm
Because the fighter doesn't turn traitor it's captured and guided into the bay.
...with tractor beams.
Title: Re: Overwriting wing orders for individual ships
Post by: Slasher on October 11, 2010, 02:00:25 am
Sinclair actually really wanted to join the Minbari.