Runes of Magic FDB: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Guthius
(Created page with "* Return to the list of games Choose archive extension: == FDB == * ''' Format Type ''': Archive <br> * ''' [http://en.wikipedia.org/wiki/Endianness Endian Orde...")
imported>Guthius
No edit summary
Line 19: Line 19:


<font color="blue"> ''' // FOR EACH FILE ''' </font> <br>  
<font color="blue"> ''' // FOR EACH FILE ''' </font> <br>  
:: int32 {4} &nbsp;- File Type (See Note2)
:: int32 {4} &nbsp;- File Type <font color="purple">(See note 1)</font>
:: uint64 {8} - File Time <font color="purple">(The time the file was last modified)</font>
:: uint64 {8} - File Time <font color="purple">(The time the file was last modified)</font>
:: uint32 {4} - File Block offset <font color="purple">(Offset from beginning of file)</font>
:: uint32 {4} - File Block offset <font color="purple">(Offset from beginning of file)</font>

Revision as of 18:24, 12 December 2011

Choose archive extension:

FDB


Format Specifications

// ARCHIVE HEADER

byte {1}   - Archive version ("01")
char {3}   - Header ("BDF")
uint32 {4} - Number of files in archive


// FOR EACH FILE

int32 {4}  - File Type (See note 1)
uint64 {8} - File Time (The time the file was last modified)
uint32 {4} - File Block offset (Offset from beginning of file)


// FOR EACH FILE

uint32 {4} - File Name Size


// FILENAMES TABLE SIZE

uint32 {4} - Size of the table containing the file names


// FOR EACH FILE

char {x}   - File Name (null terminated, containing partial directory structure [example: DIR1\DIR2\DIR3\filename.ext])


// FOR EACH FILE

uint32 {4} - File Block Size (Size of the block containing information and the ZLib compressed file)
uint32 {4} - File Type (See note 1)
uint32 {4} - Compression Type (0 = None, 1 = Zlib)
uint32 {4} - Uncompressed File Size
uint32 {4} - Compressed File Size
uint64 {8} - File Time (The time the file was last modified)
uint32 {4} - File Name Size (Size including the null padded byte)
char {x}   - File Name (null terminated, containing partial directory structure [example: DIR1\DIR2\DIR3\filename.ext])
if (File Type = 2) {
int32 {4} - Compression Type (0x04000000 = None, 0x06000000 = DXT1, 0x08000000 = DXT5) (See Note4)
int32 {4} - Texture Width
int32 {4} - Texture Height
int32 {4} - Mipmap Count
}
byte {x}   - File Data (ZLib compressed [starting with header 789C and usually ending with 0000FFFF) (See Note1)


// ARCHIVE FOOTER

uint32 {4} - Unknown
uint32 {4} - Number of files in archive


MultiEx BMS Script

Not written yet

Notes and Comments

Note 1 - The ID/Type tag for the file contents. Where 0x01000000 indicates a regular file, and 0x02000000 indicates a texture (*.DDS, *.PNG, *.TGA and *.BMP). In case of a texture 4 additional uint32 values are stored after the the filename and before the archived file contents. The texture files are archived without a header, the 4 additional uint32 values can be used to reconstruct it.