Welcome to the Creatures Wiki! Log in and join the community.

GEN files

From Creatures Wiki
Revision as of 19:41, 2 January 2022 by Ligfx (talk | contribs)
Jump to navigation Jump to search

.gen files contain the genetic information for new breeds as well as individual creatures, identified by the moniker.

Format

C2 and newer genome files start with the three characters dna, followed by the (textual) number representing the genome file version - '2' for Creatures 2, and '3' for the Creatures Evolution Engine.

The main part of the file (which C1-era files start with immediately) consists of any number of genes, which consist of the four characters gene, a gene header and gene data, which differs depending on the contents of the header. There is more information about the differing formats of genes in the gene types category.

When all the genes have occurred, there is then an end-of-file marker consisting of the four characters gend.

All numbers in the file are in little-endian form.

type description
char[4] file magic (only in version 2/3 genomes. "dna2" = version 2, "dna3" = version 3)
Gene Header first gene header
Gene Data first gene data, depends on gene type
... gene headers and data for rest of genes
char[4] file end marker, "gend"

Gene header

A gene header starts with two 8-bit values, representing the gene type and the gene subtype.

There are then another four 8-bit values, representing the gene identifier (for reference by GNO files), the generation number of the gene, the age at which the gene should be switched on, and the gene flags.

In version 2/3 genomes, there's then an 8-bit mutability weighting value, and in version 3 genomes, an 8-bit variant value, used in Creatures Village to turn on different genes for different species without needing separate genome files for each species.

type description
char[4] marker "gene"
uint8 gene type (0=brain 1=biochemistry 2=creature)
uint8 gene sub-type
uint8 gene id (for use with Genetics Kit)
uint8 generation
uint8 switchontime
uint8 flags
uint8 mutability weighting value (only in version 2 genomes)
uint8 variant (only in version 3 genomes)

Creatures 1 Genes

Brain Lobe (type 0 0)

type description
uint8 x
uint8 y
uint8 width
uint8 height
uint8 perceptible
uint8 cell_threshold
uint8 cell_leakage
uint8 cell_reststate
uint8 cell_attenuation
uint8[8] cell_staterule
uint8 cell_flags
DendriteType d0_type
DendriteType d1_type

DendriteType:

type description
uint8 source
uint8 min
uint8 max
uint8 spread
uint8 fanout
uint8 minltw
uint8 maxltw
uint8 minstrength
uint8 maxstrength
uint8 migration
uint8 relaxsuscept
uint8 relaxstw
uint8 ltwgainrate
uint8 gainevery
uint8[8] gainrule
uint8 loseevery
uint8[8] loserule
uint8[8] susceptrule
uint8[8] reinforcerule

Biochemistry Receptor (type 1 0)

type description
uint8 organ
uint8 tissue
uint8 locus
uint8 chemical
uint8 threshold
uint8 nominal
uint8 gain
uint8 flags

Biochemistry Emitter (type 1 1)

type description
uint8 organ
uint8 tissue
uint8 locus
uint8 chemical
uint8 threshold
uint8 rate
uint8 gain
uint8 flags

Biochemistry Reaction (type 1 2)

type description
uint8 r1_amount
uint8 r1_chem
uint8 r2_amount
uint8 r2_chem
uint8 p1_amount
uint8 p1_chem
uint8 p2_amount
uint8 p2_chem
uint8 rate

Biochemistry Halflives (type 1 3)

type description
uint8[256] chemical half-lives

Biochemistry Initial Concentration (type 1 4)

type description
uint8 chemical
uint8 amount

Creature Stimulus (type 2 0)

type description
uint8 stimulus
uint8 significance
uint8 input
uint8 intensity
uint8 features
uint8 chemical0
uint8 amount0
uint8 chemical1
uint8 amount1
uint8 chemical2
uint8 amount2
uint8 chemical3
uint8 amount3

Creature Genus (type 2 1)

type description
uint8 genus
char[4] mom's moniker
char[4] dad's moniker

Creature Appearance (type 2 2)

type description
uint8 body part
uint8 variant

Creature Pose (type 2 3)

type description
uint8 pose number
char[15] pose string

Creature Gait (type 2 4)

type description
uint8 gait number
uint8[8] pose sequence

Creature Instinct (type 2 5)

type description
uint8 lobe0
uint8 cell0
uint8 lobe1
uint8 cell1
uint8 lobe2
uint8 cell2
uint8 action
uint8 reinforcement_chemical
uint8 reinforcement_amount

Creature Pigment (type 2 6)

type description
uint8 pigment
uint8 amount

Related links

External links