Back to mods
Genelib project artwork

Vintage Story Mod DB · Vintage Story mod

Genelib

This mod does nothing useful on its own. Install if another mod requires it. This mod provides genetic inheritance support for mods which depend on it. Currently that includes: Truth and Beauty: Detailed Animals - currently only chickens and goats, more anim

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Genelib release matches 1.22.4?

Updated 8 days ago
Best match for your filters 3.2.0
Game version 1.22.0, 1.22.1, 1.22.2
Loader Built-in Vintage Story mod system

Genelib 3.2.0 targets 1.22.0, 1.22.1, 1.22.2. The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server. No extra mods listed for this file.

Where it goes

Is Genelib required on the client, server, or both?

The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

No client/server declaration is available from this source.

What else does Genelib 3.2.0 need?

3.2.0 on 1.22.4. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Genelib without breaking your instance.

Built for Genelib 3.2.0 on 1.22.4. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 3.2.0. It targets 1.22.0, 1.22.1, 1.22.2; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 3.2.0. It opens that exact file at the source.

About this project

What does Genelib add?

This mod does nothing useful on its own. Install if another mod requires it.

 

This mod provides genetic inheritance support for mods which depend on it. Currently that includes:

Truth and Beauty: Detailed Animals - currently only chickens and goats, more animals planned!

Truth and Beauty: Seasonal Animal Breeding - no genetics, but Genelib provides the seasonal breeding code logic in a way compatible with my other mods

Equus: Wild Horses - horse genes include agouti, extension, tobiano, and more!

The GUI dialog for naming your animals also comes from here. Look at an animal and press "N" to open it. Works with just Genelib for Monoceros, Draconis, Pegasus, and Equus. Installing Detailed Animals will enable this feature for all remaining vanilla and modded animals.

Genetic inheritance

Basics of how genetics work: Each species comes with a number of genes, each of which may come in multiple variants. Every individual animal has two of the variants for each gene, or two identical copies of the same variant. These determine traits such as coat color.

To give a concrete example, let's look at horses. Horses have a gene called extension that determines which type of pigment colors their fur. One variant called E allows for both black and 'red' (a term geneticists use for a range of shades from coppery to golden), while the other one, e, only allows red and not black. Since every animal has two variants of each gene, an individual horse could have E/E (that is two identical copies of E), E/e or equivelantly e/E, or e/e. You'd probably figure a horse with E/E would be partly red and partly black, while a horse with e/e would be fully red, and you'd be right (with some simplification). But what about E/e, that has one of each variant? For that we need to know that E is dominant over e and therefore hides its effects, so the horse would be partly red and partly black just like with E/E. Conventionally the dominant gene is named with a capital letter and the recessive one with lowercase, which makes it easy to remember which one wins conflicts (but sometimes hard to remember what each one actually does).

Ok, but what does all that have to do with inheritance? Well, when two parents produce a foal, they pass on one of their two variants of each gene, chosen at random. So if the mother has E/e, she has half a chance to pass on the E and half a chance to pass on e. And suppose the father has e/e, he passes one on at random and it's going to be e because that's the only one he's got. Putting those together you have half a chance to get a foal with E/e who looks like its mom, and half a chance the foal will be e/e and look like its dad. It doesn't always have to work out this way! Other pairings might get foals with a 100% chance to look like say their mom, and others still might have a chance that the foal will not look like either parent. You can figure out which situations these happen by doing way too many Punnett squares in your local high school biology class.

This horse example of course only applies if you have Equus: Wild Horses installed.

Sex-linked genes

These are only implemented for chickens in Truth and Beauty: Detailed Animals at the moment. Remember how I said each animal has two variants of each gene? That was actually a simplification that these put the lie to. Depending on its species and gender, an animal may have one or two variants - not two different ones or two of the same one, but actually two or only one - matching the sex chromosomes it has.

You may have heard that males have an X and a Y chromosome, while females have two X chromosomes. This is the case for mammals generally (don't mind the platypus). However, birds do things differently. In birds, the male has two Z chromosomes, while the female has one Z and one W. Don't worry too much about the changed names, the important bit is that in mammals, females have two of the same sex chromosome and males have one of each, while in birds it's reversed.

To give a somewhat obscure but concrete example, in chickens there is a sex-linked gene that can allow or prevent the legs from being black. For simplicity let's only consider black chickens, not brown ones. The brown ones generally have yellow or light legs regardless of the gene we're about to discuss. Anyway, for black chickens, a sex-linked gene called 'inhibition of dermal melanin' affects whether their legs will be black like their feathers, or yellowish. One variant causes black and the other causes yellow, and yellow is dominant. This is sex-linked on the Z chromosome of chickens, that's the one males have two of, so any male chicken has two variants (two of the same or one of each), while each female chicken only has one. Just like the regular genes, a male chicken will pass on one of his two variants at random to each chick. However females have one variant - on their Z chromosome - and then a W chromosome that does not have the gene at all. They could pass on either their variant of the gene together with the rest of the Z chromosome, making a male chick, or they could pass on their W chromosome, for a female chick.

Let's look at an example where a hen with yellow/- is crossed with a rooster with black/black. That's a hen with yellow legs and a rooster with black legs. The rooster is guaranteed to pass on the gene for black legs because that's the only version he has. The hen can either pass on her yellow, also making the chick a male, or pass on her W chromosome, making the chick a female. So when you hatch a batch of chicks from this pair, all of the males will have yellow legs like their mother, while the females will have black legs like their father. I bet you thought it'd go the other way, huh? But no, this is how it works out in this one example. Other pairs of parents might get different results, like if you crossed the male (yellow/black) with the female (black/-) chicks from that pairing you'd get yellow-legged females, black-legged females, yellow-legged males, and black-legged males, each with equal probability.

Don't forget to reverse all that if you're working with mammals instead of birds. :p

Mutations

For every young animal born, there's a tiny chance that a mutation happens and it could inherit a different variant of a gene than what its parents would normally have provided. The chance is really very tiny, I'll leave the exact number vague but just say it's less than one in ten thousand per gene. Mutations are not intrinsically good nor bad, just different.

Inbreeding

Animals in mods using this library may have reduced fertility if they are inbred. If you don't want to think about the details, just try to avoid breeding close relatives like parents or siblings together.

For thoser of you familiar with Planet Zoo, it's a pretty similar system, but more forgiving. It takes more generations for problems to pop up, and you can start a healthy population from fewer animals.

Inbreeding is based on real-life genetics rather than popular conception, so you may find these details surprising:

  • If you do inbreed animals, due to genetic purging the offspring will tend to be more resistant to inbreeding than their parents were. This will not change fast enough to avoid the negative effects.
  • An animal will only be inbred if both its parents are related - so if you have two different very inbred families (say, one player's ranch and another player's ranch), crossing them will produce offspring that are not inbred at all, but are related to both families.
  • Inbreeding for multiple generations in a row is much worse than doing it just once. One of the worst possible strategies is to breed siblings together, then breed their children together and repeat. The only worse strategy is this one.
  • If you are only able to capture one pair of animals from the wild, there are still better and worse breeding strategies you can do with them. Worse ones are as above. Better is to get at least 2 male and 2 female offspring from the original pair (the more the merrier), then you only need to cross siblings once before you can start working with cousin pairings.
  • The system is not based on family trees so you can't trick it by finding obscure relations that don't count. Distant relatives count a tiny bit and close relatives count a lot. Overall I'd recommend trying to keep things around cousins range or less.
  • Small amounts of inbreeding are unlikely to cause problems. If you follow the tree of life back far enough we're all just a little bit related anyway.


Reduced fertility will show as:

 - With vanilla breeding mechanics: The female's portions eaten will go down to 0 without her becoming pregnant.

 - With Detailed Animals: The female will become pregnant, but then miscarry. Or for egg layers, the egg will lose its fertility during incubation.

 

Why was this feature added? Because I want to later add genetics for traits such as size, health, maybe stamina, and so on. And an interesting detail of realistic genetics that most people don't expect is that if you are breeding to maximize or minimize a certain trait you need to avoid too much inbreeding. Inbreeding makes animals very similar to one another, but if you're trying to change a trait, you want them to be different. So this time I added in a reason to avoid that right from the start, and this one was the gentlest possible implementation I could think of.

 

See https://github.com/sekelsta/genelib/wiki/Configuration for info on how you can configure this mod.

 

Languages

English, Spanish (Español). I am a beginner at Spanish so please let me know if there are errors, por favor dime si hay errores.

French (Français) --- Thanks to Flamby38

German (Deutsch) --- Thanks to Brady_The

Polish (Polski) --- Thanks to Niexyk

Portuguese, Brazilian (Português brasileiro) --- Thanks to Zatin

Russian (Русский) --- Thanks to ИгОорКа

Ukrainian (українська) --- Thanks to DeanBro

As of version 1.1.4, English, Spanish, German, Polish, Portuguese, Ukrainian, and Russian are complete and up-to-date.

 

Logo credit: Wikimedia commons

 

If you find a bug, please first try updating your mod version in case it was already fixed, then let me know on discord or on the github issue tracker.

Project description from Vintage Story Mod DB.

Pick your setup

Genelib releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

28 available setups

Showing the newest 12 of 28 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Genelib versions and loaders

1 of 33 releases match
Clear filters

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.