PRAY files are files used by the Creatures Evolution Engine to store
agents and other information. The online functionality of Docking
Station works via the simple mechanism of transferring PRAY files over
TCP/IP.
It replaces the COB file format used in Creatures and Creatures
2.
The game engine is usually used to generate these files via CAOS, although
seperate tools are available to generate them (the official PRAYBuilder
tool and my own Zeus tool).
PRAY files have many different file extensions, eg .agent for agents, .family/.creature/.creatures for creatures, .blueprint for blueprints and .warp for files sent over the "warp" in Docking Station.
The file format consists of the four-byte id which is "PRAY" in ASCII,
followed by a set of blocks. Blocks are comprised of a Block Header
followed by Block Data (the format of which is specific to a certain type of
block).
The Block Header is made up of:
If a program doesn't understand (ie can't handle) a certain type of
block, it should just
skip it (using the length provided in the block header) and continue.
There are two main types of block: a "standard" PRAY block and a
"raw"
PRAY block. They have lots of different four-byte block ids, depending on
exactly what information is contained inside them.
Some common block ids (in ASCII) which use the "standard" PRAY block
format are: AGNT, AUTH, EGGS, EXPC. Another useful block id is
FILE, which
is a "raw" PRAY block allowing you to embed whole files inside a PRAY file,
where the block name is the filename, and the block data is the actual data
inside the file.
The "standard" PRAY block consists of a number of pairs of "value names"
and actual values (which can be integers or strings), and has a format as
follows:
- an "unsigned int" (4-byte) containing the number of integer values in
this block.
- the integer values, each one consisting of a CString followed by an "unsigned
int" with the actual value.
- an "unsigned int" (4-byte) containing the number of string values in
this block.
- the string values, each one consisting of a CString followed by
another CString with the actual value.
(A CString is an "unsigned int" (4-byte) with the length of the
string, followed by the string itself (non-null-terminated))
The information in this node was reverse-engineered by me a few weeks before the release of Creatures 3 and, while not guaranteed to be correct, has stood the test of time.