PDA

View Full Version : Edit EMI's Lua-Scripts


LargoLaGrande
06-05-2009, 11:31 AM
Hi,

does anybody know if there is a possibility to edit the Lua scripts in EMI? I can decompile them using EMI Resource Viewer and a Lua Decompiler, or simply using a newer ScummRev Version, where the decompiler is included.

The next step would be editing the scripts and put them back into the game to change the original source code.

But how do I get the lua-files back into the m4b-packages? :raise:

Any ideas?

LargoLaGrande
06-05-2009, 12:06 PM
I just found this very nice LAB file Creator/Dumper from bgbennyboy (thanks!): http://lucasforums.com/showthread.php?t=108860

Now I theoretically could load Lua-Files into the m4b package. BUT: To edit the lua scripts I have to decompile them (I use luadump, can be downloaded on LucasHacks). To bring them back into the package, I would have to compile them again...

bgbennyboy
06-07-2009, 05:37 AM
Aye you'd have to try and compile them using the correct version of lua for the compiler. From distant memory I think it was 3 or 4. I doubt it'd compile the decompiled scripts anyway. From what I remember they dont decompile to 'true' lua.

There are other Lua decompilers (http://lua-users.org/wiki/LuaTools) though so they might produce more clean Lua code. The only way is to try I suppose.

Serge
06-13-2009, 06:01 AM
Aye you'd have to try and compile them using the correct version of lua for the compiler. From distant memory I think it was 3 or 4. I doubt it'd compile the decompiled scripts anyway. From what I remember they dont decompile to 'true' lua.

There are other Lua decompilers (http://lua-users.org/wiki/LuaTools) though so they might produce more clean Lua code. The only way is to try I suppose.

I can add to that by saying that (also from distant memory - don't have any of my old SCUMMRev resources around) for Grim, the version was something like lua 3.1 alpha.

The decompiler in SCUMMRev 5 (or 3?) was, again AFAIR, written from scratch in Delphi, so not likely to be even remotely correct :-)