Mating in C3 critters is a special state which is typically controlled by sex drive (OV21) increasing past a threshold (when they are old enough), and by a flag being set - although food is considered more important.
The normal logic flow in the timer script
Typically, mating is switched on by OV00 (State) being 6, and it is an intermediate step in the normal logic flow in the timer of most C3 critters - which typically follows this pattern:
- increase age
- decrease energy
- if old enough, increase sex drive
- drown in water - lose energy rapidly
- if low on energy (sometimes also OR if too old) flag for death
- if hungry flag to get food
- if sex drive high, flag to mate
- obstacle checking - sometimes also water-shyness
- if flagged for death go to die subroutine
- if flagged to get food, get food
- if flagged to mate, mate
- if flagged to roam, roam
The logic flow in the timer script being arranged around two phases - first flagging, then checking the flags - is an example of a behaviour tree. This has the benefits of avoiding conflicts in behaviour, creating a predictable flow, allowing for lifelike complexity (flagging for multiple behaviours allows the system to choose between them with DOIF logic), while being performance friendly.
Mating strategies
Interestingly, some critters have male and female types (OV06 being 0 or 1) and find an opposite sex mate to impregnate (reusing some code from the hunting food behaviour, as in the hedgehog and the dragonfly), and some simply reproduce parthenogenetically (without needing to find or hunt a mate) when their reproductive drive is past a certain threshold (and they have enough energy), such as the hoppity. Additionally, even some critters that find mates and get pregnant only use pregnancy as a binary state (pregnant or not) rather than having a gestation period.
Reproduction Step-by-Step: a Hedgehog in Love
Let’s walk through how a hedgehog goes from carefree youth to proud parent:
1. Maturity and Sex Drive
-
The hedgehog ages via the
ov01
counter. -
Once it passes age 1000 and enters adulthood (
ov05 = 2
), it starts building sex drive (ov20
). -
This happens gradually, simulating the onset of reproductive maturity.
Fun detail: The "youth" hedgehog is actually removed and replaced by an adult version—a trick to avoid bounding box errors.
2. Seeking a Mate
-
When sex drive (
ov20
) exceeds 200, the hedgehog changes state to "Find Mate" (ov00 = 2
). -
It searches nearby using genus and species markers (
ov47
,ov48
,ov49
) for a compatible mate of the opposite sex.
3. Mating Process
-
If a suitable mate is found, the state changes to "Mate" (
ov00 = 6
). If a mate is not found, the hedgehog returns to roaming behaviour. An error in this logic, fixed in the Norn Woodland Fix Patch, is that ov16 should not be set to null twice before calling the find subroutine, and that hedgehogs are curiously undiscerning of their target's gender when seeking a mate. -
The
mate
subroutine verifies gender compatibility and, if successful, sets the pregnancy counter (ov70 = 1
) for females. -
The sex drive (
ov20
) is reset to 0 after mating.
4. Pregnancy and Birth
-
The pregnancy counter (
ov70
) increases over time. -
When it exceeds 10, the hedgehog enters "Give Birth" state (
ov00 = 7
). -
The
layg
subroutine handles the birthing process, spawning new baby hoglets.
Once their part in the mating ritual is finished, the parent hedgehogs return to roaming (ov00 = 0
), ready to begin the cycle again.
Key Variables for Reproduction
-
ov06 – Gender:
0 = female
,1 = male
-
ov00 – State:
-
0 = Roam
-
2 = Find Mate
-
6 = Mate
-
7 = Give Birth
-
99 = Die
-
-
ov20 – Sex drive level (increases with age and plays a role in determining when a hedgehog seeks a mate).
-
ov70 – Pregnancy counter: When it’s greater than 0, the hedgehog is pregnant.
-
ov01 – Age counter: When the hedgehog reaches a certain age (1000), the script starts checking for mating behaviour.
-
ov16 – Target (food or mate): Used to track the hedgehog’s current mate.
-
ov05 – Life stage (1 = youth, 2 = adult).
-
ov02 – Energy: Used for survival but also affects mating behaviour. If low, the hedgehog seeks food.
-
ov73 – Hunger threshold: If energy drops below this, the hedgehog seeks food.
Visualizing the Process:
-
Roam (ov00 = 0) → Find Mate (ov00 = 2) → Mate (ov00 = 6) → Pregnancy (ov70 1-10) → Give Birth (ov00 = 7) → Roam (ov00 = 0)
This flow ensures that hedgehogs mature, seek mates, reproduce, and care for their young, all while adhering to a life cycle that mirrors natural behaviours. Note that this is laser-focused on only the reproductive cycle, and seeking food takes priority in the hedgehog's mind - it cannot search for a mate until it has first checked if it is hungry.
Bugs
One particularly odd case is the dragonfly, whose mating behaviour appears to be a bit of a bug—literally and figuratively. While it starts the process of finding a mate using the same targeting logic as other critters, it sometimes treats them as prey instead of a partner—approaching the intended mate only to eat them rather than complete the mating process. This quirky behaviour likely stems from overlapping use of the ov16
target variable, the fact that dragonflies hunt their own whole genus, the fact that dragonflies are more likely to be in contact with energy-draining water bodies, and a bug in state transitions, causing the dragonfly’s natural instincts to blur in a way that's more predatory than romantic. This bug is fixed in the Steam and GOG.com editions of Creatures Exodus.
Conclusion: Added realism and depth
While the mating logic in Creatures 3 operates entirely behind the scenes, it plays a fun and crucial role in making the ecosystem feel alive, real and self-sustaining. It’s not something players typically see directly—but it quietly governs when critters reproduce, how they prioritise needs, and how population dynamics shift over time, such as when a norn develops a taste for hedgehogs.
At the heart of this system is a behaviour tree structure: a two-phase loop where the critter first flags possible actions based on internal variables (like hunger or sex drive), and then acts based on priority. This design avoids conflicting behaviours, keeps things running efficiently, and allows complex decision-making to emerge from relatively simple rules.
This kind of background scripting, although largely hidden from view, adds realism and complexity to your creatures’ world—creating behaviours that feel organic, even when driven by simple variables and checking a list of possible states.