The PRAY file format is somewhat similar to the Creatures 2 COB format in that it is composed of "blocks".
A PRAY File begins with the majic word, the four-byte id 'PRAY'.
Then follows a set of blocks. Blocks are comprised of a Block Header then the Block Data.
The Block Header is made up as follows:
Type | Name | Description |
char[4] | type | The block type. Common types and their formats are listed below. |
char[128] | name | The name of the block. The last character should be zero, and any space in the structure should be padded with zeros. |
unsigned int | size | The size of the Block Data chunk for this block. |
unsigned int | usize | The size when uncompressed of the Block Data chunk for this block. |
unsigned int | flags | Bit one is set if the block is compressed (using zLib). All other bits are unused and should be set to zero. |
The block data is variable (there are many different types of blocks). I'll describe the most common type, the "Standard" PRAY block. Some block ids which use the "Standard" PRAY block are: AGNT, AUTH, EGGS, EXPC. Another useful block id is FILE. The block name is the filename: the block data is the file data.
The format of the "Standard" PRAY Block:
Type | Name | Description |
unsigned int | noints | The number of integer values. |
INTValue[noints] | ints | The integer values. |
unsigned int | nostrs | The number of string values. |
STRValue[noints] | strs | The string values. |
The format of the INTValue structure:
Type | Name | Description |
unsigned int | namelen | The length of the values name. |
char[namelen] | name | The values name. |
unsigned int | value | The value. |
The format of the STRValue structure:
Type | Name | Description |
unsigned int | namelen | The length of the values name. |
char[namelen] | name | The values name. |
unsigned int | valuelen | The length of the value. |
char[valuelen] | value | The value. |
We'll now go through some common value/name pairs for blocks.
The 'AGNT' value/name pairs:
Name | Example | Description |
Agent Bioenergy Value | 50 | The amount of bioenergy needed for the creator machine to produce this agent. |
Agent Type | 0 | The type of this agent. fixme |
Dependency Category X | 1 | The category of dependency number X. 1 is wave, 2 is c16 and 7 is catalogue. |
Dependency X | tada.wav | The filename of dependency number X, which should be in a FILE block. |
Script Count | 1 | The number of scripts included. Normally, this is set to one. |
Script X | inst endm | The content of script number X. |
Remove Script | inst scrx 1 2 3 4 endm | The removal script for this agent. |
Agent Animation File | yay.c16 | The graphics file to use in the creator machine preview. |
Agent Animation Gallery | yay | The Agent Animation File with the extension removed. |
Agent Animation String | String | The ANIM string to use in the creator machine preview. eg ANIM [1 2 3] would be "1 2 3" as a string. |
Dependency CountScript Count | X | I'm not sure ... I think it should be set to the same as the Script Count. |
The 'EXPC' (part of a .creature export file) value/name pairs:
Name | Example | Description |
Creature Age In Ticks | 28676 | The age of the creature when it was exported in game ticks. |
Creature Life Stage | 2 | The life stage of the creature when it was exported. |
Exported At Real Time | 946555801 | The real-world time of export. |
Exported At World Time | 164674 | The age of the world in game ticks. |
Gender | 2 | The gender of the creature. 1 is male, 2 is female. |
Genus | 1 | The genus of the creature. |
Genus | 1 | The genus of the creature. |
Pregnancy StatusVariant | 0 | The stage of pregnancy, I assume. |
Variant | 8 | For use with the Creatures Adventures variant system. |
Creature Name | Alice | The name of the exported creature. |
Exported From World Name | Fuzzie's World | The name of the world the creature was exported from. |
Exported From World UID | ship-t3hea-krrwu-7dhcc-zybws | The moniker of the world the creature was exported from. |
Head Gallery | A40c | The graphics file containing the head sprite for the creature. |
The 'AUTH' value/name pairs (all of which are optional):
Name | Example | Description |
Name | Michael 'Fuzzie' Milburn | The full name of the author. |
fuzzie@homecreatures.com | The e-mail address of the author. | |
URL | http://www.homecreatures.com/ | The URL of the authors home page. |
Organisation | HomeCreatures | The authors organisation. |
Comments | Have fun! | Any comments on the agents. |