Skip to content

randomstuff/ftldat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# Extract/create FTL .dat archives

The *.dat of FTL files are archives of files.

Warning:

  • no security measure on the file creation (it might write ../.profile, ../../.profile);

  • backup your data;

  • backup your save files.

There's a similar tool with the same name written in Python.

This is currently working on GNU libc but can work on other OSes with small modifications.

Usage

# Backup
test data.dat.orig || cp data.dat data.dar.orig
test resources.dat.orig || cp resources.dat data.dar.orig

# Expand
ftldat xt data.dat.orig > data.txt
ftldat xt resources.dat.orig > resources.txt

# TODO, patch the files hereby

# recreate the archive:
ftldat c data.dat $(cat data.txt)
ftldat c resources.dat $(cat resources.txt)

## Format

All values are in little-endian format (ar least on little-endian machines).

Header:

  • 32-bit number file slots;
  • 32-bit file offset,
    • this is the offset of the file within the archive file,
    • a value or zero is ignored.

Each file is found at a given offset within the file:

  • 32-bit file size;
  • 32-bit file name size;
  • file name;
  • file data.

About

Extract/create FTL .dat archives

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published