I've seen some ideas thrown around about this before, but I just thought of this (probably) easier way to have the player ship able to depart to a hangar, instead of always having to enter subspace to end a mission.
Right now, as I understand it, the player warp-out code goes something like this:
When Key-pressed Alt-J
-AI takes control of player ship, subspace engine sound begins to play.
-Camara moves to external view
-Player ship goes through warpout sequence
-Mission goes to debreifing
My idea is to simply have the option of not having the warp hole open if Alpha's departure target in Fred2 is set to a ship instead of hyperspace. So in Inquisitor's prescribed pseudo-code, the new warp out sequence would work like this:
When Key-Pressed Alt-J
-If Alpha's departure target is set to hyperspace
--AI takes control of player ship, subspace engine sound begins to play.
--Camara moves to external view
--Player ship goes through warpout sequence
--Mission goes to debreifing
-If Alpha's departure target is set to CapShip1
--AI takes control of player ship, turns ship towards CapShip1
--Camera moves to external view
--Player ship does
not go through warpout sequence
(i.e. no wormhole opens, we just watch Alpha 1 flying for a few seconds)--Mission goes to debriefing
We wouldn't actually see Alpha 1 go all the way to the hangar and disappear inside using this method, but I doubt anyone would want to sit through a minute and a half of just watching Alpha 1 fly towards the mothership anyway. The point is that you went back to the mothership instead jumping out, not actually watching all the painstaking and boring details of docking.
This might not be too hard to code, since it just means adding an evaluation of Alpha's departure target and then deciding whether to play the subspace warp-out sequence or not. Probably the biggest bit of work would be getting the AI to turn the player ship towards the mothership, but even that shouldn't take much effort.
I like this method because it saves the player from either having to fly manually towards the mothership before he can depart or else having to watch a two minute "return to the mothership" sequence. I can see either one easily leading to long, boring sequences at the end of missions. Long and boring is bad.
Btw, this idea owes a lot of insipration to LtNarol's proposed sexp to give the ai control of the player ship in general, so I'll give a nod where it is due.