Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Starman01 on December 02, 2006, 03:54:21 pm

Title: Cutscene-SEXP's, still a mystery
Post by: Starman01 on December 02, 2006, 03:54:21 pm
Is anyone here familiar with the cutscene SEXP's ? I created a creditmission (mostly so that I can play the campaign outro correctly), but those SEXP still give me a headache. I tried many cool ideas (in my opinion :) ) but I always failed creating the entire mission because at one point the SEXP didn't worked anymore (i.e. the fade-in fade out stuff stopped working after a camera move  :wtf:) However, I'm confident that they will be fixed sooner or later, if they haven't been already :) My current question is this:

I created that creditmission and display only subtitles with that SEXP. They look like this :

Code: [Select]
-true
--show-subtile
----425
----420
----text
----4500

I used the trial/error method to find a more or less central position of the screen using 1024x768. But now when playing in 1280x1024 of course everything is out of place. But the SEXP-Explanation tells about more values,
and No. 7 is "center horizontally".

But how can I enter value 7, when I don't need/have to enter value 5 "image name" and value 6 "fade in time".
Can anyone tell me how to use/insert  the "center"-values ?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: CP5670 on December 02, 2006, 04:07:30 pm
Yeah, I ran into the same scaling problem with the subtitles a few months ago. It's best to just avoid that sexp and use training messages instead.

I have not had any issues with the fade or camera sexps though. I think there is some problem with those on D3D, but that shouldn't be used at this point anyway.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral Edivad on December 05, 2006, 12:42:10 pm
simple question: does a cutscene-tutorial exist?
for example, is there a way to show, in the cutscenes bars, the dialogues between pilots and their heads?
is there a way to move the camera at such a speed that it will seem to follow a fighter?
thanks
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 05, 2006, 01:15:37 pm
About moving the camera,I have nver tried it but it should be:

set-camera-position
X
Y
Z
time...it should be the time spent to move the camera position from the one actually used to the coords specified in this SEXP.


You're right.There are no cutscene SEXPs tutorials.
At least there should be something that shows the true potential of those SEXPs...
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 05, 2006, 02:49:50 pm

Code: [Select]
-true
--show-subtile
----425
----420
----text
----4500


Code: [Select]
-true
--show-subtile
----425
----420
----text
----4500
----0
----0
----true or false
----true or false

I used it this way in a mission and had no problems, but I'm not sure how it really works ;)

set-camera-position
   Sets the camera position to a spot in mission space  Takes 3 arguments...
   1:   X position
   2:   Y position
   3:   Z position
It doesn't say anything that there is an optional argument where you can put the time in.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: karajorma on December 05, 2006, 02:54:46 pm
I think he's mixing up set-camera-position and set-camera-facing
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 05, 2006, 03:11:54 pm
uh you can add two more datas to set-camera-position and they're both numbers so I guess that the first is the total movement time and the second is the time spent accelerating/decelerating like other cutscene SEXP.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 05, 2006, 03:19:40 pm
And how should the camera move to the new position? Can't really imagine it as it would look really strange.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Scooby_Doo on December 05, 2006, 07:40:12 pm
Could it be possible to create a path for the camera?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Goober5000 on December 05, 2006, 07:54:16 pm
Could it be possible to create a path for the camera?

Definitely possible.  We could define some spline paths for the camera to follow, which could include timing and acceleration information.  Not sure how much work it would take, though.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Starman01 on December 06, 2006, 10:28:17 am
Code: [Select]
-true
--show-subtile
----425
----420
----text
----4500
----0
----0
----true or false
----true or false

Hm, I tried that, but i can't get past the two zero's. After I inserted the sixth operator, I can't use the function "add data" anymore. Anyone knows why ?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 06, 2006, 10:31:26 am
Or you can tie the camera position to the movement of a ship. eg:

every-time
   set-camera-position
      get-ship-x(someship)
      get-ship-y(someship)
      get-ship-z(someship)

Sorry if I use the wrong sexp names there. I don't have the game here to check.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 06, 2006, 11:18:39 am
Code: [Select]
-true
--show-subtile
----425
----420
----text
----4500
----0
----0
----true or false
----true or false

Hm, I tried that, but i can't get past the two zero's. After I inserted the sixth operator, I can't use the function "add data" anymore. Anyone knows why ?
True and False are operators, so you have to use "add operator" for these two. 
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 06, 2006, 02:39:59 pm
Or you can tie the camera position to the movement of a ship. eg:

every-time
   set-camera-position
      get-ship-x(someship)
      get-ship-y(someship)
      get-ship-z(someship)

Sorry if I use the wrong sexp names there. I don't have the game here to check.

It's a good option but this will position the camera at the center of the ship. You could see nothing but pieces of that ship.
Anyway it's ok if used with a Boanerges...
Title: Re: Cutscene-SEXP's, still a mystery
Post by: karajorma on December 06, 2006, 03:06:33 pm
So you just do the same thing but subtract 200m off one of the axes.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Starman01 on December 07, 2006, 09:43:35 am
True and False are operators, so you have to use "add operator" for these two. 

Ah, thanks :) I was afraid to use that because of the "op" standing infront of it. ( I wish I would have known this sooner, it would have saved me fiddling out the positions for nearly 100 textlines  :p )
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral Edivad on December 11, 2006, 02:41:57 pm
other question: is there a way to create a zoom effect (without doing sth like set-fov 45; set-fov 44; set-fov 43..... and so on every second...)

i still can't get the fade in-out to work as I wanted...

@ AdmiralMS: nice signature, I would dream of this too... but to FRED a cutscene (a GOOD cutscene) you have to set waypoints for almost EVERY fighter... i find it much more complicated than normal fredding...(but i like it ;7)
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 14, 2006, 02:57:51 pm
I don't think there is a zoom effect, but this could (and must?) be done by moving the camera. So we need a move-camera sexp ;)

I tried to fred a mission where an invasion through a jump-node takes place while GTVA defends this jump node and the player sees the whole fight in cutscenes, because he is really far away  :D ... didn't look that good but maybe I'll finish the mission later and upload it.

I'm not really sure, but cutscenes seem to look very different when playing them if you use 800*600, 1024*768 or something else...?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral Edivad on December 15, 2006, 10:01:32 am
I don't think there is a zoom effect, but this could (and must?) be done by moving the camera. So we need a move-camera sexp ;)

I tried to fred a mission where an invasion through a jump-node takes place while GTVA defends this jump node and the player sees the whole fight in cutscenes, because he is really far away  :D ... didn't look that good but maybe I'll finish the mission later and upload it.

I'm not really sure, but cutscenes seem to look very different when playing them if you use 800*600, 1024*768 or something else...?

If I move the camera i only get rotations, not zoom. However I achieved a quite good result by coordinating fighters' movements and camera rotation, but i think this will not work with capitals/large ships.

for your mission, i hope you haven't used set-fov... from the player's position! I think the best opportunity cutsecnes offer is to focus the camera on the details of a battle (like to see the bombers when they drop bombs just in front of te camera...  to see a fighter wing that flies at very short distance from a capital, surrounded by enemy fire...)

Another question: is it possible to set the coordinates of a fighter so that it shows loopings,  fast turning....?(to make it like a REAL pilot= ALPHA 1)?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 15, 2006, 05:18:13 pm
When I used camera-rotation the last time it didn't work at all, it was always doing the same... rotating weird around and stopping always after 10 seconds.
And in my mission, the cutscenes show mostly battles between cruisers and corvettes, beams firing, flak and some fighters around them.

Quote
Another question: is it possible to set the coordinates of a fighter so that it shows loopings,  fast turning....?(to make it like a REAL pilot= ALPHA 1)?
Is the fighter AI smart enough to perform like Alpha 1? :rolleyes: Would be very difficult or even impossible in my opinion.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral Edivad on December 18, 2006, 10:40:46 am
When I used camera-rotation the last time it didn't work at all, it was always doing the same... rotating weird around and stopping always after 10 seconds.

yes, you're right I checked im my last freddings, and i actually didn't use the "camera rotation" sexp, but the 2nd argument of the "set camera facing object" sexp= "total turn time" (and probably also the 3rd, "time to spend accelerating/decelerating", but i'm not sure about how it works...).

With camera-rotation the camera starts spinning, as you said, and i don't know how to solve the problem...
It would be useful to hear sth from those who had create these sexps...they should know how to use them...

Is the fighter AI smart enough to perform like Alpha 1? :rolleyes: Would be very difficult or even impossible in my opinion.

but would be great... ;7
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 18, 2006, 03:17:03 pm
yes, you're right I checked im my last freddings, and i actually didn't use the "camera rotation" sexp, but the 2nd argument of the "set camera facing object" sexp= "total turn time" (and probably also the 3rd, "time to spend accelerating/decelerating", but i'm not sure about how it works...).

With camera-rotation the camera starts spinning, as you said, and i don't know how to solve the problem...
It would be useful to hear sth from those who had create these sexps...they should know how to use them...
I think "time to spend accelerating/decelerating" is the time (in ms) until the camera moves with max speed to the object and the time it gets slower before reaching that object.

I tried to use the "camera-rotation" in a mission without any other sexps except "set camera position" and "set camera facing" and could at least figure out what it should do because it basically rotated to the right direction but at the end of it's turn it still moved about a second in a strange way... So either we are using it somehow wrong or it's a bug...  :blah:
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 19, 2006, 05:09:24 pm
Times are in ms....

Anyway,for the zoom,you can use something like this:

every-time(or every-time-argument)
set-fov
<variable>

modify-variable
<variable>
-
   1

or something similar...

We hope someone has intention to create new cutscene SEXPs. They have great potential.

@ AdmiralMS: nice signature, I would dream of this too... but to FRED a cutscene (a GOOD cutscene) you have to set waypoints for almost EVERY fighter... i find it much more complicated than normal fredding...(but i like it ;7)

I don't use a so big number of waypoints. You don't need it unless the camera is close/points to the fighters and you want a more realistic effect.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 20, 2006, 08:55:43 am
Is there a way to get something repeated very often (about 50+ times per second) for about 10 seconds? Somehow every-time doesn't do this that often and so my cutscene looks like jumping through space...  :ick:
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 20, 2006, 09:24:51 am
Nope. You can time repetitions by seconds or by game frames using counter variables, and that's it.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 20, 2006, 09:33:16 am
You can time repetitions ... by game frames using counter variables, and that's it.
And how does this work? I've never heard of it before...
Title: Re: Cutscene-SEXP's, still a mystery
Post by: karajorma on December 20, 2006, 09:37:22 am
Is there a way to get something repeated very often (about 50+ times per second) for about 10 seconds? Somehow every-time doesn't do this that often and so my cutscene looks like jumping through space...  :ick:

Every-time triggers every frame. It should be exactly what you need.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 20, 2006, 09:45:02 am
In pseudo code:

every-time
... modify-variable counter = counter+1
... when counter = <some_number_of_frames>
... ... do what you wanted to do
... ... modify-variable counter = 0
Title: Re: Cutscene-SEXP's, still a mystery
Post by: CP5670 on December 20, 2006, 11:11:11 am
Quote
Is there a way to get something repeated very often (about 50+ times per second) for about 10 seconds? Somehow every-time doesn't do this that often and so my cutscene looks like jumping through space... 

You could do it with a ship moving at a constant speed and checking its distance with the mod sexp, although I'm not sure if that would ever allow it to go above the framerate.

I wish there was a version of is-event-true with a delay specified in milliseconds. That would make a lot of things so much easier.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 20, 2006, 11:59:12 am
Is there a way to get something repeated very often (about 50+ times per second) for about 10 seconds? Somehow every-time doesn't do this that often and so my cutscene looks like jumping through space...  :ick:

Every-time triggers every frame. It should be exactly what you need.
In my missions, it obviously doesn't ... otherwise the camera wouldn't be jumping about 5-10 times/second while having 40 FPS.

You could do it with a ship moving at a constant speed and checking its distance with the mod sexp, although I'm not sure if that would ever allow it to go above the framerate.

I wish there was a version of is-event-true with a delay specified in milliseconds. That would make a lot of things so much easier.
I only need to get it working as fast as the framerate, so this won't help because everyone has another framerate... And getting this for more than 50 times/second together with what I want to use it for will be... somewhat complicated...
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 20, 2006, 05:54:29 pm
The Admiral is actually right. The time between calls of an every-time event does seem pretty arbitrary. I'm not sure if it's every frame exactly. Probably depends on the speed of your computer, how many events you have. It certainly depends on your time compression setting. Bottom line is it can't be trusted with any accuracy. Which could be why they didn't put millisecond timings in.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 21, 2006, 02:17:11 pm
So this means there is no way to get it working properly without changing it to a static camera view  :sigh:
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Goober5000 on December 21, 2006, 11:24:25 pm
The Admiral is actually right. The time between calls of an every-time event does seem pretty arbitrary. I'm not sure if it's every frame exactly.
It is every frame.  The problem is, the number of frames per second varies considerably over the course of a mission, even on high-end systems.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 22, 2006, 05:35:44 am
The Admiral is actually right. The time between calls of an every-time event does seem pretty arbitrary. I'm not sure if it's every frame exactly.
It is every frame.  The problem is, the number of frames per second varies considerably over the course of a mission, even on high-end systems.
It doesn't sound logic because when it is triggered with every frame, why are there many frames between each real execution of the sexp? Am I thinking in a wrong way or ?  :confused:
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Goober5000 on December 22, 2006, 02:06:30 pm
Am I thinking in a wrong way or ?  :confused:
Or what?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 22, 2006, 03:53:46 pm
Am I thinking in a wrong way or ?  :confused:
Or what?
Uhm, a little problem of someone who has only learned english only as a foreign language in school... this "or" has nothing to say (and shouldn't be there as well)  :lol:
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 22, 2006, 03:57:21 pm
I have just completed a mission with the every-time set-camera-facing-object SEXP and works fine. There are no problems.


Uhm, a little problem of someone who has only learned english only as a foreign language in school... this "or" has nothing to say (and shouldn't be there as well)  :lol:

Learn it at school and play games in English. You can't write English well but you understand(almost)everything.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Admiral MS on December 22, 2006, 04:10:44 pm
I have just completed a mission with the every-time set-camera-facing-object SEXP and works fine. There are no problems.
As long as it is only a set-camera-facing-object sexp connected to every-time, I have no problems as well. Using it with set-camera-position (so the camera moves along somewhere) seems to be different.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 22, 2006, 04:21:10 pm
Well I'm waiting for the move-camera and zoom-in SEXPs.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 24, 2006, 06:13:16 am
The Admiral is actually right. The time between calls of an every-time event does seem pretty arbitrary. I'm not sure if it's every frame exactly.
It is every frame.  The problem is, the number of frames per second varies considerably over the course of a mission, even on high-end systems.

So while we're on the topic let me use this as an opportunity to clarify the rules of the game. If I have a series of events, every-times, whens, whatevers. Are they guaranteed to be evaluated in order, one by one, with none being skipped? Because there have been a number of occasions where I've the results of what I have been doing have been based upon the game executing events in order and  I've ended up not getting the result I expected.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Goober5000 on December 24, 2006, 02:15:14 pm
In theory, yes.  In practice, no.  I'm not sure why, but I think that was one of the issues taylor was going to look at post 3.6.9.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Pilot Of The US on December 25, 2006, 12:26:25 am
I've recently started to try and use these cut-scene sexps but I'm having a lot of problems. For one, I can only seem to get the camera to rotate to the right, never to the left no matter what variables I put in. This is probably because I don't understand how "pitch, bank and heading" are handled (I assume they are relative to the camera, but I don't know how to put "go left", in a degree form for use as a heading variable - I even tried negative values).

I also assume there is no rotate-around-object sexp or any follow-waypoints sexp? Because I'm trying to get the camera to rotate around another ship without having that green/red targeting box surrounding it.

So can anyone give me any advise?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 25, 2006, 07:53:35 am
Point the camera at ships or waypoints it's easier.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 25, 2006, 04:40:07 pm
And don't forget that you could have better effects.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: WMCoolmon on December 27, 2006, 02:28:02 am
Well I'm waiting for the move-camera and zoom-in SEXPs.

Hopefully one of the other coders responds better to statements like that than I do, then. I much prefer people to directly contact me if they have a feature request, or at least post it in the SCP forum where a coder can reasonably be expected to see it.

That being said, if there's a general consensus of what needs to be done on the cutscene SEXPs, I'd be willing to spend some time making them more complete, as long as people are still interested in using them in missions.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Pilot Of The US on December 27, 2006, 03:40:22 am
Point the camera at ships or waypoints it's easier.

But the problem is I need a smooth rotating effect from 1 location to another (tracking a ship). Getting the camera to rotate towards the left is the only solution.

Anyone got anything for trying to get a rotating shot around a capital ship without having the targeting box (other than making the player the capital ship).

Ill see if I can start/post in a topic within the SCP forum.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 27, 2006, 05:09:53 am
(tracking a ship).

every-time
... point camera at ship
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Pilot Of The US on December 27, 2006, 06:28:58 am
(tracking a ship).

every-time
... point camera at ship

Well when I said "tracking a ship", the first location doesn't have a ship, the second does. So the camera rotates from the another scene to the ship scene. Will this sexp work?
Title: Re: Cutscene-SEXP's, still a mystery
Post by: IPAndrews on December 27, 2006, 09:09:27 am
You're looking for BSG style pans? It'll never work. Forget it.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: karajorma on December 27, 2006, 11:25:28 am
Make an invisible ship. Make it move in the way you want the camera to pan. Have the camera point at it.

Never tried it but it might work.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Pilot Of The US on December 27, 2006, 11:39:26 pm
hmmmmm bsg, bsg....can't remember how they do their pans. That invisible ship idea might work.
Title: Re: Cutscene-SEXP's, still a mystery
Post by: Mobius on December 28, 2006, 11:54:12 am
you may use get-object-x/y/z and modify the relative coords...

If you coders accept suggestions...I'll make some proposals...