Sunday, December 21, 2014

Parsing the Creatures 1 "TheRegister" file. (extracting Norn birthdates and owner information).

This will be a real quick article about parsing the Creatures1 "TheRegister" file.
This is like a primitive version of the C2 history files. It's the file that holds all creature information saved when you register a creature's birth.

They contain information about the Norn such as name, parents, date of birth and all owner info.

There's nothing really fancy about reversing and understanding the file format, so let's get this done.

Reversing the file format.

TheRegister is one of the easiest files to understand.
Let's first register a Norn's birth by fully filling all fields so any guesswork is taken out of the process:

And open TheRegister file in a hex editor:

The first thing we notice is that most recent entries are at the top of the file.

The meaning of all fields is then pretty intuitive, as apart from a 2byte header, the whole file is just a series of Cstrings.

It is easy to match them to data from the file:

Format for first entry is described here, the rest is just a series of similar entries.


The format of the Creatures 1 "The Register" file is:

Where each entry is of the following form:

Be careful when parsing this file, as I noticed that similarly to the PhotoAmbum files, this file tends to get corrupted if you perform multiple rewrites on it from inside the game (by registering a creature multiple times and/or without names for example)

I hope I didn't bother you too much with this one.
There are still a couple more file formats we will learn to parse in the near future.

No comments:

Post a Comment