Hi everyone,
I successfully extrcated the files and decompiled the lua bytecode.
I also found a newer branch of luajit-decompiler, wich doesn't produce errors when working with "false" or "null" as arguments (or whatever).
The new branch:
https://gitlab.com/DorentuZ/luajit-decompilerMy goal is to modify the lua script, recompile it, encode it with l64 again and repack the GAR file.
To do so i used luajit and a little algorithm to reverse the l64 decoding -> "l64 encoding"
l64-encode can be found on my github:
https://github.com/huben1337/l64-encode.
After that i used quickbms to reimport the files into the gar file.
But Farming Simulator, as i expected, finds my gamefiles are corrupted.
I tested if the files where reimported correctly, which they were.
So i have two theories on why that is the case:
1. the luajit compiler is not compatible
More Detail on the luajit compiling i did:
-i hardly know anything about luajit (pls help)
-the compiled files's header contains the path, you put as argument when excuting luajit on this lua file (why?)
-i changed this path in the header to match the original scripts one (e.g "dataS/scripts/...")
-after changing the path in bytecodes' headers were almost the same, expectsome small differences
-to verify if the bytecode (with manually changed header) was valid i tried to run the decompiler on it... errors everywhere
-i also tried to decompiled a file with unchanged header which worked like a charm
The original bytecode vs. mine.
2. a checksum is used to verify the data isnt "corrupted"
If anyone has a idea about that, pls comment.
The only things i was able to find using ProcessMonitor were:
-The game writes to the file sometimes (unconsistant)
-it requests file information as can be seen here:
So, if anyone can help, pls do. (u can add me on Discord: huben#8898)