← All posts

Every species runs its own script

How an animal lives is now written in a script that belongs to its species, and you can read it in the Studio. That is what lets anyone make a new species, and a broken script can't take your world down.

The Pilosa, the Glabra and the Lubrica have always behaved differently from each other. Until now, though, the game itself knew how each of them lived, and that knowledge was built into the game’s own code.

We’ve taken that out. How an animal lives is now written in a script that belongs to its species, and the game’s job is only to provide the world for the animal to live in. You can open the script for any of the three in the Studio and read it.

Part of the Pilosa's script in the Studio: what it eats, its life stages, its size and how bold it is.Work in progress · in-game
Part of the Pilosa’s script in the Studio: what it eats, its life stages, its size and how bold it is.

What you’re looking at

That is part of the Pilosa’s own script, just as it opens in the Studio. The grey comments explain each setting in plain words. This part of the script says what the Pilosa eats (fruit four times in five, and a fungus the fifth), how big it is, and how bold it is when something threatens it.

The block in the middle is its life stages. Each line is one stage, with how many seconds it lasts and how big the animal is. A baby is a little over half its adult size and lasts 120 seconds. An adult lasts 600 seconds, which is one game day. Old and ancient Pilosa slow down to three quarters speed and then half speed, and they fade.

Further down, the same script says how the Pilosa copes with heat and cold, which biome it likes to live in, and how it gets on with other animals. The Studio also lists these settings the way the game reads them, and it has a Test run button so you can try out a script.

Everything an animal does

Almost everything an animal does now lives in its script. That covers choosing what to do, where to go and how fast, eating, drinking, sleeping, playing, greeting, courting and mating, who may mate, laying eggs, running away, hunting and fighting, and how its hunger, tiredness, health and age change over time. A script also decides what the animal shows you: how it moves, its thought bubbles and its sounds.

The game keeps only the things that belong to the world rather than to the animal. Bodies fall, stand on the ground, sink and float. There is one limit on how many animals a world can hold, shared by every species. An animal with no health left dies, and age counts up with game time.

The three species we ship share a base script that describes the usual way an animal lives. Each species then says only what is different about it. A species can replace any part of that usual behaviour, so one could never sleep, and another could run from everything it sees, without any change to the game itself.

What this gives you

Anyone can make a new species. A species that breeds on its own, never sleeps, or fights to the death is just a script, written in the Studio. You can read the game’s own species, and copy one to use as the start of your own.

A broken script can’t break your world. If a species’ script fails, the game tells you, then takes every animal and egg of that species out of the world and saves each one to a file in Animals/automatic/, named with the date and time. A text file in the same place says when it happened and why. The rest of your world carries on, and you can import the animals again once the script is fixed.

Errors say what went wrong. When something fails, the game log names the part of the script, the line, and the message, so someone making a species doesn’t have to guess.

What hasn’t changed

The Pilosa, the Glabra and the Lubrica behave exactly as they did before. Moving their behaviour into scripts changed how they are built, not what you see. Genes also remain hidden from players, as before.

Coming soon to Steam.