Far Cry 5 - Lua Cleaner/Decompiler

Upload *YOUR* gamehacking tools/helpers here
Post Reply
User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Far Cry 5 - Lua Cleaner/Decompiler

Post 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 399 times

Report any bugs and enjoy :p
Last edited by SunBeam on Sun Apr 15, 2018 3:33 pm, edited 2 times in total.

Norway-_-1999
RCE Fanatics
RCE Fanatics
Posts: 16
Joined: Thu Apr 05, 2018 11:59 am
Reputation: 12

Far Cry 5 - Lua Cleaner/Decompiler

Post 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 :)

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Far Cry 5 - Lua Cleaner/Decompiler

Post by SunBeam »

And here you go, all Lua files from the various archives -> [Link] (272 MB big, 5909 .lua files, 27.2MB compressed)
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 2 times in total.

User avatar
Vee_
Expert Cheater
Expert Cheater
Posts: 256
Joined: Tue Mar 14, 2017 10:18 am
Reputation: 49

Far Cry 5 - Lua Cleaner/Decompiler

Post by Vee_ »

Nice:eek::eek::eek::eek:

User avatar
Csimbi
RCE Fanatics
RCE Fanatics
Posts: 933
Joined: Sat Apr 29, 2017 9:04 pm
Reputation: 1321

Far Cry 5 - Lua Cleaner/Decompiler

Post by Csimbi »

@ Sun, has it been improved since my post on Xentax?

Thanks!

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Far Cry 5 - Lua Cleaner/Decompiler

Post 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.

boogmenoot
Noobzor
Noobzor
Posts: 8
Joined: Sun May 17, 2020 1:59 pm
Reputation: 1

Re: Far Cry 5 - Lua Cleaner/Decompiler

Post by boogmenoot »

Nice! There is also [Link] that does the job.

Post Reply

Who is online

Users browsing this forum: tewisiw670