Custom video with editor ?

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!
Post Reply
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Custom video with editor ?

Post by Rougecorne »

Hello all :)

It's possible to insert custom video (.avi) in the editor ?
For exemple : The intro cinematic, and the ending cinematic.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Custom video with editor ?

Post by Skuggasveinn »

Yes

you use GameMode.playVideo(filename)
where file name is the path inside your mod_asset folder to your video.
The video must be encoded with VP8 (see http://en.wikipedia.org/wiki/VP8) , the last time I checked the beta version of handbrake could encode into VP8 (see https://handbrake.fr)
Videos do not play inside the editor, if you want to play the videos from the original game you need to point to them (I don't know the filepath or filename)

if you leave GameMode.playVideo outside a function it will play when you start your dungeon from the game.
You can also nest GameMode.playVideo inside a function and call that if you want to play cutscenes during the gameplay itself, and you can call GameMode.completeGame(filename) for the ending.

Hope that points you in the right direction.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Custom video with editor ?

Post by Rougecorne »

Wow, that's perfect !
Thank you :) !

I try that tonight :)
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Custom video with editor ?

Post by Rougecorne »

Mmm, i try that but it's not work :/

I try with this script:

Code: Select all

function intromovie()
	GameMode.playVideo("Mon film2_Encode")
end
User avatar
Phillip_Lynx
Posts: 45
Joined: Wed Oct 22, 2014 10:17 pm

Re: Custom video with editor ?

Post by Phillip_Lynx »

Rougecorne wrote:Mmm, i try that but it's not work :/

I try with this script:

Code: Select all

function intromovie()
	GameMode.playVideo("Mon film2_Encode")
end
do you get an errormessage?

So blind I would guess 2 things :). First, grimrock do not like the SPACE and second, you have to add the file-extension (GameMode.playVideo("Mon film2_Encode.avi")).
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Custom video with editor ?

Post by Rougecorne »

Mmm, it's not .avi, when i convert my video for VP8, i just have:

Monfilm2_Encode.fichier (In french ^^)

I encoded video with this website:

http://firefogg.org/make/index.html (You need Firefox). And then, i choose "WebM (VP8)".
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Custom video with editor ?

Post by Rougecorne »

Mmm, i try to make "MonFilm2_Encode.WebM", but when i test in-game (not with the editor), i have this message:

MonFilm2_Encode.WebM : The file do not exist.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: Custom video with editor ?

Post by msyblade »

You need to type the path. ie: "mod_assets\cinematics\movie.avi"
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
Rougecorne
Posts: 34
Joined: Wed Oct 29, 2014 1:52 am

Re: Custom video with editor ?

Post by Rougecorne »

I have this message:

Invalid escape sequence near "mod_assets"

function intromovie()
GameMode.playVideo("mod_assets\cinematics\Monfilm2_Encode.avi")
end
Post Reply