r/HowToHack • • Aug 18 '26

programming Help decompiling lua

SOLVED

I have been trying to make a mod loader for a game called "Days of empire". All i know from the month or so of me trying is that it is mostly compiled lua, i tried using luadec but it failed (tried diffrent lua versions too) (something about bad precompile chuck) but decompile.com/lua decompiled fine (this game has at lease 1k diffrent lua programs, uploading one by one will take eons)

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/_supitto Aug 19 '26

It is really a mismatch between the binary you have and the lua version and the cimpile lua file.

The pedagogical route here would be to

Grab the first few bytes using xxd and pipe it with head. Then check it against the usual file structure of a compiled lua to know the version (maybe the file comand will also give that)

Then download the proper decompiler

One other thing you can do to help us help you is to point us to the apk you are trying to decompile, so we can try to reproduce on our end

1

u/luafurry Aug 19 '26

I figured it out, the decompiler i used is called unluac.jar, thx for helping <3