GrimEdi - A tool for exploring/modifying Grim Fandango

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

Moderator: ScummVM Team

jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

I've been working on this project in my spare time and thought you guys might find it interesting/useful.

GrimEdi is made from 2 parts:
  • liblab - A library for interacting with Grim Fandango files
  • GrimEdi - A GUI editor interface that uses liblab for exploring and manipulating LAB files
It is completely open source, you can find it on GitHub here. Please feel free to modify it and send me pull requests.

You can extract files from a LAB, import new files and replace existing ones. After doing any modifications you should right-click the LAB file and select "Save LAB" to rebuild to a new file.

They say a picture speaks a thousand words so here are some screenshots:

Font viewer:
Image

Image view:
Image

Model viewer/manipulator/exporter (note I messed with the roll on his headbone here):
Image

You can export models and their textures to .obj format for use in other programs, here is Manny in blender:
Image
P.S. OBj export is new functionality and I'm not sure why it's showing up with that lighting in blender - I'd appreciate if someone could have a look!

You can also view and export animations as GIFs. Here is Manny walking down some invisible stairs:
Image

My favourite feature is being able to listen to the awesome soundtrack on repeat using loop points in iMUSE:
Image

All of this work was done by myself and is in no way feature complete - there are probably a ton of bugs (especially with the custom SMUSH codec).

Currently everything is read-only except for the LAB file structure. Basically any modifications you do in the file tree on the left will be saved when you save a LAB file but any modifications in individual editor windows on the right will not.
The reason for this is basically because I haven't written the codecs for converting back to the specific file types before saving,


To anyone who wants to start using this tool, make sure you have java 1.7 installed, download either the x86 or x64 JAR from GitHub and run it!
x86 download
x64 download

If you have any problems, change requests, etc. then please add it to the issue tracker in GitHub here.

I hope you guys enjoy!
Last edited by Guest on Wed Oct 15, 2014 10:53 pm, edited 2 times in total.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by JohnnyWalker2001 »

WOW! Undoubtedly this would be an incredible help to Grim Fandango Deluxe, but also to anyone wanting to just explore the game's assets. Again: WOW!
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

I was going to post this in that category as well but the forum rules stated no cross-posting and this forum has greater visibility.

Thanks for the enthusiastic response! It makes it worthwhile releasing this stuff knowing that it will be useful to someone :)

P.S. I've just released a small update to change angle controls in the model view to be radial instead of a slider - the links in the main post should always point to the latest version.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by JohnnyWalker2001 »

Do you have links to any executables? It's great that it's in Github, but it would also be great just to be able to download and play with :)
User avatar
somaen
ScummVM Developer
Posts: 376
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by somaen »

What license is the source under? Could I suggest adding a LICENSE-file to the repos (see our repos for an example if there's multiple), so it's clearer
to anyone wanting to contribute or reuse what the terms are?
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

@JohnnyWalker2001: As it's made in java, the executable format is .jar - it doesn't compile to native code. If you have java installed you can just download the jar I linked to in the main post, double-click it and run on nearly any operating system.

@somaen: It's GPL v3, the license attribution is included at the beginning of each source file, but you're right - it would make sense to have a separate LICENSE file.

I'm working on the costume decoder at present so I'll try and get that done before adding the license file, if not I'll have to stash and merge which is difficult when you're not too familiar with git :D
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by JohnnyWalker2001 »

Ah! Doh. Sorry for not noticing. Can't wait until I find the time to play around with it!
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by JohnnyWalker2001 »

Not sure what I'm doing wrong, but I can't see the 3D renders?

Image
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

Hmm that's very odd. Apologies this has happened, I only ever tested it on my system.

In order to help me diagnose the problem, could you possibly try running the program from the command prompt?

Just start the command prompt, use "cd" to get to the directory with the jar file (e.g. 'cd "C:\Users\Johnny\Downloads"') and then run:

Code: Select all

java -jar grimedi.jar
Then when you try and open a model file you should hopefully get some output in the command window which will help me to find and fix the problem.

Let me know how you get on!
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by Nitrus »

Sorry to cut in on the debugging you guys are doing, just wanted to say that this is amazing! Good job!

I also started doing something like this a while back, but I got stuck on the initial rotations, Yaw/Pitch/Roll some 3do models have (like the Gatekeeper and Meche when she's first in Manny's office), so I dropped it. Glad to see someone did a better job than me!

Cheers!
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

Hi Nitrus, thanks a million! It means a lot getting positive feedback for this :)

It's very possible that I might not have worked around issues like that if they are edge cases - this really was just a hobby project as I've always been interested in game engines and Grim Fandango is one of my favourite classics.

Thanks again, feel free to hack away at the source code if you find any problems :)
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by Nitrus »

No problem! :)

Seems I got the same issue as JohnnyWalker2001:

Code: Select all

[PATH TO GRIMEDI]\Grimja-master\grimedi\release>java -jar [PATH TO GRIMEDI]\Grimja-master\grimedi\release\grimedi.jar
java.lang.UnsatisfiedLinkError: 
C:\Users\[MY_USERNAME]\AppData\Local\Temp\jogamp_0000\file_cache\jln4038577623482544712\jln1144747327218483508\gluegen-rt.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:575)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:96)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:459)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:388)
        at com.jogamp.common.os.Platform$1.run(Platform.java:209)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:120)
        at com.sqrt4.grimedi.ui.component.ModelRenderer.loadGL(ModelRenderer.java:388)
        at com.sqrt4.grimedi.ui.component.ModelRenderer.setModel(ModelRenderer.java:106)
        at com.sqrt4.grimedi.ui.editor.ModelView.onNewData(ModelView.java:257)
        at com.sqrt4.grimedi.ui.editor.EditorPanel.setData(EditorPanel.java:34)
        at com.sqrt4.grimedi.ui.MainWindow$5.run(MainWindow.java:269)
        at com.sqrt4.grimedi.ui.MainWindow$4.run(MainWindow.java:185)
Should be obvious, but I'm running 64bit Windows 7. My JRE could be x86.

Got this too, could this be an issue?

Code: Select all

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

Ah okay, yes the problem here is that you're using the 32-bit JRE and for some reason it's trying to load the 64-bit DLL. I'm not sure why as the 32-bit DLL is included and would probably load fine, but that's java for you!
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by jlaw90 »

Ah no my apologies, it seems that the way I'm packing the jar file means the binaries are overriden by the 64-bit versions. I guess I'll have to change the build process to produce 32 and 64-bit JAR so that it can work for everyone.

Thanks for helping me debug this Nitrus.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Re: GrimEdi - A tool for exploring/modifying Grim Fandango

Post by Nitrus »

In the meantime, I downloaded the 64bit java, and ran it like this through cmd:

Code: Select all

>"C:\Program Files\Java\jre7\bin\java.exe" -jar [PATH_TO_GRIMEDI]\grimedi.jar
...and it worked. Could be made in a shortcut :)

EDIT: Man the music is beautiful, seamlessly loops too!
EDIT2: There exists a second page to this thread! Posting this because I myself rarely look down at the page numbers -.-
Last edited by Guest on Wed Oct 15, 2014 10:59 pm, edited 1 time in total.
Post Reply