MCFFileFormat
Mark Chandler edited this page May 13, 2014
·
1 revision
TOC This is the outline of the format of a mcf (moddb content file).
MCF Version 1
char m_szId[4]; //4 id LMCF uint8 m_iFileVer; //1 mcf format version uint32 m_iVer; //4 mcf build version uint32 m_iMod; //4 item id uint8 m_iType; //1 item type uint64 m_iXmlStart; //8 xml offset uint32 m_iXmlSize; //4 xml size uint8 m_iFlags; //1 flags uint32 m_iParent; //4 parent id FileData files[n] //file array XmlData xml //xml data that contains all the file infomation
MCF Version 2
char m_szId[4]; //4 id LMCF uint8 m_iFileVer; //1 mcf format version uint32 m_iVer; //4 mcf build version uint32 m_iMod; //4 item id uint8 m_iType; //1 item type uint64 m_iXmlStart; //8 xml offset uint32 m_iXmlSize; //4 xml size uint8 m_iFlags; //1 flags uint32 m_iParent; //4 parent id uint32 m_iBranch; //4 branch id FileData files[n] //file array XmlData xml //xml data that contains all the file infomation
Each file has an array of bytes. The size is defined in the xmldata
These are the values for item types. These are used both in Desura app and desura.com. They should not be changed! Also note that some of these are only used internally by Desura and wont be present in mcf files.
* 0x0: TYPE_VOID * 0x1: TYPE_MOD * 0x2: TYPE_GAME * 0x3: TYPE_ADDON * 0x4: TYPE_TOOL * 0x5: TYPE_LINK * 0x6: TYPE_GROUP * 0x7: TYPE_MEMBER * 0x8: TYPE_APP * 0x9: TYPE_MADDON * 0xA: TYPE_THEME * 0xB: Unused * 0xC: Unused * 0xD: Unused * 0xE: Unused * 0xF: TYPE_UNKOWN
enum { MCFF_NO_FLAG = 0, MCFF_FLAG_SAVE = 1<<1, //file is saved into the mcf MCFF_FLAG_COMPLETE = 1<<2, //file is complete MCFF_FLAG_COMPRESSED= 1<<3, //file is compressed using bzip2 MCFF_FLAG_ZEROSIZE = 1<<4, //the file has no data MCFF_FLAG_STARTEDDL = 1<<5, //the file has started to download };
Contains information about each file:
name File Name path File path relative to root size File uncompressed size csize File compressed size state File state (0=uncompressed, 1=compressed) offset File offset into mcf hash File md5 hash tstamp File time stamp (YYYYMMDDHHMMSS) saved If the file is in the mcf file or not (patches have full file list but only have part file data)