Talk:TACTICAL.EXE

From UFOpaedia
Revision as of 04:33, 15 March 2007 by NKF (talk | contribs)
Jump to navigation Jump to search

English2.dat

Hey I think I found the lookup table for English2.dat (or german2, etc) in TACTICAL.EXE. It's at offset 0x5F910, each entry is 2 bytes long. It corresponds with the entry in OBDATA.DAT. The index in obdata is the offset in this array of 2 bytes. Let me give an example:

(AT OFFSET 5F910)
7B 00 | 7C 00 | 7D 00 | 7E 00 | 7F 00
  0       1       2       3       4
  • 0x7B (or really 0x007B) is 123, which in English2.dat is Pistol

For further Proof:

(OFFSET 5F944, 52 bytes from begining, so 52/2 = 26)
95 00 | B0 00 | 00 00 | 00 00
  26      27      28      29
  • 0x0095 = 149; english2.dat[149] = 'Stun Rod' (OBDATA[26] Is info for Stun Rod)
  • 0x00B0 = 176; english2.dat[176] = 'Electro-flare' (OBDATA[27] is info for electro-flare)
  • OBDATA[28-30] are 'empty' unused obdata slots
(OFFSET 5F94E, 62 byte from begining, so 62/2 = 31)
AE 00 | AE 00 | AE 00 | 96 00
  31      32      33      34
  • 0x00AE = 174; english2.dat[174] = 'Corpse', Obdata[31-33] are all corpses (with different armor)
  • 0x0096 = 150; english2.dat[150] = 'Heavy Plasma', Obdata[34] is info for Heavy Plasma

Pi Masta 19:19, 9 February 2007 (PST)


Speaking of English.dat (and english2.dat), I noticed we haven't got any documentation for it. From what I can rememeber from a little C++ experimentation a while back, the language file simply loads each null-terminated string into an array of strings and the index for each string is used as the lookup value as seen in files like facil.dat and obdata.dat. I'm not sure if english.dat and english2.dat are loaded into one large string array or if they are in separate arrays. - NKF