Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 1.85 KB

File metadata and controls

70 lines (49 loc) · 1.85 KB

SoulFu Data Packer/Unpacker

A command-line utility for packing and unpacking SoulFu game data files (.sdf format).

Overview

This tool allows you to:

  • Pack a directory of game assets into a single .sdf data file
  • Unpack an existing .sdf file back into individual files
  • Handle various file types used by the SoulFu game with proper obfuscation

Building

To compile the program, simply run:

make

This will generate the executable sdp.

Usage

sdp [options]

Options

Option Description
-h Display help information
-p Pack a directory into an SDF file
-u Unpack an SDF file to a directory
-i <path> Specify input path (directory for packing, SDF file for unpacking)
-o <path> Specify output path (SDF file for packing, directory for unpacking)
-n Convert \0 to LF and vice versa for text/SRC files (line ending conversion)

Default Paths

  • When packing (-p): Input defaults to sfd/, output defaults to datafile.sdf
  • When unpacking (-u): Input defaults to datafile.sdf, output defaults to sfd/

Examples

  1. Pack a directory into an SDF file:

    sdp -p -i my_assets/ -o game.sdf
  2. Unpack an SDF file:

    sdp -u -i game.sdf -o extracted/
  3. Pack with line ending conversion for text files:

    sdp -p -n -i assets/ -o data.sdf

Notes

  • The tool creates the output directory when unpacking (fails if it already exists)
  • Line ending conversion (-n flag) only affects TXT and SRC file types
  • File names in the index are limited to 8 characters (plus 3-character extension)
  • All numeric values in the index are stored in big-endian format

License

This tool is part of the SoulFu game project. See the game's documentation for licensing information.