Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MDT (Gotcha Force): Difference between revisions

No edit summary
No edit summary
Line 6: Line 6:
</div>
</div>


MDT files are similar to PZZ files, with a header of 0x800 / 2048 bytes including :
MDT files are same than [[PZZ (Gotcha Force)|pzz]] but packing only uncompressed files.
* the number of files (uint32 big endian)
* the file size / 0x800 for each file


It is possible to unpack and repack .mdt files with the pzztool.py tool. Unlike pzz, the internal files of .mdt are packaged and not compressed.
MDT header (0x800 bytes):
* 4 bytes - uint32 file count (big endian)
* 4 bytes uint32 array: file size diveded by 0x800 and upper rounded for each file


* 000 dat file contains at first sight all texts of the game (Related to all dat file, not only one).
All .mdt contains 2 files:
* 000 dat file with texts used in the game
* 001 TPL including an alphanumeric alphabet used by the dat file
* 001 TPL including an alphanumeric alphabet used by the dat file


Line 18: Line 19:


'''header''':
'''header''':
* 4 bytes - offset_block_list offset
* 4 bytes - paragraph_offset_block_list
* 4 bytes - symbols_count # number of symbols contained in the tpl
* 4 bytes - symbols_count # number of symbols contained in the tpl
* 2 bytes - offsets in the file relative to after the header (array)? same count than symbols
* 2 bytes - offsets in the file relative to after the header (array)? same count than symbols
'''offset_block_list''':
'''paragraph_offset_block_list''':
* 4 bytes - uint32 absolute offset array of the offsets_blocks terminated by -1 (FF FF FF FF)
* 4 bytes - uint32 absolute offsets - array of the paragraph_offset_blocks terminated by -1 (FF FF FF FF)
'''offset_block_1''': # first offsets block describing data block 1 partitioning
'''paragraph_offset_block 0''': # first paragraph_offset_block describing all phrases in the data block 0
* 4 bytes - int32 absolute array of offsets in the data block terminated by -1 (FF FF FF FF). The first offset is the data block offset
* 4 bytes - int32 array of absolute offsets - paragraph in the data block terminated by -1 (FF FF FF FF). The first offset is the data block offset
'''data_block_1''':
'''data_block 0''':
* 2 bytes - signed int16 list <- block 2 describe where each element begin
* 2 bytes - signed int16 list <- paragraph_offset_block 0 describe where each paragraph begin
offset_block_2: ...
paragraph_offset_block 1: ...
data_block_2: ...
data_block 1: ...


data_block contains int16 indexes relative to the tpl symbol list. First symbol in the tpl has number 0 then horizontaly symbol 1, 2 ... So data block contains phrases.
data_block contains int16 indexes relative to the tpl symbol list. First symbol in the tpl has number 0 then horizontaly symbol 1, 2 ... So data block contains paragraphes.
* FFFE: space
* FFFE: space
* 1001: end of the phrase
* 1001: end of the phrase


Virtual World RE has developed the python script [https://github.com/Virtual-World-RE/NeoGF/tree/main/pzztool pzztool.py] to manipulate MDT files and their internal files.
Virtual World RE has developed the python script [https://github.com/Virtual-World-RE/NeoGF/tree/main/pzztool pzztool.py] to manipulate MDT files and their internal files allowing to unpack / pack mdt files.


PGCD of MDT file sizes: 2048 / 0x800


[[Category:File format]]
[[Category:File format]]
[[Category:Gotcha Force]]
[[Category:Gotcha Force]]

Revision as of 00:15, 7 September 2022

← Gotcha Force

This section is currently being written.
More research is needed and some paragraphs may be wrong.

MDT files are same than pzz but packing only uncompressed files.

MDT header (0x800 bytes):

  • 4 bytes - uint32 file count (big endian)
  • 4 bytes uint32 array: file size diveded by 0x800 and upper rounded for each file

All .mdt contains 2 files:

  • 000 dat file with texts used in the game
  • 001 TPL including an alphanumeric alphabet used by the dat file

dat file:

header:

  • 4 bytes - paragraph_offset_block_list
  • 4 bytes - symbols_count # number of symbols contained in the tpl
  • 2 bytes - offsets in the file relative to after the header (array)? same count than symbols

paragraph_offset_block_list:

  • 4 bytes - uint32 absolute offsets - array of the paragraph_offset_blocks terminated by -1 (FF FF FF FF)

paragraph_offset_block 0: # first paragraph_offset_block describing all phrases in the data block 0

  • 4 bytes - int32 array of absolute offsets - paragraph in the data block terminated by -1 (FF FF FF FF). The first offset is the data block offset

data_block 0:

  • 2 bytes - signed int16 list <- paragraph_offset_block 0 describe where each paragraph begin

paragraph_offset_block 1: ... data_block 1: ...

data_block contains int16 indexes relative to the tpl symbol list. First symbol in the tpl has number 0 then horizontaly symbol 1, 2 ... So data block contains paragraphes.

  • FFFE: space
  • 1001: end of the phrase

Virtual World RE has developed the python script pzztool.py to manipulate MDT files and their internal files allowing to unpack / pack mdt files.