I've written a small (command-line) tool that will convert Lup files to Lua files and back:
lup2lua (and its
source).
Second, here are my (small) modifications to luadec:
luadec-0.6-mod.
I only changed two things in the original file, and those changes are marked by my name, so you should find them easily. Running the resulting luadec over BuildTurboLasers.lua results in:
C:\>move BUILDTURBOLASERS.LUA buildturbolasers.lup
C:\>lup2lua buildturbolasers.lup buildturbolasers.lua
C:\>luadec buildturbolasers.lua
require("pgevents")
Definitions = function()
Category = "Build_Turbolasers"
IgnoreTarget = true
TaskForce = {{"StructureForce", "E_Galactic_Turbolaser_Tower_Defenses | R_Galactic_Turbolaser_Tower_Defenses = 1"}}
end
StructureForce_Thread = function()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)
ScriptExit()
end
StructureForce_Production_Failed = function(L0, L1)
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
ScriptExit()
end
Yet, running it on larger, more complex lua files will crash the decompiler as usual. I've tried to find out why, but I don't understand the laudec code that well and it seems like more than just a superficial problem.
Anyway, I'll create a lua disassembler over the next days, if that'll help you guys.