Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

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: 4 times

Post by KorNet »

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: 4 times

Post by KorNet »

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.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 689 times
Contact:

Post by Mr.Mouse »

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: 4 times

Post by KorNet »

Yes has visited likely sites 100 :D
User avatar
AxelNoir
mega-veteran
mega-veteran
Posts: 245
Joined: Fri Feb 02, 2018 9:24 pm
Has thanked: 6 times
Been thanked: 16 times

Re:

Post by AxelNoir »

KorNet wrote: Thu May 26, 2005 12:38 am James Bond NightFire 007 (Delphi - Pascal code)

type N007Header = packed record
Magic: Integer; // Always 1 ?
Version: Integer; // 1 = Used in Nightfire Demo
// 3 = Used in Nightfire Retail
Magic2: Integer;
ID: array[0..3] of char;
NumRootDirs: Integer;
end;
// If version = 3 then following the header is an integer giving the number of entries
// Get32 filename
N007Entry = packed record
Compressed: byte;
Size: integer;
CompSize: integer;
end;
// If version = 1 then follows Size bytes of data (if Compressed = 0) or CompSize (if Compressed = 1)[/b]
For someone uneducated like me, what exactly is this? A script to unpack files or something?
User avatar
Dinoguy1000
Site Admin
Posts: 786
Joined: Mon Sep 13, 2004 1:55 am
Has thanked: 154 times
Been thanked: 164 times

Re: Kornet's Format Information

Post by Dinoguy1000 »

Based on the description, it's Delphi Pascal code, though I couldn't tell you how to actually use it (presumably you'd have to use the Delphi interpreter, though after almost two decades, who knows if the code would be usable without updating it some).
Welcome to Xentax!

Rules | Requests | Wiki | Discord

If you run across a post that breaks the rules, please report the post - a mod or admin will handle it from there.
Post Reply