Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Shivan Hunter on June 22, 2024, 05:20:08 am

Title: How to have a wing jump in missing a ship?
Post by: Shivan Hunter on June 22, 2024, 05:20:08 am
Say I want Virgo wing to jump in, but - based on the result of some FRED logic/variables - a ship (say Virgo 3) may or may not be alive. Is there any way to have Virgo 1, 2 and 4 jump in, but not 3?

I could disband the wing and treat them all separately. But I'd like to have a proper wing if possible.
Title: Re: How to have a wing jump in missing a ship?
Post by: Colonol Dekker on June 22, 2024, 11:03:45 am
I think it's based on campaign persistence.  Worth a wiki search?
Title: Re: How to have a wing jump in missing a ship?
Post by: 0rph3u5 on June 22, 2024, 12:23:29 pm
The Ship-vanish SEXP should work on arrival - it deletes a ship from the mission without any record. I think it works pre-arrival too, but don't quote me on that.

EDIT: you can use another SEXP to make sure the dead ship doesnt get warp-in (hold for name set-arrival-info)

EDIT 2 - now with links
https://wiki.hard-light.net/index.php/Ship-vanish
https://wiki.hard-light.net/index.php/SCP_SEXPs#set-arrival-info
Title: Re: How to have a wing jump in missing a ship?
Post by: Shivan Hunter on June 22, 2024, 02:56:45 pm
Hmmmmm.

Ship-vanish does nothing before the ship shows up.

Set-arrival-info seems to be ignored if set on an individual ship in a wing (since FS uses the wing's arrival info instead).

Ship-vanish when it arrives "works"... but its subspace thingy still shows up, and I'd rather it not.

[EDIT] Changing the ship's class before it arrives works... hmm. Using a dummy pof (a copy of the Maahes) with the bounding box spoofed to be extremely smol (FSO doesn't even whine about it lmao) hides the subspace portal perfectly well. :D

[EDIT] big "Train is a hat" energy itt
Title: Re: How to have a wing jump in missing a ship?
Post by: Mobius on June 23, 2024, 05:08:13 am
What you're describing perfectly matches an occurrence featured in SR's next release. It even happens multiple times during a mission, meaning that wave 2 may not have, let's say, Delta 3 and wave 3 will remove Delta 3 as well as other craft that are no longer required to jump in later on.

Though leaving it as a proper wing seems to work with the tweaks you just proposed, I'd sincerely go with disbanding the wing and managing each craft separately (that's what I've done in my case, at least). Separate objects seem to work just fine with checkpoint-related SEXPs too, meaning that craft no longer required to arrive after a checkpoint will not be spawned at all.
Title: Re: How to have a wing jump in missing a ship?
Post by: Novachen on June 24, 2024, 01:41:44 am
"Destroy ship before mission start" works for ships in a wing as well. The destroyed ship will even show up as destroyed in the wingman gauge with this.

However you could only apply that for individual ships in a wing if you edit the mission file manually. But that worked even in the original fsm files for FS1 back then. So this is a retail compatible feature :D

In FRED2 you can even deactivate this flag in the Ship Editor after the flag is set via notepad, but you can not activate it on this way.

That was also still the case with FRED2 Open a few years ago, no idea if this was changed in the meantime.
Title: Re: How to have a wing jump in missing a ship?
Post by: Shivan Hunter on June 24, 2024, 02:43:53 am
Interesting! That could be a more elegant solution. Main problem is, my whole point is to set that flag during the mission via SEXP (it's a wing that warps out, then warps in again... of course the second wing is actually a separate wing, but the point is the "destroyed" status is determined in-mission, when you blow them up ;) )

Tested "Destroy before mission" on an individual ship in a wing, and it does work as you say, even if the wing warps in later.

But as far as I can tell (and maybe I'm wrong, since there are a zillion SEXPs now) there's no way to alter the "Destroy before mission" value during the mission. Understandable, since in the general case (the ship is already present) I'd expect it to do nothing, and if the ship is not already present then you can put whatever logic you want in the arrival cue instead of using weird dark magic.

Hmmm... might be able to set it via script :drevil: