Solved Lua

Status
Not open for further replies.

Claire8825

Platinian
Original poster
Dec 4, 2023
7
0
1
24
Hey guys.
I have question.
Decompiled files from .lu --> .lua, everything good, and edited.

But cant compile back to .lu

Any help, or tool?

Thanks.
 

Backshift

Solid & Active Platinian
Oct 10, 2023
53
35
18
32
I'm guessing from your other posts you are targeting "Dark Side of Orbit". I saw you posted in a tutorial thread about games using corona too.

Using this Corona Archiver from github I am going to assume from your post you have unpacked and decompile the .lu files which are compiled lua using luac.

The game is using lua 5.1, if you have the files decompiled and assuming the game is using standard lua stuff, you should be able to compile them back with luac yourself and then use Corona Archiver to repack the files into a resources.car.

Download these prebuilt lua 5.1.4 binaries: https://sourceforge.net/projects/luabinaries/files/5.1.4/Tools Executables/. I did a quick test with: lua5_1_4_Win32_bin.zip and it does recompile, I did not test this in game though.

The process should be something like (using main.lu as an example):

Unpack resources.car: .\corona-archiver.exe -u .\resource.car .\unpacked\
Decompile main.lu: java -jar .\unluac_2023_11_15.jar .\out\main.lu > main.lua
Edit target file
Recompile main.lua (-s strip debug information): luac5.1.exe -s -o main.lu .\main.lua
Replace old main.lu in out directory with newly compiled one
Repack resource.car: .\corona-archiver.exe -p .\out\ resource.car
Add new resource.car to apk/sign apk/install etc
 

CodeJutsu

Platinian
Oct 1, 2023
47
24
8
30
I'm guessing from your other posts you are targeting "Dark Side of Orbit". I saw you posted in a tutorial thread about games using corona too.

Using this Corona Archiver from github I am going to assume from your post you have unpacked and decompile the .lu files which are compiled lua using luac.

The game is using lua 5.1, if you have the files decompiled and assuming the game is using standard lua stuff, you should be able to compile them back with luac yourself and then use Corona Archiver to repack the files into a resources.car.

Download these prebuilt lua 5.1.4 binaries: https://sourceforge.net/projects/luabinaries/files/5.1.4/Tools Executables/. I did a quick test with: lua5_1_4_Win32_bin.zip and it does recompile, I did not test this in game though.

The process should be something like (using main.lu as an example):

Unpack resources.car: .\corona-archiver.exe -u .\resource.car .\unpacked\
Decompile main.lu: java -jar .\unluac_2023_11_15.jar .\out\main.lu > main.lua
Edit target file
Recompile main.lua (-s strip debug information): luac5.1.exe -s -o main.lu .\main.lua
Replace old main.lu in out directory with newly compiled one
Repack resource.car: .\corona-archiver.exe -p .\out\ resource.car
Add new resource.car to apk/sign apk/install etc
You are literally spoiling them, great answer nonetheless as always and really good and short tut
 
  • Like
Reactions: Kylletech1

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,771
15,650
2,120
27
Skyrim
Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
Status
Not open for further replies.