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>Ikskoks
m (Ikskoks moved page Runes of Magic to Runes of Magic FDB)
 
(11 intermediate revisions by 3 users not shown)
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>
Line 39: Line 39:
::: uint32 {4} - File Block Size <font color="purple">(Size of the block containing information and the ZLib compressed file)</font>
::: uint32 {4} - File Block Size <font color="purple">(Size of the block containing information and the ZLib compressed file)</font>
::: uint32 {4} - File Type <font color="purple">(See note 1)</font>
::: uint32 {4} - File Type <font color="purple">(See note 1)</font>
::: uint32 {4} - Compression Type <font color="purple">(0 = None, 1 = Zlib)</font>
::: uint32 {4} - Compression Type <font color="purple">(0 = None, 1 = RLE, 2 = unknown, 3 = Zlib, 4 = Redux)</font>
::: uint32 {4} - Uncompressed File Size
::: uint32 {4} - Uncompressed File Size
::: uint32 {4} - Compressed File Size
::: uint32 {4} - Compressed File Size
Line 46: Line 46:
::: char {x} &nbsp;&nbsp;- File Name <font color="purple">(null terminated, containing partial directory structure [example: DIR1\DIR2\DIR3\filename.ext])</font>
::: char {x} &nbsp;&nbsp;- File Name <font color="purple">(null terminated, containing partial directory structure [example: DIR1\DIR2\DIR3\filename.ext])</font>
::: <font color="green">if (File Type = 2) {</font>
::: <font color="green">if (File Type = 2) {</font>
:::: int32 {4} - Compression Type (0x04000000 = None, 0x06000000 = DXT1, 0x08000000 = DXT5) (See Note4)
:::: int32 {4} - Compression Type: 0x04 = None, 0x05-0x06 = DXT1, 0x08 = DXT5)  
:::: int32 {4} - Texture Width
:::: int32 {4} - Texture Width
:::: int32 {4} - Texture Height
:::: int32 {4} - Texture Height
:::: int32 {4} - Mipmap Count
:::: int32 {4} - Mipmap Count
::: <font color="green">}</font>
::: <font color="green">}</font>
::: byte {x} &nbsp;&nbsp;- File Data (ZLib compressed [starting with header 789C and usually ending with 0000FFFF) (See Note1)
::: byte {x} &nbsp;&nbsp;- File Data




Line 70: Line 70:
filename and before the archived file contents. The texture files are archived without a header, the 4 additional uint32 values  
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.
can be used to reconstruct it.
[[Category:File Format]]

Latest revision as of 23:54, 20 January 2021

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 = RLE, 2 = unknown, 3 = Zlib, 4 = Redux)
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: 0x04 = None, 0x05-0x06 = DXT1, 0x08 = DXT5)
int32 {4} - Texture Width
int32 {4} - Texture Height
int32 {4} - Mipmap Count
}
byte {x}   - File Data


// 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.