Nombre de messages : 21 Age : 29 Date d'inscription : 19/10/2010
Sujet: .lub to .lua possible? Mar 10 Juin 2014, 00:58
Worms Ultimate Mayhem has their .lua scripts in .lub format (which a working compiler to make scripts for WUM was included with Worms 4 Mayhem, luckily!). Anything on reversing this though? The reason the compiler only is not acceptable, is become some changes were made to the files since W4M, and a few scripts (like stdvs) will break if using the one from W4M. I did some searching, and there is a program opposite of the compiler (luac.exe) called luadec out there, and it does decompile/convert .lub files to .lua, but unfortunately it doesn't work for Worms, it said it has a bad header. Since the program is open source, any chance someone can make it compatible for Worms? I would myself, but I suck at programming (I've tried before...).
Kaje aime ce message
Kaje Membre
Nombre de messages : 2 Date d'inscription : 12/03/2013
Sujet: Re: .lub to .lua possible? Ven 29 Oct 2021, 08:45
I hope someone could take a look at this again. I think Team17 probably modified something in the luac compiler (it is open-source I believe), or the compiled .lub version is not matching the version luadec (the decompiler) tries to decompile, hence the bad header error.
The decompiled output looks a bit odd though. It luckily all has the debug info and variable names, so there's that, but I couldn't get the code to recompile back to .lub using the same luac compiler. It returns some sort of syntax error.
Idaho Membre
Nombre de messages : 1037 Age : 29 Localisation : Haute-Marne Date d'inscription : 02/01/2009
Sujet: Re: .lub to .lua possible? Mer 23 Fév 2022, 23:09
Fireworm a écrit:
Worms Ultimate Mayhem has their .lua scripts in .lub format (which a working compiler to make scripts for WUM was included with Worms 4 Mayhem, luckily!). Anything on reversing this though? The reason the compiler only is not acceptable, is become some changes were made to the files since W4M, and a few scripts (like stdvs) will break if using the one from W4M. I did some searching, and there is a program opposite of the compiler (luac.exe) called luadec out there, and it does decompile/convert .lub files to .lua, but unfortunately it doesn't work for Worms, it said it has a bad header. Since the program is open source, any chance someone can make it compatible for Worms? I would myself, but I suck at programming (I've tried before...).
I've read somewhere that the PS3 version of Ultimate Mayhem contains uncompiled versions of the LUA scripts, you could try to find it and work with that
Edit: There, I found where I read this, it was on the cutting room floor, this is what it says exactly:
Citation :
In the Windows version of Ultimate Mayhem, the scripts are compiled as .lub files, but the uncompiled .lua version of the .lub files can be found in the PSN version of the game which was released 5 months later, and the program that was used to convert the files to .lub, luac.exe, was left behind in the Worms 4 Mayhem scripts folder.
So not only that but you also have a compiler at hand to compile the scripts easily...