Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Sirbomber on November 14, 2005, 08:41:02 PM

Title: Movies?
Post by: Sirbomber on November 14, 2005, 08:41:02 PM
So, how could I make Outpost 2 play the movies/avis at if you win/lose the mission?
And just out of curiosity, do movies work at the end of multipalyer missions?
Title: Movies?
Post by: Betaray on November 14, 2005, 09:03:09 PM
movies do not play at the end of multy missions, but you may be able to add a trigger to do so

this is kind of a stupid question, but do you have the movie files in the right folder? cause its kind of obvious that if you dont than the movies wont play and it will skip directly to the score report
Title: Movies?
Post by: Hooman on November 15, 2005, 12:59:56 AM
I think this may have been more in reference to playing custom movie files when a mission is complete.

I'm not sure how it works exactly, but I suspect the names are hardcoded, so you'd have to replace the original movie files. Maybe not, but it would certainly work if you did it. Also, I don't think the game really supports playing movies after a multi game. You could perhaps trick it though. I've tricked the game into thinking a colony game was a multi game, and it gave the self destruct option, and basically behaved in every way as a multi game, except without the other players. What you do is just change the DescBlock entry describing the level type after the game has loaded the level. I guess if you set it to some campaign value right before victory or failure, it'd probably go to a movie sequence.  
Title: Movies?
Post by: Sirbomber on November 15, 2005, 02:28:34 PM
Hmm... Interesting. So, other than that, no real way to specify a movie to play at the end of a level?
Title: Movies?
Post by: Hooman on November 15, 2005, 03:40:22 PM
None that I've seen. There is certainly no exported functions to handle it. You'd either need a cheap hack, like replacing the original movie files and changing the game type to single player, or you'd need to do some serious hacking. It'd probably require code overwrites to do what you want. Code overwrites can get pretty sick btw.

So yeah, in short, there is no good way to add custom movies.
 
Title: Movies?
Post by: Leviathan on November 15, 2005, 04:48:54 PM
Or play the current ones?
Title: Movies?
Post by: Betaray on November 15, 2005, 05:00:32 PM
playing the current ones are easy

and swapping the movies shouldnt be hard, just do it the way you can swap music and sound files, just make sure its the same file type and name
Title: Movies?
Post by: Sirbomber on November 15, 2005, 05:40:13 PM
Playing the current ones, and I don't mean turning on "play movies"...
Title: Movies?
Post by: Hooman on November 15, 2005, 05:52:44 PM
Are you looking for sample code that will get multiplayer levels to try and play movies like single player campaign missions do? I could probably go into some detail on getting that behaviour. There is a simple way that would affect the way multiplayer works (researhing speed, quit/surrender options). Then there is a more complicated way where the only effect is the after game menus, etc. Although, I'm not so sure about the side effects of doing this are. You might find yourself continuing on into a later campaign mission.  :unsure:
 
Title: Movies?
Post by: spirit1flyer on November 15, 2005, 06:10:19 PM
multiplayer campaign?  sounds crazy :P    
Title: Movies?
Post by: Hooman on November 15, 2005, 06:16:22 PM
Umm no. I meant after a multiplayer game, it might go back to a victory screen and a briefing for the next single player campaign mission. I'm not sure what effect tricking the game would have on post game dialogs. (dialogs = windows, etc.)

By that point, the network connection would have been terminated, and there would be nothing linking the players. They'd have to go back to the multiplayer menus to reconnect. Which of course means leaving the single player campaign, which you never started, but somehow ended up at a menu for (possibly). It all depends on how the game goes from one level (in the campaign) to the next. I don't know if it's based on level data, or hardcoded into the campaign menus. If it's based on level data, then tricking the game engine by changing level data (to make it seem like a campaign mission was played, and thus to show the movies) will also change how the game tries to continue on with more levels.

 
Title: Movies?
Post by: Stormy on November 15, 2005, 07:04:40 PM
oh boy, :) Maybe you might need some cutscenes? :P :P :P

(raises hand) :lol:  :ph34r:

I'll think about it sometime :P Maybe (if you need cutscenes that is :P)

stormy :op2:
Title: Movies?
Post by: Leviathan on November 16, 2005, 02:09:23 AM
the code to play a movie at the end of a mission.
Title: Movies?
Post by: Sirbomber on November 16, 2005, 03:00:10 PM
All I asked was how to make maps play the cutscenes, and now I've got beta saying turn on Play Into AVI/etc (and probably thinking I'm a n00b) and stormy trying to show off his stupid blender again!

And I still don't think I know how to do it!
Title: Movies?
Post by: Betaray on November 16, 2005, 03:19:57 PM
well from what I get is, I dont think we know how to make new campains play movies at the end, of corse I could be wrong there, and I'm pretty sure we dont know how to make multy games play them

even if they could, why? once the game is over you close op2 so you can talk about it on IRC

and I dont think your a n00b, youve got too many posts to be a n00b lol
Title: Movies?
Post by: Sirbomber on November 16, 2005, 04:16:58 PM
Why? Because I can, that's why! You can't have the full OP2 experience without watching your base get raped by lava or infectious disease while you do or do not run away!!!
Title: Movies?
Post by: Betaray on November 16, 2005, 05:03:46 PM
oh true, you tralking about the senerio where you run away from the lava/blight, yea vidios would be cool for that

no idea how to do it though
Title: Movies?
Post by: Hooman on November 16, 2005, 06:52:41 PM
As I said earlier, you can try changing the Descblock entry. The one that specified the level type. Instead of Colony, MultiLastOneStanding, etc., you can set it to a positive number (the campaign mission number). If you want the level to still be a colony game, then keep the definition for DescBlock as Colony where it is declared, but change it in InitProc to a positive number.
 
Title: Movies?
Post by: Sirbomber on November 16, 2005, 07:45:23 PM
Alright, but how would I do that? Copy/past the descblock info into initproc and change it to Colony12 instead of the normal gametype?
Title: Movies?
Post by: Hooman on November 16, 2005, 10:08:52 PM
Code: [Select]
DescBlock.missionType = 1; // Or whatever mission number works best

Stick that line somewhere in InitProc. Leave the normal DescBlock definition alone. That should ensure the level loads right, but treats the game type differently after the level has started.
 
Title: Movies?
Post by: Sirbomber on November 17, 2005, 05:37:29 PM
Whatever I type always gets me the same thing: Eden evac scene when I win, gives me the Save/Continue screen, followed by Colony Game Score Screen. When I lose: no movie, kicked back to main menu when I lose. Unless I set it to one of the multiplayer game values, then I get what you'd expect to get after a multiplayer game. I even set it to 100000 and nothing different happened!  :blink:  
Title: Movies?
Post by: Hooman on November 17, 2005, 05:51:54 PM
Hmm, that is a little odd. Not quite what I expected for all of it, but I guess for some of it.

I was wondering if the mission number would correspond to which movie was played. I know the game reuses the same movie a number of times, could it just be luck? Or did you try all values from 1-12? I don't know what controls which movie is played, but I would have guessed it was based on the mission number.
 
Title: Movies?
Post by: Sirbomber on November 17, 2005, 05:54:40 PM
I tried 0,1,2,3,4,11,12. Then I got bored and fiddled with some negative values. The demos are interesting. It played the movie at the end, but in game there weren't any messages. They were only typed out in the message window, no voices. And I tried it on multi and we dced at start. Kinda thought that'd happen though.
Title: Movies?
Post by: BlackBox on November 17, 2005, 05:58:49 PM
I have an idea. Try setting it back in DllMain, on DLL_PROCESS_DETACH.

Maybe it shows the video before it unloads the DLL.
Title: Movies?
Post by: Hooman on November 17, 2005, 05:59:56 PM
Wow, I wouldn't have expected a disconnect in multi. So much for my bright idea.  :unsure:

Aren't the first 4 eden missions all evac ones? And is the player in your level also Eden? What if you set the player to Plymouth? This is starting to seem like a long shot here. :(

Edit: Oh hey Hacker, that's not a bad idea. Maybe even throw in a MessageBox call just to be sure when it unloads. ;)
 
Title: Movies?
Post by: Sirbomber on November 17, 2005, 06:11:43 PM
I'm surprised it doesn't work like the playlists. Just set the one you want to play nad poof.
On a side note, uh, how do you get THEM to work?
Title: Movies?
Post by: Hooman on November 17, 2005, 06:19:33 PM
Playlists?

As for the thing about just setting which movie to play, it seems a fair bit got hardcoded into the game. It would have been nice if more of it relied on supplied data.

I could go into some detail on the sound system if that's what you're asking, but it sounds like a topic for a new thread.
 
Title: Movies?
Post by: Sirbomber on November 17, 2005, 06:20:32 PM
TethysGame::SetMusicPlayList(int numSongs, int repeatStartIndex, enum SongIds *songIdList);

But yeah, another topic. So look for me over there.
Title: Movies?
Post by: Hooman on November 17, 2005, 06:31:36 PM
Well, I was just talking with Hacker. We both seem to be doubting the DLL_PROCESS_DETACH idea will do anything now. The memory that is being modified is within the address space of the DLL, and it gets unloaded right after DllMain is run with DLL_PROCESS_DETACH, so there wouldn't be a chance to read the modified memory. At best the idea should do nothing. Oh well, doesn't look like there is a good way of controlling which movie is played. :(
 
Title: Movies?
Post by: Sirbomber on November 17, 2005, 06:36:41 PM
Oh well. The movie isn't the important part, it'd just be a nice effect.
And if people want it, they can just go and play MEF.avi if they win (since MPF sucks) or MEBF.avi if they lose. (since MEPF sucks too)