Recompiling Lua files properly for KOF XIII

126 Views Asked by At

So recently decided to really knuckle down and try to figure out how to mod KOF XIII. The game utilizes Lua files, which are XOR encrypted with the key 0x66, and compiled. Made a Python Script to quickly decrypt them, as well as generate a ,bat that can be used in conjunction with Unluac to view/edit them My problem is for the life of me I can't compile them back. I've tried compiling loads of Lua builds and LuaTools but no matter what I try, the compiled file is scuffed. I'm not familiar enough with Lua to diagnose the problem, so any insight would be massively appreciated Here's a ZIP with the script so far, plus any file I think could help. The real problem is Luac, but as stated, I truly have no idea how to fix it https://cdn.discordapp.com/attachments/587805889331855470/1091406803436314665/KOF_XIII_LUA_ENCODER_stuff.zip

So the skinny is that I expected, upon putting the decompiled file in to luac.exe, for the luac.out to resemble the decrypted file before decompilation. However no matter what parameters i mess with, it seems I lack the knowhow to properly diagnose what part of the process specifically is messing up the output EXAMPLE (https://i.stack.imgur.com/1UXfi.png) (https://i.stack.imgur.com/pa3fl.png)

Oh and one more thing, probably visible from the images but it seems KOF XIII Luas were compiled with 5.1 with int_size of 32-bit if that helps at all

0

There are 0 best solutions below