FARC Archives (*.bin) - Anonym271/7scarlet-tools GitHub Wiki
FARC Archives
This is the main archive format the game uses to store its data. It has a very simple structure but all numbers are stored in big endian format.
Header
| Offset | Type | Name | Description |
|---|---|---|---|
| 0x00 | int32 | magic | Magic number (always "FARC") |
| 0x04 | uint32 | file_count | Number of files in the archive |
| 0x08 | uint64 | data_offset | Absolute file offset of the data segment |
File Table
The file table starts right after the header and contains Header.file_count entries of this structure:
| Offset | Type | Name | Description |
|---|---|---|---|
| 0x00 | uint32 | name_offset | Absolute offset of the file's name |
| 0x04 | uint32 | id | ID of the file (maybe used for identification in the game, so it should stay the same when repacking) |
| 0x08 | uint64 | offset | Absolute offset of the file's content |
| 0x10 | uint64 | length | Length of the file's content |
| 0x18 | uint64 | orig_length | Original (uncompressed) size of the file |
File Names
The file names are stored as null-terminated ASCII strings. Their position in the file is defined by the respective file table entry but usually the segment that contains the names is located right after the file table.
Content
Every file is defined by its file table entry. The files are usually stored in an LZSS compressed format (they start with "LZSS" in this case) and need to be decompressed before they can be used. Compression is not needed when repacking.