Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: LoneKnight on September 01, 2011, 01:23:38 pm

Title: Playing Cutscenes
Post by: LoneKnight on September 01, 2011, 01:23:38 pm
I'm trying to figure out how to play cutscenes at the end of a mission. I examined the mission file for Clash of the Titans II and the mission ends with a Red Alert, but I can't locate where and when the Player is supposed to designate the cutscene file.
Title: Re: Playing Cutscenes
Post by: Rodo on September 01, 2011, 01:39:33 pm
you mean a video that's supposed to play after the mission ends? (note: cutscene is not the same than intel-animation)

If you want a video inside the mission itself you need to script with sexps the cutscene.
If you want an intel-anim to play after the mission you should check the campaign file or something like that IIRC.
Title: Re: Playing Cutscenes
Post by: LoneKnight on September 01, 2011, 01:54:51 pm
Sorry, I meant one of the pre-rendered videos, such as Hallfight, Supernova, etc, not the in-game FRED camera controlled cutscenes or Command Briefing anims.
Title: Re: Playing Cutscenes
Post by: Jeff Vader on September 01, 2011, 02:00:29 pm
I think you should be eyeing the campaign file, not mission files.
Title: Re: Playing Cutscenes
Post by: niffiwan on September 01, 2011, 09:57:39 pm
For Clash of the Titans II, the cutscene is played before the briefing of the next mission, Apocalpse.  i.e. it's defined as "before the next mission", not "after the last mission". 

As for how the cutscenes are played after Apocalpse - it's hardcoded into the exec, and just all round ugly :D

Mjn.mixael mentioned in this post (http://www.hard-light.net/forums/index.php?topic=76521.msg1539494#msg1539494) that it was possible to play a cutscene after a mission finished, maybe he can help out?
Title: Re: Playing Cutscenes
Post by: mjn.mixael on September 02, 2011, 12:22:52 am
Here is the relevant post. (http://www.hard-light.net/forums/index.php?topic=67952.0) I've tested it and it indeed works. But there is not FRED interface, so you have to add it manually.

It should also be noted that according to the code "$Campaign End Cutscene:" is also a valid type (and works because I've tested it). IIRC, it is called when the end-campaign sexp is called. (same one that ends the FS2 campaign). However, I have also noticed that that sexp doesn't actually end the campaign.. so take your pick.
Title: Re: Playing Cutscenes
Post by: karajorma on September 02, 2011, 12:57:06 am
I really should get around to writing the GUI for that feature. :p
Title: Re: Playing Cutscenes
Post by: mjn.mixael on September 02, 2011, 12:58:14 am
I really should get around to writing the GUI for that feature. :p

I would love you forever for that...
Title: Re: Playing Cutscenes
Post by: karajorma on September 02, 2011, 01:02:50 am
The main issue is getting the SEXP code up and running. Everything else is a piece of cake compared to that. I will get it done eventually as topics like this are kind of upsetting for me. The feature's been in for over a year but surprisingly few people remember it exists.
Title: Re: Playing Cutscenes
Post by: mjn.mixael on September 02, 2011, 01:10:50 am
I only discovered it because of some commit log by Goober stating that "campaign end" type was added. I was like  :wtf: is that? So I looked into it and discovered this handy little feature.. especially handy for a cutscene savvy person like myself!
Title: Re: Playing Cutscenes
Post by: LoneKnight on September 02, 2011, 01:21:57 pm
Okay, so I read through karajorma's thread on implementing this. It's seems straightforward enough.

Code: [Select]
$AI Profile: BURNING HEAVEN

#Cutscenes
$Command Brief Cutscene: intro.ogg
+formula: ( true )
$Briefing Cutscene: endpart1.ogg
+formula: ( true )
$Debriefing Cutscene: bastion.ogg
+formula: ( false )
#end

#Command Briefing

Unfortunately, it doesn't play the files. It doesn't toss up any errors, so I'm thinking that maybe the actual movie files themselves are wrong?

My installed version of FS2 is from CD, and I have 3612, if that makes any difference.

EDIT: Checked the Debug log and the only issue that came up was:

Movie Error:  Unable to open 'intro' movie in any supported format.

EDIT AGAIN: Popped the CD in and it worked like a charm. It just couldn't find the files, which were on the CD. It proves that this works!
Title: Re: Playing Cutscenes
Post by: mjn.mixael on September 02, 2011, 01:52:04 pm
 :wtf:

You still run FSO with the CDs? Dude, head over to fsmods.net and download the cutscenes in OGG and then place your cds safely in the shelf. You shouldn't really need them.
Title: Re: Playing Cutscenes
Post by: LoneKnight on September 02, 2011, 02:47:07 pm
Gotta keep it old school. I still have original FS1, FS1 Demo, Silent Threat, and FS2 CDs. :D

Where do the movies go after they are downloaded?
Title: Re: Playing Cutscenes
Post by: niffiwan on September 02, 2011, 03:25:39 pm
Individual OGG files go into data/movies while the OGG .vp is put into the FS2 base directory.
Title: Re: Playing Cutscenes
Post by: mjn.mixael on September 02, 2011, 03:48:00 pm
Heh, I'm down with having the discs.. I have them too... but you shouldn't need them to run the cutscenes with FSO.
Title: Re: Playing Cutscenes
Post by: karajorma on September 02, 2011, 08:37:51 pm
He doesn't need to download the movies you know! Unless he wants the newer updated ones he can just pull them straight off the CDs.