Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: CommanderDJ on September 01, 2010, 07:49:27 am

Title: In-mission subspace jump
Post by: CommanderDJ on September 01, 2010, 07:49:27 am
Hey all,
In a normal situation I would look through other people's mission files to try and find a solution, but at this point in time I would rather get a direct answer. How would an in-mission subspace jump be FREDded? Like, having a ship (this is both for other ships and the player) jump from one part of the level to another in-mission? I know it involves the warp-effect SEXP, but that's all my mind can summon up atm, I'm quite tired. So yeah. Can someone who is awesomer at FREDding than me pl0x explain? Thanks a bunchload.

CommanderDJ
Title: Re: In-mission subspace jump
Post by: Snail on September 01, 2010, 07:52:28 am
It involves the warp-effect SEXP, fade to white, set-mission-subspace (optional) and use of coordinate manipulation SEXPs.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 01, 2010, 07:55:57 am
Warp effect created with relative coordinates, some way to lock the player's controls out, use of the flash-hud-gauge SEXP to flash the warpout gauge, play-sound-from-file to play the warpout spoolup sound, fade to white, set-mission-subspace, fade back to white (maybe some screenshake on entry and exit too), set player ship coordinates to new position, move any NPC ships to new position or create new versions of them and copy damage.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 01, 2010, 08:07:48 am
Lol, that's awesome. Ah, yes, I forgot about coordinate manipulation SEXPs.

Is there a way to do it for other ships? Like, the player watches as a ship enters subspace then exits about 20K away. Or would I have to create two different ships for that?
Title: Re: In-mission subspace jump
Post by: General Battuta on September 01, 2010, 08:22:23 am
Lol, that's awesome. Ah, yes, I forgot about coordinate manipulation SEXPs.

Is there a way to do it for other ships? Like, the player watches as a ship enters subspace then exits about 20K away. Or would I have to create two different ships for that?

You can do it with one (that's how it was done in War in Heaven), or simply use new ships with the same name followed by a # sign and a number. The second method (used in Vassago's Dirge) is much easier; simply set the first ship to depart, then have its copy arrive at the desired location and fire a copy-damage SEXP.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 01, 2010, 08:27:26 am
You can do it with one (that's how it was done in War in Heaven).

Lol, believe it or not, I haven't actually played any of the BP campaigns. I plan to do that right after my exams.
Would you mind going through the one ship method? I want to learnz stuff, and don't mind in-depth discussion, if it's needed. Up to you though.
Title: Re: In-mission subspace jump
Post by: Scotty on September 01, 2010, 08:53:50 am
Once you know what you're doing, it's not all too hard to understand (now, I might present this differently than more experienced persons on the forum, but it's still a way to do it).

You'd need to start out with several SEXPs: one that locks player controls so they can't move out of the way and mess up the sequence (visually, at least), one to create-warp-effect, one to flash the jump out HUD gauge, and one to play the warp-out sound effect.  All of those will fire before the jump officially happens, and timing is going to be important.

When you've got that part down, you're probably going to need a very brief fade-out to white SEXP (I'm not totally sure about that.  The warp effect might block vision enough to pull it off without it), and a change-coordinates SEXP.  Be sure to set-facing the direction you want it to be.  Unlock player controls, and the player has 'jumped.'

For AI ships, you can do the 'jump' one of two ways.  Way one takes the existing ships and uses coordinate manipulation to bring them to roughly the same area as the player (be sure to use create-warp-effect with relative coordinates to the ship, or it'll look like they just disappeared and/or reappeared).  As a precaution, I'd clear orders to make sure they don't end up chasing after a ship that is now several hundred or thousand kilometers away.

Way two is a little more simple from a jumping perspective, but more complex from a units standpoint.  Instead of using coordinate manipulation, just have the first ship jump out, and have a ship with hidden characters in its name jump in near the player.  In order to make damage carry over, use the copy-damage SEXP Battuta was talking about.

NOTE:  Understand that this is from someone who has never actually FREDed a player jump in mission.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 01, 2010, 09:06:16 am
Once you know what you're doing, it's not all too hard to understand (now, I might present this differently than more experienced persons on the forum, but it's still a way to do it).

You'd need to start out with several SEXPs: one that locks player controls so they can't move out of the way and mess up the sequence (visually, at least), one to create-warp-effect, one to flash the jump out HUD gauge, and one to play the warp-out sound effect.  All of those will fire before the jump officially happens, and timing is going to be important.

When you've got that part down, you're probably going to need a very brief fade-out to white SEXP (I'm not totally sure about that.  The warp effect might block vision enough to pull it off without it), and a change-coordinates SEXP.  Be sure to set-facing the direction you want it to be.  Unlock player controls, and the player has 'jumped.'

For AI ships, you can do the 'jump' one of two ways.  Way one takes the existing ships and uses coordinate manipulation to bring them to roughly the same area as the player (be sure to use create-warp-effect with relative coordinates to the ship, or it'll look like they just disappeared and/or reappeared).  As a precaution, I'd clear orders to make sure they don't end up chasing after a ship that is now several hundred or thousand kilometers away.

Way two is a little more simple from a jumping perspective, but more complex from a units standpoint.  Instead of using coordinate manipulation, just have the first ship jump out, and have a ship with hidden characters in its name jump in near the player.  In order to make damage carry over, use the copy-damage SEXP Battuta was talking about.

NOTE:  Understand that this is from someone who has never actually FREDed a player jump in mission.

That is a well-worded, concise, easy to understand summary! Thank you very much!

I'm guessing making the player use AI would serve as a substitute for locking out the controls? Although I'm not too familiar with how the whole AI thing works... lol.
But seriously, thanks for the brilliant rundown! I will definitely be referring back to that once I actually get to FREDding the mission in question.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 01, 2010, 10:20:24 am
Scotty skipped a few steps. You'll want to play the warp spoolup sound from a table, flash the 'subspace drive engaged' HUD gauge, and (optionally) move the player into subspace for a little while. You may also want to create another warp effect behind the player at the arrival destination to provide the illusion of exiting a vortex on the far end.

You're also going to want to lock player perspective to internal for the duration of the jump or it'll look bad.
Title: Re: In-mission subspace jump
Post by: Scotty on September 01, 2010, 01:38:27 pm
You'd need to start out with several SEXPs: one that locks player controls so they can't move out of the way and mess up the sequence (visually, at least), one to create-warp-effect, one to flash the jump out HUD gauge, and one to play the warp-out sound effect.  All of those will fire before the jump officially happens, and timing is going to be important.

:P

Although I did miss the create-warp-effect at destination.

The duration doesn't really need to be more than getting through the created warp effect and the quick coord jump.  Sure, you can make it cool by entering subspace and stuff, but it's optional for the effect to work.

Actually, I think the create-warp-effect at destination could be optional as well.  The retail campaign has several missions start when you're assumed to have warped in, but with no effect.  See: Into the Lion's Den.
Title: Re: In-mission subspace jump
Post by: Mobius on September 03, 2010, 01:33:32 pm
Pretty much what Battuta said on his first post, with the difference that I think mission-set-subspace should be used only to represent intersystem jumps, because intrasystem ones are canonically known to be istantaneous.
Title: Re: In-mission subspace jump
Post by: QuantumDelta on September 03, 2010, 01:35:35 pm
Citation please?
Title: Re: In-mission subspace jump
Post by: Mobius on September 03, 2010, 01:44:57 pm
Quote from: FreeSpace Reference Bible
Intra-system subspace travel is nearly instantaneous, and requires relatively little energy input to enable.  Most of the GTA’s advanced fighters are equipped with intra-system jump motivators, allowing them to travel at will within a given star system.  There is little or no restriction on the beginning and end points of such a subspace “hop,” except that they be in the same star system.

I did not remember that "nearly". Well, it kind of suggests that a short fade out to white is the most appropriate choice. Still not sure if showing subspace for more than 1 second is plausible when it comes to intrasystem jumps.
Title: Re: In-mission subspace jump
Post by: The E on September 03, 2010, 01:59:11 pm
Rule of Cool > Rule of Perception > Canon accuracy in these things.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 03, 2010, 02:15:07 pm
Quote from: FreeSpace Reference Bible
Intra-system subspace travel is nearly instantaneous, and requires relatively little energy input to enable.  Most of the GTA’s advanced fighters are equipped with intra-system jump motivators, allowing them to travel at will within a given star system.  There is little or no restriction on the beginning and end points of such a subspace “hop,” except that they be in the same star system.

I did not remember that "nearly". Well, it kind of suggests that a short fade out to white is the most appropriate choice. Still not sure if showing subspace for more than 1 second is plausible when it comes to intrasystem jumps.

People can do whatever they like in their missions. I like to believe that intrasystem jumps take a few seconds because of the Belisarius, and because it opens up more design options, but that doesn't mean I think everybody has to do it that way.
Title: Re: In-mission subspace jump
Post by: QuantumDelta on September 03, 2010, 03:54:21 pm
It's also infered that the shivans that blow up the plato are the same ones that blow up the aten.
Title: Re: In-mission subspace jump
Post by: Goober5000 on September 04, 2010, 02:01:32 am
:mad: I think you meant to use "implied" there.  (And you didn't even spell "inferred" right. :doubt:)

Anyway, I don't think that's implied at all; it could be a different group of fighters.

A better example IMHO would be the Nemesis nanojumping in INFR1.
Title: Re: In-mission subspace jump
Post by: QuantumDelta on September 04, 2010, 05:30:24 am
I was drunk!
:P
And...the implication comes from it being the exact same combination and makeup of ships that jump back in :p
I don't expect them to be the same in fred though..
And.... INFR1 isn't canon!
.......And hangovershowertime :p
Title: Re: In-mission subspace jump
Post by: Mobius on September 04, 2010, 08:03:17 am
Nanojumping (which, as stated, isn't canon) requires a lot of energy and advanced tech. It's not exactly the same as jumping to another place and then jumping back.
Title: Re: In-mission subspace jump
Post by: Droid803 on September 04, 2010, 12:00:39 pm
Rule of Cool > Rule of Perception > Canon accuracy in these things.

Only if it isn't an immersion breaker.
Staring at the swirly subspace tunnel too long for an intrasystem jump would do that, at least for me.
Title: Re: In-mission subspace jump
Post by: Mobius on September 04, 2010, 12:16:03 pm
Depends, really. IMHO if there's a cutscene showing the whole procedure, immersion may be compromised... otherwise, it may work fine. I'm not sure, because players have different tastes when it comes to immersion.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 04, 2010, 12:18:19 pm
Rule of Cool > Rule of Perception > Canon accuracy in these things.

Only if it isn't an immersion breaker.
Staring at the swirly subspace tunnel too long for an intrasystem jump would do that, at least for me.

At least in BP we tried to time the jump duration based on 'Surrender, Belisarius'.
Title: Re: In-mission subspace jump
Post by: Mobius on September 04, 2010, 12:22:53 pm
There are other ships, too. At the moment I remember the Alba, Epigoni and a few others.

I still think intrasystem jumps shouldn't last too long, or intersystem jumps would necessarily last hours to be plausible. (Unless it's assumed that ships travel faster in intersystem jumps.)
Title: Re: In-mission subspace jump
Post by: Scotty on September 04, 2010, 07:27:23 pm
I was always under the impression that intersystem WERE instantaneous, and intrasystem were slightly slower than that.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 04, 2010, 07:32:25 pm
I was always under the impression that intersystem WERE instantaneous, and intrasystem were slightly slower than that.

Well, I hate to break it to you, but there's a game called FreeSpace 1 with a final mission that kind of demolishes that theory.
Title: Re: In-mission subspace jump
Post by: Mobius on September 04, 2010, 07:36:49 pm
Many messages in FS1 also suggested that ships arrived to the system beyond the node as soon as they jumped out, so it's kind of contradictory. We know, however, that the average intersystem jump is only a few minutes/hours long.
Title: Re: In-mission subspace jump
Post by: Scotty on September 04, 2010, 07:42:50 pm
Well, I was basing my theory on the final mission of FS2, which gave you messages saying that ships had reached another system only a few seconds after they jumped out.
Title: Re: In-mission subspace jump
Post by: headdie on September 04, 2010, 07:47:50 pm
Well, I was basing my theory on the final mission of FS2, which gave you messages saying that ships had reached another system only a few seconds after they jumped out.

all that had happened there was you jumped the site of one node out of Capella which had just been collapsed to the system's only remaining exit, for the entirety of your assignment to the the 70th blue lions you are in Capella
Title: Re: In-mission subspace jump
Post by: General Battuta on September 04, 2010, 07:52:12 pm
Well, I was basing my theory on the final mission of FS2, which gave you messages saying that ships had reached another system only a few seconds after they jumped out.

They took a bypass, obviously.
Title: Re: In-mission subspace jump
Post by: Droid803 on September 04, 2010, 08:06:37 pm
The messages about that is probably command simply assuming that no subspace mishaps would happen (and no shivans followed them into the tunnel), therefore, once they get into the node, they've effectively reached the other system.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 04, 2010, 08:07:47 pm
Actually Command probably just shut down the tolls so they could drive through. Normally subspace jumps between systems take a few minutes because you have to stop and pay. That's why the Lucifer took so long to reach Earth; it takes forever to find enough loose change on a ship that big.
Title: Re: In-mission subspace jump
Post by: Hippo on September 04, 2010, 09:23:31 pm
Anyway, I don't think that's implied at all; it could be a different group of fighters.

A better example IMHO would be the Nemesis nanojumping in INFR1.

What about the Sathanas in Their Finest Hour?
Title: Re: In-mission subspace jump
Post by: Goober5000 on September 04, 2010, 11:14:40 pm
What about the Sathanas in Their Finest Hour?
This.  Yes.  This is an excellent example, because the context heavily favors that interpretation.  Plus, the jump is clearly over a significant intrasystem distance, rather than a few kilometers.
Title: Re: In-mission subspace jump
Post by: Hippo on September 05, 2010, 08:59:26 am
:D
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 10, 2010, 11:27:13 am
Hey guys,
Sorry for bumping a relatively old thread (and diverting the topic slightly), but I need help. I've gotten the jump working, both for the player and the other ships, but as I'm using the never-warp SEXP to prevent the player from actually warping out during the mission, when the player presses Alt-J to initiate the in-mission jump, all the SEXPs fire and it all works, but there's that annoying text at the top of the screen saying "Cannot warp out at this time.", even though technically, the player has jumped.
I noticed that this is remedied if the player is set to have no subspace drive in the ships editor, but then, well, I can't have the player properly warp out once the mission's over. Is there a workaround?
Thanks.
Title: Re: In-mission subspace jump
Post by: Axem on September 10, 2010, 11:34:36 am
If you use the force-warp sexp, it will make your ship enter subspace, even if it has no subspace drive. The only down side is that it cannot be cancelled by hitting escape, so just keep that in mind.
Title: Re: In-mission subspace jump
Post by: Hippo on September 10, 2010, 11:47:53 am
When you want the player to be allowed to jump, use the allow-warp sexp.
Title: Re: In-mission subspace jump
Post by: Axem on September 10, 2010, 12:03:19 pm
But the problem is that if he uses break-warp or never-warp he still gets a "Cannot warp out at this time" message. The only way to not get the message and not warp out if if you check No Subspace Drive. But If you go allow-warp later it won't work because you have no subspace drive!

However force-warp doesn't care and will warp you out anyway.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 10, 2010, 12:13:03 pm
Ah, advice from the man who created Vassago's Dirge, I'm honoured. :D
I actually used one of the VD missions as a reference when making the in-mission jump, so kudos to you!

I actually made a workaround (which fits better with the mission's plot anyway) where the in-mission jump is not triggered by a keypress, but another event. But thanks for the advice, I'll definitely be keeping that in mind next time I need an in-mission jump (which is likely to be soon).
Title: Re: In-mission subspace jump
Post by: NGTM-1R on September 10, 2010, 04:33:42 pm
Well, I hate to break it to you, but there's a game called FreeSpace 1 with a final mission that kind of demolishes that theory.

Subspace is both a dimensional and a non-relativistic weirdness. We have no idea what the traveler's perception of time has to do with an exterior-to-subspace perception of time.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 10, 2010, 04:42:02 pm
Well, I hate to break it to you, but there's a game called FreeSpace 1 with a final mission that kind of demolishes that theory.

Subspace is both a dimensional and a non-relativistic weirdness. We have no idea what the traveler's perception of time has to do with an exterior-to-subspace perception of time.

That's actually a fair point, and would resolve the apparent paradox in the later FS2 missions of Command announcing the arrival of convoy ships in their target system mere moments after node departure.
Title: Re: In-mission subspace jump
Post by: Goober5000 on September 10, 2010, 04:47:30 pm
Indeed.  That is a brilliant point.  Well done good sir. :yes:  I shall integrate it into my fanon henceforth!
Title: Re: In-mission subspace jump
Post by: General Battuta on September 10, 2010, 04:54:51 pm
Hrm. Actually I don't think it works.

In 'Good Luck' the player has followed the Lucifer into the node after it jumped. If node transitions appears near-instantaneous to the outside world then the Lucifer would already have reached Sol while the attack force was still burning to the node.
Title: Re: In-mission subspace jump
Post by: NGTM-1R on September 10, 2010, 05:05:02 pm
Nothing says all nodes have to be equal in those regards either. Travel time for a specific node is probably fixed, but travel time for other nodes does not have to be based upon those previously observed. The Reference Bible made it pretty clear that for all the use of subspace it's still not actually understood.

You happened to get lucky in Good Luck and the Delta Serp-Sol node is slow. After all, if you count both missions the Lucifer takes more than thirty minutes to transit and that doesn't fit with anything we know.

Alternately, by entering the same frame of subspace as the Lucifer you are subject to its subspace-time and not real-time and then we divide by zero and the universe implodes. Or the timeline simply alters to one that makes sense from an external perspective as the universe cleans up the paradox. Either way.
Title: Re: In-mission subspace jump
Post by: General Battuta on September 10, 2010, 05:08:08 pm
The level of complexity required has climbed above what I like in my theories.
Title: Re: In-mission subspace jump
Post by: Goober5000 on September 10, 2010, 05:13:20 pm
Bleh.  I like elegant and simple explanations as well (example: phasing nodes).  This is no longer such. :(
Title: Re: In-mission subspace jump
Post by: Scotty on September 10, 2010, 06:52:46 pm
I think we've all forgotten that gameplay > fluff.  I still like NGTM-1R's theory, though.

Also, when did Batts get back to being a Global Mod?
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 10, 2010, 09:33:43 pm
Damn it, I hate bringing this thread down from its awesome discussion, but I've run into another problem (I'm not sure if it's totally related, but whatever. The jump works fine now, but as the mission is set in a green nebula, after the player jumps, for a few seconds there's no hazy nebula gas floating around, all the player sees is a solid looking green colour before the gas kicks in and appears. Is there a way to fix this, or will I just have to deal with it? It's kind of... I dunno, unnerving or something.
Title: Re: In-mission subspace jump
Post by: Axem on September 10, 2010, 10:26:07 pm
When are you setting set-mission-nebula? I would do it at the same time you're starting to fade back in.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 10, 2010, 10:39:28 pm
The mission is always in a nebula. The player is simply jumping from one part of the nebula to another. There is no change in mission setting.
Title: Re: In-mission subspace jump
Post by: Axem on September 10, 2010, 10:51:39 pm
Could you upload your mission to pastebin? I'd like to take a quick look at it. If you're real paranoid about spoiling your mission, you can PM me a link.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 10, 2010, 11:11:20 pm
I've sent you a PM.
Title: Re: In-mission subspace jump
Post by: Axem on September 10, 2010, 11:36:07 pm
Got it. :) I took a quick play through... and died. :( I'll try it with more determination tomorrow, its sort of late here right now.

But I did take a quick peek in FRED and can't find anything out of the ordinary... my only guess is setting the storm intensity up might be doing something. Try removing it and see if the problem goes away. I'll take a closer look tomorrow.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 11, 2010, 12:34:13 am
Yeah. Seeing as the jump happens towards the end, when testing it you might as well just make yourself invulnerable. Removing the change in storm intensity did nothing, the problem remains. I'll keep fiddling with it, and update you if I find anything.
Title: Re: In-mission subspace jump
Post by: Axem on September 11, 2010, 09:18:57 am
Ok, I was able to reproduce what happened in my own very cutdown mission. It looks like set position in a nebula moves you too far away from the poofs, and the game doesn't realize they're gone until it re-renders them or something. I'm not a coder so don't take that as gospel.

Anyway, I found a work around. Just reset the whole nebula by going mission-set-nebula 0 then mission-set-nebula 1 right after it. It can be in the same event.

Hope that works for you. :)
Title: Re: In-mission subspace jump
Post by: General Battuta on September 11, 2010, 09:33:40 am
Ok, I was able to reproduce what happened in my own very cutdown mission. It looks like set position in a nebula moves you too far away from the poofs, and the game doesn't realize they're gone until it re-renders them or something. I'm not a coder so don't take that as gospel.

Anyway, I found a work around. Just reset the whole nebula by going mission-set-nebula 0 then mission-set-nebula 1 right after it. It can be in the same event.

Hope that works for you. :)

oh you
Title: Re: In-mission subspace jump
Post by: Galemp on September 11, 2010, 09:45:14 am
Subspace is both a dimensional and a non-relativistic weirdness. We have no idea what the traveler's perception of time has to do with an exterior-to-subspace perception of time.

Are you implying that Command and Admiral Shima made it into the subspace tunnel? Because you get messages from both while you're en route.
Title: Re: In-mission subspace jump
Post by: CommanderDJ on September 11, 2010, 09:54:33 am
Ok, I was able to reproduce what happened in my own very cutdown mission. It looks like set position in a nebula moves you too far away from the poofs, and the game doesn't realize they're gone until it re-renders them or something. I'm not a coder so don't take that as gospel.

Anyway, I found a work around. Just reset the whole nebula by going mission-set-nebula 0 then mission-set-nebula 1 right after it. It can be in the same event.

Hope that works for you. :)

You, sir, are a genius. Thank you, that works.
Title: Re: In-mission subspace jump
Post by: NGTM-1R on September 11, 2010, 04:07:13 pm
Are you implying that Command and Admiral Shima made it into the subspace tunnel? Because you get messages from both while you're en route.

...okay I might have been able to come up with a way around Admiral Shima since, y'know, destroyer commanders are probably ex-pilots. But Command, I got nothing.
Title: Re: In-mission subspace jump
Post by: Galemp on September 11, 2010, 04:43:01 pm
Anyway, to steer this topic back on track... how do I lock the controls of the player ship?
Title: Re: In-mission subspace jump
Post by: General Battuta on September 11, 2010, 04:43:57 pm
Anyway, to steer this topic back on track... how do I lock the controls of the player ship?

Player-use-AI is, in my opinion, the best way.
Title: Re: In-mission subspace jump
Post by: Axem on September 11, 2010, 05:10:19 pm
Just remember to make the player clear his orders and play-dead so he won't go off doing something silly like attack hostile fighters.
Title: Re: In-mission subspace jump
Post by: Galemp on September 11, 2010, 06:19:45 pm
Yeah, I've tried a few things and it seems play-dead is the only way to make sure it doesn't drift off to one side.