Uodemo.dat

From UODemo Wiki
Revision as of 20:48, 21 May 2009 by Batlin (talk | contribs) (Created page with 'This is an custom made archive file for the Ultima Online Gold Demo. It consists if minimum 1 header and can contain up to 3000 files. If the filename in the header is equal to ...')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is an custom made archive file for the Ultima Online Gold Demo.

It consists if minimum 1 header and can contain up to 3000 files. If the filename in the header is equal to "@@@.@@@" then the end of the header area is reached.

One header entry is 280 bytes in size.

struct datheader {

 char filename[260];      // 260 is MAX_PATH in Windows
 int32 filepointer;       // this pointer is relative from the end of the header area
 int32 maximumsize;       // if set, the file can grow until this size is reached
 int32 isreadyonly;       // 0 = writeable, <> = read-only
 int32 encryptedsize;     // encrypted filesize (not the actual filesize)
 int32 fileposition;      // internally used by uodemo.exe, not relevant for reading from the archive

};

The actual filesize can be obtained by reading the last int32 in the file data after decryption. This means that for a 0 length file, the encryptedsize will be atleast be 4 bytes (size of one int32).