[Tool] ftldat r7

Discuss and distribute tools and methods for modding. Moderator - Grognak
bas
Posts: 36
Joined: Fri Sep 14, 2012 3:36 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby bas » Sat Sep 15, 2012 10:34 am

Jessen wrote:he added

Code: Select all

def add(self, filename, f, size):
        filename = filename.replace('\\','/')
to line 46, but i dont know what that means or how to do it. maybe someone can enlighten me.


That was a fix for version r2. You don't need to apply it: there is another fix in version r3, the latest version.
bas
Posts: 36
Joined: Fri Sep 14, 2012 3:36 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby bas » Sat Sep 15, 2012 11:45 am

I have created a stand-alone Windows installer.

  • Run the installer found here http://westerbaan.name/~bas/ftldat/ftldat-latest.exe. (You do not need to install Python anymore.)
  • Open up a command prompt (Start -> Run... -> "cmd" -> "OK")
  • Navigate to the folder with the data.dat and resource.dat.
  • To unpack, run ftldat unpack data.dat
    This wil create a data.dat-unpacked folder.
  • WARNING, before packing, make a backup of data.dat. To pack, run ftldat pack data.dat.
  • To show the contents and fingerprints of a .dat, run ftldat info --hashes data.dat.

Hope this makes it easier.
Dal
Posts: 6
Joined: Sat Apr 21, 2012 6:05 am

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby Dal » Sat Sep 15, 2012 1:03 pm

This game desperately needs an override folder for loose files. There's so much potential but it's inordinately difficult to use (or distribute legally) when it has to be repacked first.
touriste
Posts: 1
Joined: Sat Sep 15, 2012 4:30 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby touriste » Sat Sep 15, 2012 4:32 pm

bas wrote:I have created a stand-alone Windows installer.

  • Run the installer found here http://westerbaan.name/~bas/ftldat/ftldat-latest.exe. (You do not need to install Python anymore.)
  • Open up a command prompt (Start -> Run... -> "cmd" -> "OK")
  • Navigate to the folder with the data.dat and resource.dat.
  • To unpack, run ftldat unpack data.dat
    This wil create a data.dat-unpacked folder.
  • WARNING, before packing, make a backup of data.dat. To pack, run ftldat pack data.dat.
  • To show the contents and fingerprints of a .dat, run ftldat info --hashes data.dat.

Hope this makes it easier.


Thanks for the auto-installer but on Seven when I unpack a DATA it doesn't tell me where it unpacks it.

ftl_unpack_seven.jpg


edit: Nevermind ftldat unpack -h solved this ^^"
Zuriki
Posts: 30
Joined: Sat Sep 15, 2012 1:58 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby Zuriki » Sat Sep 15, 2012 6:20 pm

Thanks for this awesome tool. I'm using it to make a mod for FTL. :D
bas
Posts: 36
Joined: Fri Sep 14, 2012 3:36 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby bas » Sat Sep 15, 2012 6:50 pm

Dal wrote:This game desperately needs an override folder for loose files. There's so much potential but it's inordinately difficult to use (or distribute legally) when it has to be repacked first.


.dat files are easy to manipulate in place -- it is easy to add or change a file without repacking everything.

A mod could just be a zip file with the changed files. It would not be too hard to write a tool to apply such a zip to the dat files. If someone has some serious modding plans, then I would be glad to help out.
celticfang
Posts: 3
Joined: Sat Sep 15, 2012 6:51 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby celticfang » Sat Sep 15, 2012 6:54 pm

I'm poking around to see what I can find, not gonna release anything till the devs say it's okay
Zuriki
Posts: 30
Joined: Sat Sep 15, 2012 1:58 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby Zuriki » Sat Sep 15, 2012 6:56 pm

bas wrote:
Dal wrote:This game desperately needs an override folder for loose files. There's so much potential but it's inordinately difficult to use (or distribute legally) when it has to be repacked first.


.dat files are easy to manipulate in place -- it is easy to add or change a file without repacking everything.

A mod could just be a zip file with the changed files. It would not be too hard to write a tool to apply such a zip to the dat files. If someone has some serious modding plans, then I would be glad to help out.


Your tool could be used to install mods pretty easily:
1. Automatically back-up existing files
2. Unpack existing files
3. Copy mod files into the directory with the unpacked files
4. Repack

Doesn't require distribution of original files, it's not an ideal solution, but it's not exactly a bad solution.
StealthCl0wn
Posts: 78
Joined: Sat Sep 15, 2012 6:55 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby StealthCl0wn » Sat Sep 15, 2012 7:01 pm

Anyone got any... simplified methods of doing this? I am horrible with the command line.
bas
Posts: 36
Joined: Fri Sep 14, 2012 3:36 pm

Re: [Modding] Packing and unpacking data.dat and resource.da

Postby bas » Sat Sep 15, 2012 7:02 pm

Zuriki wrote:
bas wrote:
Dal wrote:This game desperately needs an override folder for loose files. There's so much potential but it's inordinately difficult to use (or distribute legally) when it has to be repacked first.


.dat files are easy to manipulate in place -- it is easy to add or change a file without repacking everything.

A mod could just be a zip file with the changed files. It would not be too hard to write a tool to apply such a zip to the dat files. If someone has some serious modding plans, then I would be glad to help out.


Your tool could be used to install mods pretty easily:
1. Automatically back-up existing files
2. Unpack existing files
3. Copy mod files into the directory with the unpacked files
4. Repack

Doesn't require distribution of original files, it's not an ideal solution, but it's not exactly a bad solution.


That would do the trick, but it is a bit indirect.

I though about the following. A mod is a zip file that contains diffs[1] (/deltas). A mod is applied, by applying all the diffs in it. The graphical tool to manage mods would list all installed mods, and would allow the user to enable and disable certain mods. Some mods will apply cleanly together, others won't. Before applying a diff (in-place), the tool backs up the original file in another file.

In this way, multiple mods can be active at the same time; we do not need to redistribute game files and it would be fast.

--
[1] http://en.wikipedia.org/wiki/Diff
Last edited by bas on Sat Sep 15, 2012 7:06 pm, edited 1 time in total.