#1
|
||||
|
||||
[C++] Grim Dawn Archive File Extractor (.arc)
This is another project of mine for a game called Grim Dawn. This tool will extract the game data that is packed in the games custom .arc format. Again, not something I think many will be interested in as a whole, but the project is open source so sharing it in case someone finds any parts of it useful.
grimarc - Grim Dawn Archive File Extractor (.arc)
Download Latest Version: https://github.com/atom0s/grimarc/releases/latest File Format Information Please note this data and format is subject to change. Grim Dawn is still in alpha testing and is not completed. The developers may change the formats at random causing this information to become invalid. At the time of this post, the game is currently at build: B23 To start, the .arc files are broken into four sections. Code:
file { header file_data file_record_table file_table_of_contents } Code:
/** * @brief ARC File Header (v3) */ struct ARC_V3_HEADER { unsigned int Magic; // ARC unsigned int Version; unsigned int NumberOfFileEntries; unsigned int NumberOfDataRecords; // (NumberOfDataRecords * 12) = RecordTableSize unsigned int RecordTableSize; unsigned int StringTableSize; unsigned int RecordTableOffset; };
Next, after the header is the file data parts. This chunk is handled by the next two parts of the file. So the next part we have the record table. The record table defines the file parts in the chunk of data before it. The format is: Code:
/** * @brief ARC File Part Entry (v3) */ struct ARC_V3_FILE_PART { unsigned int PartOffset; unsigned int CompressedSize; unsigned int DecompressedSize; }; Following this table, is the string table. Each string is the name of a file within the archive. The string table is just a block of strings, null terminated in a row. The position of the string is the index of the file within the archive. So the first entry in the ToC table uses the first string in the string table, the second uses the second and so on. There is no string lookup in .arc files like there is in .arz files! The last block of data in the file is the files table of contents. This is the major part of the file that is used to read and understand the rest of the file. The ToC attaches to the record table to know which blocks of data to read. The ToC is formatted like this: Code:
/** * @brief ARC File Table Of Contents Entry (v3) */ #pragma pack(1) struct ARC_V3_FILE_TOC_ENTRY { unsigned int EntryType; unsigned int FileOffset; unsigned int CompressedSize; unsigned int DecompressedSize; unsigned int Unknown0001; // Possible timestamp? unsigned __int64 FileTime; unsigned int FileParts; unsigned int FirstPartIndex; unsigned int StringEntryLength; unsigned int StringEntryOffset; }; #pragma pop
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Woodmann Archive | bolzano_1989 | General Discussion | 47 | 03-28-2024 06:07 |
[C++] Grim Dawn Database File Extractor (.arz) | atom0s | Source Code | 0 | 01-16-2015 14:06 |