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

← Gotcha Force

This article is about Gotcha Force MDT file format and ongoing researchs on it.

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

mdt files:

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 divided 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_offsets_blocks_list
  • 4 bytes - symbols_count # number of symbols contained in the tpl
  • 2 bytes - universal symbols ID shared between all .mdt and positionnal from tpl file

paragraph_offsets_blocks_list:

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

paragraph_offsets_block 0: # first paragraph_offsets_block describing all paragraph offsets in the data block 0

  • 4 bytes - int32 array of absolute offsets which point to pragraphs 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_offsets_block 0 describe where each paragraph begin.

paragraph_offsets_block 1: ... data_block 1: ...

Text engine NTSC/USA

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(s) contains texts.

  • FFFE: space <- each negative value describe something not present in the tpl
  • FFFD: smaller space
  • 1000: new line
  • 1001: end of the phrase
  • 80yy: start appliying a color to following letters
    • 8000: Player name
    • 8001: (10 backticks, not sure what this is exactly)
    • 8002: Colour highlight
    • 8003: (some text character not really sure again)
    • 80FF: stop appliying a color

The text engine use a hash table corresponding to symbols and allow to color the textures or use vars like player name. Here is the hashtable:

81 43 ,
81 44 .
81 45 point
81 46 :
81 47 ;
81 48 ?
81 49 !
81 51 _
81 5e /
81 65 `
81 66 '
81 68 "
81 69 (
81 6a )
81 7b +
81 7c -
81 7e mul
81 80 div
81 81 =
81 83 <
81 84 >
81 93 %
81 94 #
81 95 &
81 96 *
81 97 @
81 a5 `
82 4f 0
82 50 1
82 51 2
82 52 3
82 53 4
82 54 5
82 55 6
82 56 7
82 57 8
82 58 9
82 60 A
82 61 B
82 62 C
82 63 D
82 64 E
82 65 F
82 66 G
82 67 H
82 68 I
82 69 J
82 6a K
82 6b L
82 6c M
82 6d N
82 6e O
82 6f P
82 70 Q
82 71 R
82 72 S
82 73 T
82 74 U
82 75 V
82 76 W
82 77 X
82 78 Y
82 79 Z
82 81 a
82 82 b
82 83 c
82 84 d
82 85 e
82 86 f
82 87 g
82 88 h
82 89 i
82 8a j
82 8b k
82 8c l
82 8d m
82 8e n
82 8f o
82 90 p
82 91 q
82 92 r
82 93 s
82 94 t
82 95 u
82 96 v
82 97 w
82 98 x
82 99 y
82 9a z
83 bf `
89 ce `
8c ba `
8c d5 `
8e e9 `
90 9d `
90 c2 `
92 b4 `
94 92 `
95 90 `
97 b4 `

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