Jump to content

Bachsau

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Bachsau

  • Rank
    Recruit

Profile Information

  • Gender
    Male

Command & Conquer Profile

  • C&C:Online
    Bachsau
  • XWIS
    Bachsau
  1. Bachsau

    A command line Mix editor

    Hi guys! I just found this thread while searching for how to decode XCC Local MIX Database files. Nyerguds' reference in post #5 was a good starting point. Unfortunately, after fiddling around with this for hours and looking at several MIX files created by XCC as well as the XCC source code, i found out he was totally wrong about the structure. If you're looking at lots of packed zero bytes you easily get confused. But if it looks like a PC program would be using big endian there's a reason to become suspicious. And indeed, XCC doesn't. So here is what I found out to be the real structure of LMD files: 32 ID-Bytes: "XCC by Olaf van der Spek\x1a\x04\x17\x27\x10\x19\x80\x00" 4 Bytes: Total Filesize 4 Bytes: XCC File Type. This seems to be always 0 for LMDs but it is 2 for XIFs. 4 Bytes: XCC File Version. Currently this is hardcoded to always be 0 in XCCs sources 4 Bytes: Gametype! This allows you to identify how the keys were calculated. 0 for TD, 1 for RA, 2 for TS, and so on... 4 Bytes: Number of names in file. This is followed by all names separated by zeros. In the XCC sources the first four blocks are organized as a separate data structure called XCC header, while the rest of the file belongs to the LMD header. Enumeration of Gametype is as follows, even though there are no differences between some of these: enum t_game { game_td, game_ra, game_ts, game_dune2, game_dune2000, game_ra2, game_ra2_yr, game_rg, game_gr, game_gr_zh, game_ebfd, game_nox, game_bfme, game_bfme2, game_tw, game_ts_fs, game_unknown }; I'm currently coding a MIX Editor in Python 3. You can find the sources at http://github.com/Bachsau/Mixtool. Here is what it currently looks like: And it works!
×