Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: D-420 on March 28, 2018, 07:42:44 pm

Title: [Resolved] Undocking ships
Post by: D-420 on March 28, 2018, 07:42:44 pm
I'm beginning to feel stupid because I can't get this **** worked out.

I've got ships start starting the mission docked; I need them to undock after another ship arrives. I've been banging my head against this wall for like, a day now. Is this even a thing that can be done? Am I just actually stupid?
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 08:09:28 pm
Are you using sexps? It should work to just put:

when
-has-arrived-delay
--ship name
--0
-add-ai-goal
--undock
--ships to undock
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 08:11:26 pm
Are you using sexps? It should work to just put:

when
-has-arrived-delay
--ship name
--0
-add-ai-goal
--undock
--ships to undock

Okay, so, we're on the same page then; that's what I was thinking as well. The problem I'm having with that is that the ai goals option on the damn list thing is always greyed out; won't let me select it.
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 08:15:38 pm
Are you using sexps? It should work to just put:

when
-has-arrived-delay
--ship name
--0
-add-ai-goal
--undock
--ships to undock

Okay, so, we're on the same page then; that's what I was thinking as well. The problem I'm having with that is that the ai goals option on the damn list thing is always greyed out; won't let me select it.

It shouldn't be grayed out, maybe show me a screenshot? You could also use arrival cues and set the ship to docked with the ship editor, but in that case the ship isn't truly docked.
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 08:23:08 pm
It shouldn't be grayed out, maybe show me a screenshot? You could also use arrival cues and set the ship to docked with the ship editor, but in that case the ship isn't truly docked.

Screenshot should be attached.

[attachment stolen by Russian hackers]
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 08:25:07 pm
Ah so hover over "change" then "ai goals" then "add goal" then click "undock" :)
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 08:31:08 pm
Ah so hover over "change" then "ai goals" then "add goal" then click "undock" :)

Yep, I'm just stupid. Thanks mate. Unfortunately however, that brings us to another problem; see the attached screenshot.
For the record, I have confirmed that the ships are actually docked in the first place.

[attachment stolen by Russian hackers]
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 08:42:24 pm
Hmm, iirc the ship doesn't actually have to be docked for that sexp to actually show up and be selectable. Maybe try restarting FRED, or try the sexp with a different ship and see if it is still grayed out?
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 08:46:19 pm
Hmm, iirc the ship doesn't actually have to be docked for that sexp to actually show up and be selectable. Maybe try restarting FRED, or try the sexp with a different ship and see if it is still grayed out?

I've done both, and checked both trying the wing as a whole, and a different ship/wing entirely. It remains greyed out.
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 08:48:42 pm
Hmm, iirc the ship doesn't actually have to be docked for that sexp to actually show up and be selectable. Maybe try restarting FRED, or try the sexp with a different ship and see if it is still grayed out?

I've done both, and checked both trying the wing as a whole, and a different ship/wing entirely. It remains greyed out.

Hmm not sure then, as I can't seem to reproduce the issue on my end. Perhaps some other folks who frequently help FREDers may have a suggestion for you soon :)
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 08:59:43 pm
Hmm not sure then, as I can't seem to reproduce the issue on my end. Perhaps some other folks who frequently help FREDers may have a suggestion for you soon :)

Alright, thanks for your help so far, then.
Title: Re: Undocking ships
Post by: Black Wolf on March 28, 2018, 09:28:17 pm
As a general rule with Freespace, docking is weird. My assumption is that Scorpio 1 is in a wing - that's most likely to be your problem, as FRED doesn't check the other likely sources of problems, like docking paths and dockpoint incompatibilities at this stage.

But I'm assuming you want Scorpio 1 in a wing, so I would suggest making use of the jettison-cargo sexp instead. Assign it to the ship that Scorpio 1 is docked to, and select Scorpio 1as the specific piece of cargo (i.e. Docked ship) you want to jettison, otherwise it will dump everything else. Then you should be able to proceed as normal.
Title: Re: Undocking ships
Post by: JSRNerdo on March 28, 2018, 09:57:37 pm
Which ships are docked? If one of them is, infact in a wing and the other is not, you can order ths other ship to undock instead maybe?
Title: Re: Undocking ships
Post by: Black Wolf on March 28, 2018, 10:18:44 pm
Which ships are docked? If one of them is, infact in a wing and the other is not, you can order ths other ship to undock instead maybe?

Just to be clear, I'm only... maybe 70% confident about my "in a wing" theory. But undocking generally should be used by the ship that is actually actively undocking, because the undocking ship is the one that actually moves. That's not going to be ideal if that Ceres I van see behind the events window is the ship involved. Jettison is definitely better in that situation.
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 10:27:55 pm
Which ships are docked? If one of them is, infact in a wing and the other is not, you can order ths other ship to undock instead maybe?

Just to be clear, I'm only... maybe 70% confident about my "in a wing" theory. But undocking generally should be used by the ship that is actually actively undocking, because the undocking ship is the one that actually moves. That's not going to be ideal if that Ceres I van see behind the events window is the ship involved. Jettison is definitely better in that situation.

For the record, the Ceres is involved. Just for the hell of it, I tried it that way; still greyed out. Your 'in a wing' theory is, unfortunately, also false. A fresh Ulysses sees the same problem. I'm afraid that I also haven't been able to find a Jettison Cargo sexp, just one for Jettison Cargo Delay, which requires you to specify a delay rather than a cargo to be jettisoned.
Title: Re: Undocking ships
Post by: Black Wolf on March 28, 2018, 10:51:57 pm
Oh! It's a fighter! That's why. Im fairly sure (80 or 90% now :P) that fighters and bombers can't dock or undock. They aren't meant to interact that way with other ships.

Jettison cargo delay is your only option. Assuming the Ceres is the ship to which the fighter is docked, use Jettison Cargo Delay, choose the Ceres as the ship jettisoning it's cargo, ignore the second part, then right click the jettison caro delay sexp, add data, Scorpio 1.

That should work, as long as Scorpio 1 has an objective that kicks in after it undocks so it doesn't just sit there.
Title: Re: Undocking ships
Post by: wookieejedi on March 28, 2018, 11:05:08 pm
Interesting as I use dock and undock all the time for fighters; though they are custom models and not retail (ie FotG fighters).
Title: Re: Undocking ships
Post by: D-420 on March 28, 2018, 11:28:39 pm
Oh! It's a fighter! That's why. Im fairly sure (80 or 90% now :P) that fighters and bombers can't dock or undock. They aren't meant to interact that way with other ships.

Jettison cargo delay is your only option. Assuming the Ceres is the ship to which the fighter is docked, use Jettison Cargo Delay, choose the Ceres as the ship jettisoning it's cargo, ignore the second part, then right click the jettison caro delay sexp, add data, Scorpio 1.

That should work, as long as Scorpio 1 has an objective that kicks in after it undocks so it doesn't just sit there.

You'd be entirely correct, because now that part of the mission has been confirmed to work properly; nothing else does, but I know why for that. Thanks for the help mate.
Title: Re: [Resolved] Undocking ships
Post by: 0rph3u5 on March 29, 2018, 04:18:10 am
Interesting as I use dock and undock all the time for fighters; though they are custom models and not retail (ie FotG fighters).

The "fighters can't dock"-thing is only true for retail; any mod with an objecttypes.tbl can circumvent that by re-defining the "fighter"-type in #Ship Types-section of that table.
Title: Re: [Resolved] Undocking ships
Post by: wookieejedi on March 29, 2018, 07:37:15 am
Ahh good to know, thanks!