[Help] Continuing Cinematic Troubles (SOLVED)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
3Dartwork
Posts: 10
Joined: Thu Oct 11, 2012 4:28 am

[Help] Continuing Cinematic Troubles (SOLVED)

Post by 3Dartwork »

EDIT: After spending the entire week trying to figure out WHAT IN THE WORLD IS WRONG with the "File Not Found" lua files even though they are RIGHT there in the folder it says it can't find it in......I discovered the solution.

I purchased Legend of Grimrock on GoG.com. Unless you download their downloader and turn the automatic updates on, you will never know there is an update. I regret not buying LoG on Steam. I log into that far more, and it's all automatically set up to download patches.

There are no "patches" to update with the GoG version that I could find. I had to re-download the 456 MB file and install it from scratch. I had downloaded setup_legend_of_grimrock1.0.0.1.4 from GoG. Meanwhile, in the past week (after the Editor launch) there was another patch that brought the setup file to 1.0.2.15

That's all it took. I would have NEVER known this had I not taken the files to work and had to download the game there.

Bottom Line: LoG will load your custom made games with version 1.0.0.1.4 but it will NOT run the cinematics. The 1.0.2.15 version will run the cinematics. (Below is the rest of the crap I had left)
SpoilerShow
For the past 3 days I have been reading these forums, referring to LoG's how-to guide on cinematics, and nothing has worked. No matter what file name I have or path I choose, I always get some kind of "file not found". I want to make a custom intro and ending, but nothing would work without crashing to the "file not found." So I literally copied and pasted the script found on the How-To page along with the script entity in-game triggered by a hidden pressure plate at the end. Still crashes! Here's all the info I have:

Image File Prep:
First I created a tga file for the ending named "my_outro.tga." It is at 1024x512 as I read in one thread on here that is what it should be (not sure why, resolution isn't that in game, I don't believe). Next I saved it as a .dds file named "my_outro.dds". This I did by installing nVidia's DDS plugin. However, RGBA8 is not one of the choices. I chose DXT5 ARGB 8bpp. There is nothing with A8 at the end like RGBA8. I made sure Generate Mipmaps was checked. I put these files in mod_assets/textures/cinematic/outro because I saw that in a thread on these forums. In a previous attempt, I tried putting it in the mod_assets/cinematics folder, but it did the same "file not found."

Sound File Prep
I took an mp3 and converted it to 128 bit .ogg file and named it "ending.ogg." I put these files in mod_assets/sounds.

LUA Prep
I gave up on an intro and just concentrated on an ending because both were giving problems. I want to get one working right. Here is my ending lua taken directly from How-To page and changed only the pathnames:

-- simple one image cinematic
enableUserInput()
startMusic("mod_assets/sounds/ending.ogg")

-- show the image
showImage("mod_assets/textures/cinematic/outro/my_outro.tga")
fadeIn(2)
sleep(4)
fadeOut(4)

I then named the file myending.lua and saved it in mod_assets/textures/cinematic because, again, I saw it in a thread in these forums. I also tried putting it in the mod_assets/cinematics folder, but it didn't work either.

Script Entity
On my final level I have a pressure_plate_hidden that is connected to a script entity. In the script entity I have the following:

function endgame()
completeGame("mod_assets/textures/cinematic/myending.lua")
end

Having said all that, when I load the game, the following error occurs:
File not found: mod_assets/textures/cinematic/myending.lua
stack traceback:
[C]: in function 'error'
[string "CinematicMode.lua"]: in function 'enter'
[string "FSM.lua"]: in function 'setState'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk

What in the world am I doing wrong? This shouldn't be this complicated or difficult just to run a non-animated image and flash some text on the screen.

This is what I want. I want an intro with text and an image on the screen with custom music playing, and I want an ending image with text on the screen and another custom song playing.

EDIT: I put the lua file back in mod_assets/cinematics per the How-To page, but it doesn't do any good.
Last edited by 3Dartwork on Fri Oct 12, 2012 1:25 am, edited 2 times in total.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Help] Continuing Cinematic Troubles

Post by Komag »

I haven't delved into cinematics yet, but I did dabble a tiny bit and got a custom image showing for an "intro" and "ending", no custom sound or text yet.

- find a photo online to test with
- load it into GIMP 2.8 (maybe the best free image editing program)(I have a GIMP DDS plugin)
- add an alpha channel with "Layer" - "Transparency" - "Add Alpha Channel"
- "File" - "Export", then select .dds in the lower "Select File Type" (click on the + to expand), then click "Export"
- in the "Save as DDS" window, there are a few settings:
Compression: None works, but the file will be large. I had luck once with "BC3 / DXT5", but another time it failed, not sure why. other DXT5 options may work, I haven't tested them
Format: I used RGBA8, but I have to select this first before the compression because it gets greyed out.
Save: greyed out, no changes made
Mipmaps: Generate mipmaps
Advanced Options: no changes made
- After saving the new DDS file, copy/move it to a folder within your mod_assets folder. It doesn't matter where (I put it in mod_assets/textures/cinematic)
- Open/create a text file named intro.lua within the mod_assets/cinematics folder, with contents:

Code: Select all

enableUserInput()
startMusic("assets/samples/music/intro.ogg")

showImage("mod_assets/textures/cinematic/MYTEXTURENAME.tga")
fadeIn(2)
sleep(4)
fadeOut(4)
- save the intro.lua file
- open your mod in the dungeon editor, select "File" - "Export"
- select "File" - "Back to Game"
- from main menu, select Custom Dungeon and choose your mod

I found it easier/faster to test the intro because it attempts to play it immediately when starting the dungeon
Finished Dungeons - complete mods to play
3Dartwork
Posts: 10
Joined: Thu Oct 11, 2012 4:28 am

Re: [Help] Continuing Cinematic Troubles

Post by 3Dartwork »

Hm. Then I am at a loss. I tried exactly what you did first with the exception that I use Photoshop with nVidia's DDS plugin instead of GIMP. Otherwise I put the file where you did and the lua file where you did. I copied the script you used.

When I load the exported game, it just goes into the game and even gives the silly "New to the game? Perhaps a tutorial will be great."


So I guess I just have a huge bug or I'm completely ignorant on what I'm doing. It's frustrating how the How-to section really doesn't cover cinematics very well because following them *to the letter* doesn't work.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Help] Continuing Cinematic Troubles

Post by Komag »

So I looked again, the error you are getting seems to just be it can't find the file.

Are you using the folders within your Documents/Almost Human/Legend of Grimrock/Dungeons folder?

Is it possible you are working on more than one dungeons and put the lua files into the wrong dungeon name subfolder?

can you maybe make a screenshot of your folder structure?

Is there a chance your folder or file permissions are the culprit?

I'd like to help you get this working. It works for us pretty easily, so I'm guessing it's some small mistake (we all make them sometimes!) that hopefully we can nail down and fix
Finished Dungeons - complete mods to play
Lilltiger
Posts: 95
Joined: Sun Sep 16, 2012 1:12 am

Re: [Help] Continuing Cinematic Troubles

Post by Lilltiger »

Are you sure you are using the correct assets folder for your specific mod?
Argh Komag beat me to it ;)
3Dartwork
Posts: 10
Joined: Thu Oct 11, 2012 4:28 am

Re: [Help] Continuing Cinematic Troubles

Post by 3Dartwork »

I'll take a screenshot when I get home for lunch in a couple hours.

But last night, as I saw the error message, I was looking directly at the folder. The paths were identical. In every way, shape and form. Path name, file name, etc.

I only am working on one dungeon. It is, by default, in my user/*name*/Documents/Almost Human/Legend of Grimrock/Dungeons.

I'm not getting an error for the Intro. In fact, I have never gotten anything. No error, but no cinematic either using the method Komag used. So I'm at a loss really on that because the intro cinematic isn't getting an error, so it's not finding anything wrong. However, it's not loading it either at all - just going directly to the game (this is after exporting and playing in the game itself).

The error comes from the ending. I have posted my scripting entity from in-game that triggers the error as well as my lua for the ending.

I'll take screenshots of my entire file structure from /Dungeons/ on into the mod_assets folders. I have not added any folders except inside /texture/ I had to add /cinematic/intro and /cinematic/outro as it seemed many people on here were putting the dds files in there.

Edit: My user is the administrator. I run the computer as an admin and I am the only one who uses the computer.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Help] Continuing Cinematic Troubles

Post by Komag »

here are shots of my setup:
(the pics are wide and may get cut off by the forums, you can right-click and "view image")

Image

Image

Image

Image

be careful with the spelling of cinematic vs cinematics, and be sure the paths written inside the lua files match the real file locations.

If all your files are absolutely positively in the correct place, one other thing I can possibly think of is that your lua files are not the correct format. I created them with regular old "notepad", and then just renamed them as .lua

Depending on your Windows setup, it's possible that windows is automatically renaming them back to .txt, such as intro.lua.txt. You'll want to have extensions turned on: under "Tools" - "Folder Options", make sure "Hide extensions for known file types" is NOT checked. Also, I've set .lua to be associated with notepad, so they just open up when double-clicking on them.
Finished Dungeons - complete mods to play
3Dartwork
Posts: 10
Joined: Thu Oct 11, 2012 4:28 am

Re: [Help] Continuing Cinematic Troubles

Post by 3Dartwork »

That last part about Windows converting back to a txt file even though I type "intro.lua" may be the issue. My .dds and .ogg extensions are visible, but not the txt files, which I made through Notepad as well. I'll try that and see if it's the problem.

Thank you for your help. Looking at your path structure, I know mine matches. I also keep all letters lower case as well. I've checked and rechecked over 10 times on spelling and had two others check spelling.


I am hoping that the issue is the conversion back to txt file. That will be wonderful as I am worried if it's not, the problem may be more complicated than I want to mess with.
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: [Help] Continuing Cinematic Troubles

Post by Isaac »

Komag wrote:be careful with the spelling of cinematic vs cinematics, and be sure the paths written inside the lua files match the real file locations.
And Windows is case insensitive ~but lua is not.
3Dartwork wrote:That last part about Windows converting back to a txt file even though I type "intro.lua" may be the issue.
Notepad has the option to save as 'txt' or as 'all files' (meaning whatever you type ~extension or not. You should save as 'All Files', and type the '.lua' extension).
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Help] Continuing Cinematic Troubles

Post by Komag »

the file types is almost certainly the issue then, and if so, this thread may help any others who come across this problem in the future, so your working through it will be of future benefit!
Finished Dungeons - complete mods to play
Post Reply