Reading Grim Fandango lua scripts

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
Lexington
Posts: 2
Joined: Mon Aug 19, 2013 2:47 pm

Reading Grim Fandango lua scripts

Post by Lexington »

Hi everyone,

the last days I analyzed the GrimE engine through the source code of the ResidualVM project because I was interested in how certain functions in an adventure game engine are done. Since I'm familiar with C++ and (a bit) lua and was playing all the lucas arts classics I remembered that Grim Fandango used these techniques and I was able to understand/learn a lot from the engine since now.
The thing I wondered about is, if one is able to read the actual lua scripts used to build the heart of the game? I used bgbennyboy's LAB file Creator/Dumper to dump the data files. Now when opening the lua scripts all it shows are strange signs and none of the files are readable. I assume they are encrypted or something?
So I tried to track down the way of the

Code: Select all

dofile("_system.lua");
call in lua.cpp in the engine folder. But it led me somewhere into the modified lua files and at some point I completely lost track what's going on.

I would appreciate any comments/help on this topic since I wasn't really able to find anything useful in the internet.

Greets, Lex
User avatar
somaen
ScummVM Developer
Posts: 376
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

The scripts are compiled, a process which in this case is somewhat reversable, see our residualvm-tools-repos for a tool named "delua".
Lexington
Posts: 2
Joined: Mon Aug 19, 2013 2:47 pm

Post by Lexington »

Thanks for your help..since another decompiler didn't work I thought this could not be the key. Took me a while to compile the tools under windows but it is finally working and I managed to write the Scripts to readable files.
Once again: Thank you.

Greetings, Lex
Post Reply