Telltale Explorer fixed script decompiling for older games

I’ve just released a new version of Telltale Explorer that fixes a longstanding issue – lua scripts in the older games couldn’t be decompiled. This affected most the games released before Sam and Max: The Devil’s Playhouse. It’s now fixed and the scripts in every Telltale and Skunkape game can be decompiled and viewed.

This wasn’t an issue that I was planning to revisit but I was writing an article for Mojo that involved looking at the scripts in Telltale games. I’ve had working script decompiling for post-Devil’s Playhouse games for a long time with modified lua 5.1 and 5.2 decompilers, but the oldest games used lua 5.0 and I just couldn’t get it working. While writing the article I got sidetracked into trying to fix it once and for all and after a lot of hacking, swearing and failure this 18 year old bug was finally squashed. For posterity and myself when I inevitably forget, the changes made to lua 5.0 by Telltale were: the opcodes were shuffled, maxstack was changed to 300 and it was built for floats rather than doubles.

Download it here.

6 thoughts on “Telltale Explorer fixed script decompiling for older games”

  1. This is amazing amazing amazing and amazing!!!!! I have a project with the Telltale Modding Group and we are activating all of Telltale’s debug menus, but we’re stuck on this part of .lua 5.0. Could you share more details on how we can reinsert our modifications? We already have the tools to edit from luaq 5.1 and luaR 5.2, but we were missing exactly the one you have. Could you help us out? Here’s our Discord: https://discord.com/invite/HqpnTenqwp

  2. No problem, I’m just finishing the article for Mojo first, which is actually about different ways to find and enable debug mode, including patching the scripts when necessary.

  3. Hello BennyBoy, thank you very much for responding to us. I’m really happy and I greatly admire your work as a modder and creator of Telltale Explorer. You and your tools have helped me a lot, and I’m sure you’ve helped many others as well. I can only be grateful.

    We have documentation to activate the DebugMenus. We managed to activate almost all from Lua 5.1, but some from Lua 5.2 are still missing. We have a large list of DebugMenus and have been able to understand how it works. Additionally, it’s necessary to also modify the IMAP file. Depending on the game, it’s required to change the button mapping file. There is a very good tool on GitHub that does this: https://github.com/Telltale-Modding-Group/IMAP-Editor

    It’s also possible to activate these on consoles like the PlayStation 3 and other platforms by modifying Lua and the IMAP, which is the button mapping file for the game. Now we are trying to move forward with older games that use Lua 5.0, but we had problems extracting the code. You managed to do it.

    I would really appreciate it if, when you have some time, you could talk to us, comment a bit, or share any method to extract Lua 5.0 from Telltale Games and recompile it. Thank you very much for your attention, and again, thank you for responding so quickly.

  4. Thanks to you and your new version of Telltale Explorer, we managed to activate a Debug Menu. The other Debug Menu, from Tales of Monkey Island. I’ll add a link to an image for you to take a look. This Debug Menu was only possible thanks to your discovery of how to decompile Lua 5.0. Also, the game received an update during its development. According to one of our colleagues, we managed to activate it.

    In their first update, they changed from Lua 5.0 to 5.1 on Monkey Island, so as long as you have that update, it might work that way for some games that support 5.1. It will depend if the game has support for 5.1. If you search the executable in a hex editor and see what version of Lua the game uses, you can find out. Old versions of Monkey Island have Lua 5.0, newer versions have 5.1 and scripts to read 5.0 still. He also posted info on how he got it working.

    If you use the Lua 5.1 compiler method on Tales of Monkey Island, it works. So we just needed to extract the Debug file with Telltale Explorer, edit it, and reinsert it using the Lua 5.2 compiler. And it worked perfectly. I’ll send you a screenshot.

    Unfortunately, this method might not work with all games, maybe only with this one.

    https://imgur.com/a/5ZnzZj3

  5. what a knowledge hehe Well, unfortunately, this method doesn’t work with all versions of the game. It only works on a specific version of the game (GOG). The Steam version isn’t the latest version released, so it doesn’t work with it. We managed to activate it on the PS3, but I had to rewrite a lot of things because there wasn’t any function to use the controller.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.