Kornet's Format Information

The Original Forum. Game archives, full of resources. How to open them? Get help here.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 2 times

Post by KorNet » Thu May 26, 2005 1:20 am

Roller Coaster Tycoon 1 TD4 , TP4 file format
http://www.strategyplanet.com/rctuk/tid/TD4.html
http://www.strategyplanet.com/rctuk/tid/TP4.html

Roller Coaster Tycoon 2 TD6 file format
http://www.strategyplanet.com/rctuk/tid/TD6.html

Roller Coaster Tycoon 3 TPK file format
http://www.strategyplanet.com/rctuk/tid/TRK.html


:P

KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 2 times

Post by KorNet » Thu May 26, 2005 1:25 am

Lord of the Ring: War of thr Ring H2O file format

This format was designed by Liquid Entertainment, hence the name H2O. The games
resources and settings are maintained in a relational database. And this format
is used for backing storage of BLOB's. Each table that contains a column marked
as BLOB has an H2O archive. Each row of the table matches an entry in the
archive, and since whole rows can be null (unused) in the tables so can entries
in an archive. These have their index_file and index_dir set to -1.

The format is composed of 6 areas:
* Header
* Entries
* File names
* Directory names
* Directory structure
* Data area

The format uses PKWARE's Data Compression Library, compressed data is prefixed
with the following structure:

uint32 size_compressed
uint32 size
uint32 checksum generated with CRC32

Mark Adler, author of zlib has written source to decompress DCL compressed
data and made it available for download at:
http://www.alumni.caltech.edu/~madler/blast10.tar.gz


Header
------

char[8] ident 'LIQDLH2O'
float version 6.0
char[] comment ends with 0x1A
uint32 version 6
uint32 num_entries
uint64 datasize_archived
uint64 datasize_raw


Entries
-------

An array of structures, as depicted below, that describes each entry

uint32 unknown 0 for uncompressed entries, varies for
compressed, reason unknown
int32 index_dir -1 if there there is no associated directory
int32 index_file -1 if the entry is unused
uint32 index_entry increases from zero
uint32 size
uint32 size_compressed same as size for uncompressed entries
uint64 offset offset in the file to where the raw or
compressed data is stored
uint32 checksum generated with CRC32
uint32 unknown always 1239288 or 1239252


File names
----------

This area is compressed, so it starts with the compressed data descriptor
descbribed above. The strings are in unicode. You'll have to search the
array looking for 0x0000 to find out where each string starts and ends.

uint32 numstrings
uint32 size size in bytes of the array and the two
uint32's numstrings and size
(array of strings)


Directory names
---------------

Stored in the same way as the file names.


Directory structure
-------------------

This is an array of int32's with one entry for each directory. The value of an
entry is the index into the same array of the parent directory, or -1 if it
has no parent directory.

uint32 numdirs
int32[numdirs] parentindex


Data Area
---------

Contains the actual content, the offset value of entries point into this area.
Compressed entries start with the structure described in the introduction.


Remarks
-------

The directory names are complete paths, i.e. textures/balrog/front.tga is
textures/balrog, not just balrog, so the directory structure area isnt really
needed.

User avatar
Mr.Mouse
Site Admin
Posts: 4051
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 421 times
Been thanked: 575 times
Contact:

Post by Mr.Mouse » Thu May 26, 2005 8:38 am

I have split the thread, as it should not be in the Game Request Rules thread.

Nice work though! How many websites did you have to visit to find all of these? :D

Thanks for all the information!
Last edited by Mr.Mouse on Thu May 26, 2005 4:24 pm, edited 1 time in total.

KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 2 times

Post by KorNet » Thu May 26, 2005 3:46 pm

Yes has visited likely sites 100 :D

Post Reply