cinematic in LoG2 ?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
THOM
Posts: 1266
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

cinematic in LoG2 ?

Post by THOM »

Did anyone ever got a cinematic to work?

John included an unfinished cinematic-script into GrimTK but AFAIK it doesn't do any useful. But how to do something like that?

All I need is some code to show images, play music and fade in/fade out the game-screen.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: cinematic in LoG2 ?

Post by bongobeat »

I use a dialogue box from grimTK (example 3).

At the beginning, the party directly trigger the script, via a hidden trigger plate. The pictures I use are 640*480 (for the most larger) or less.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: cinematic in LoG2 ?

Post by Isaac »

Sure. I worked out a script that played cinematic slide-shows, and supported translations.
https://www.dropbox.com/s/3r1b2pxa20ylw ... u.avi?dl=0

*It needs reworked, and it isn't quite finished; but the premise is simply to display images using the GUI, and for each mouse-click (or fixed delay), display a new one.
One caveat though... GUI imagery means that the text needs to be part of the image; unless there is a way to draw text over top of drawImage(). I didn't find one.

** Note: the Skype notification sound is in the video; so no need to go checking for messages. ;)

*** I wonder of Config.language would be useful to set? Mods could use it if present, and it would survive reloads, and map changes.
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: cinematic in LoG2 ?

Post by minmay »

Isaac wrote:One caveat though... GUI imagery means that the text needs to be part of the image; unless there is a way to draw text over top of drawImage(). I didn't find one.
Um...just call GraphicsContext.drawText() after you call GraphicsContext.drawImage()...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: cinematic in LoG2 ?

Post by Isaac »

minmay wrote:
Isaac wrote:One caveat though... GUI imagery means that the text needs to be part of the image; unless there is a way to draw text over top of drawImage(). I didn't find one.
Um...just call GraphicsContext.drawText() after you call GraphicsContext.drawImage()...
One would think. (I'm not saying it wouldn't work, but...)
I'm going to have to find that map; I'm pretty sure there was a problem created with that when I tried it. I certainly did not want to resort to having a duplicate image set for each language, but that's what I wound up doing. Hence it was shelved for later.
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: cinematic in LoG2 ?

Post by minmay »

I've been drawing text on top of images for years. GrimTK draws text on top of images. I have publicly uploaded mods that draw text on top of images. You are doing it wrong.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: cinematic in LoG2 ?

Post by Isaac »

minmay wrote:I've been drawing text on top of images for years. GrimTK draws text on top of images. I have publicly uploaded mods that draw text on top of images. You are doing it wrong.
Like I said, I think it created a problem for me. My intention going in was always to draw the text on top of the image. I will have to load the map and dive into it again to find out; (I found it tonight).

*The script draws text on the buttons when it builds the menu; drawing text (in and of itself) wasn't the problem; using it where it would have had to appear in the script ~may have been... I don't know [again] yet. :lol:

Update: The map is from last year. There are two versions of the script on the map; one supports drawing text over images, the other is disabled, and possibly incomplete, and does not support overlay text. IRRC, I had wanted to seamlessly mix slides with video, and optionally draw text over both. I'm not going to work on it tonight [it's 4AM here], but my guess is that it might not be possible to draw text over a streaming video.
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: cinematic in LoG2 ?

Post by LordGarth »

So the way to do cinematics in LOG1 is not the way to do them in LOG 2?

Is there a way that came with LOG2 normally?

LordGarth
Dungeon Master and DOOM will live forever.
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: cinematic in LoG2 ?

Post by Isaac »

LordGarth wrote:So the way to do cinematics in LOG1 is not the way to do them in LOG 2?

Is there a way that came with LOG2 normally?

LordGarth
LoG2 uses vp8 encoded videos for its cinematics. These files have the extension .ivf

http://www.grimrock.net/modding/creating-cinematics/

One can make a video of still images (including text), to simulate an LoG1 style cinematic.

**This can also be done in script, using still images (and be a lot smaller in size than a video), but it's a bit more involved.
User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: cinematic in LoG2 ?

Post by LordGarth »

What is the exact code and everything needed to be put into the cinematic folder.

LordGarth
Dungeon Master and DOOM will live forever.
Post Reply