Page 1 of 1

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Sun Apr 15, 2018 3:28 pm
by SunBeam
[ 15.04.2018 - First Release ]
  • What is this shit? Well, it's a tool designed to help you cleaning-up or decompiling extracted .lua files from Far Cry 5's .dat archives.
  • How do you extract the Lua files? Ekey posted a Far Cry 5 DAT extractor [Link].
You can find the various discussions and observations in the XeNTaX thread, starting with page 5 (or from the beginning, if interested in reading everything). From that point onward I was able to extract all Lua files from the various .dat archives and come up with the below listing, using the .dat names as folder names:



Image



The tool is designed to work with drag-and-drops and accepts individual, multiple .lua files OR folders where Lua files reside (when dragging over a folder, itself and all sub-folders are scanned for .lua files). Lastly, there's a check-box at the bottom allowing the tool to do clean-up (if enabled). You may want to check the About button as well :p



The tool's result (be it a LUAC clean-up or Lua 5.1 decompile) is stored in the file with the .clean extension.



Now the example:
  • if you drag and drop a single .lua file over the GUI, this happens:
Image
  • if you want the remnants gone (activityendgame.luadec, activityendgame.unluac) and activityendgame.clean renamed to activityendgame.lua, then tick the bottom checkbox:
Image
  • lastly, if you want the tool to recursively do the above for all .lua files found in a folder/sub-folder/sub-folder... then go up one level and drag over the entire folder; you can do this with the root as well (my root is FC5_Lua; so if I dragged that, all found .lua files would be processed; yes, it takes a while):
Image



Image



Image



Credits:
  • Ekey for the ability to extract Far Cry 5 files from the .dats using .fats.
  • Hans Wessels for the unluac Java decompiler (link: [Link]).
  • Ovidiu Cucu for his last post in this thread: [Link].


BIG NOTE:



You need Java RE installed for the decompiler to work! Don't say I didn't tell you so! (link: [Link] - - at the time of the post, Java SE Runtime Environment 8u162)

LUA.FC5.zip
pass: sunbeam
(167.14 KiB) Downloaded 277 times

Report any bugs and enjoy :p

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Sun Apr 15, 2018 6:19 pm
by Norway-_-1999
SunBeam, post: 42525, member: 12587 wrote:[ 15.04.2018 - First Release ]
  • What is this shit? Well, it's a tool designed to help you cleaning-up or decompiling extracted .lua files from Far Cry 5's .dat archives.
  • How do you extract the Lua files? Ekey posted a Far Cry 5 DAT extractor [Link].
You can find the various discussions and observations in the XeNTaX thread, starting with page 5 (or from the beginning, if interested in reading everything). From that point onward I was able to extract all Lua files from the various .dat archives and come up with the below listing, using the .dat names as folder names:



Image



The tool is designed to work with drag-and-drops and accepts individual, multiple .lua files OR folders where Lua files reside (when dragging over a folder, itself and all sub-folders are scanned for .lua files). Lastly, there's a check-box at the bottom allowing the tool to do clean-up (if enabled). You may want to check the About button as well :p



The tool's result (be it a LUAC clean-up or Lua 5.1 decompile) is stored in the file with the .clean extension.



Now the example:
  • if you drag and drop a single .lua file over the GUI, this happens:
Image
  • if you want the remnants gone (activityendgame.luadec, activityendgame.unluac) and activityendgame.clean renamed to activityendgame.lua, then tick the bottom checkbox:
Image
  • lastly, if you want the tool to recursively do the above for all .lua files found in a folder/sub-folder/sub-folder... then go up one level and drag over the entire folder; you can do this with the root as well (my root is FC5_Lua; so if I dragged that, all found .lua files would be processed; yes, it takes a while):
Image



Image



Image



Credits:
  • Ekey for the ability to extract Far Cry 5 files from the .dats using .fats.
  • Hans Wessels for the unluac Java decompiler (link: [Link]).
  • Ovidiu Cucu for his last post in this thread: [Link].


BIG NOTE:



You need Java RE installed for the decompiler to work! Don't say I didn't tell you so! (link: [Link] - - at the time of the post, Java SE Runtime Environment 8u162)



Report any bugs and enjoy :p
Nice work :D

Keep it up :)

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Mon Apr 16, 2018 8:49 pm
by SunBeam
And here you go, all Lua files from the various archives -> [Link] (272 MB big, 5909 .lua files, 27.2MB compressed)

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Tue Apr 17, 2018 2:56 am
by Vee_
Nice:eek::eek::eek::eek:

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Sat Apr 21, 2018 8:29 pm
by Csimbi
@ Sun, has it been improved since my post on Xentax?

Thanks!

Far Cry 5 - Lua Cleaner/Decompiler

Posted: Sun Apr 22, 2018 5:24 pm
by SunBeam
I don't really understand. Main post says the cleaner/decompiler does what it does. For other types of files use Ekey's unpacker. I won't be creating any Tools to deal with other files, as I'm not interested.

Re: Far Cry 5 - Lua Cleaner/Decompiler

Posted: Sat Nov 14, 2020 2:40 pm
by boogmenoot
Nice! There is also [Link] that does the job.