[1.2] Animal Genetics (Selectively breed better animals)

Started by Razza, September 12, 2020, 07:57:09 AM

Previous topic - Next topic

Razza

Animal Genetics
Animal Genetics adds 7 genetics traits to animals that can be passed down to their children. Children will be born with either parent's value inherited, modified by a mutation factor.

Selectively breed your animals to be stronger, tougher and faster, carry more in caravans, or increase meat/leather/milk/wool yields. Humans have been doing it for 1000s of years, so why not your Rimworld Pawns? Go from Muffalos to Buffalos!

These genes will modify the animals base values by a % value. Adds new Genetics tabs to display all animals/wildlife values, as well as on animals detailing their stat breakdown (see screenshots).
For example, an animal with a 150% Speed gene will move 50% faster than base, or an animal with a 200% Milk/Wool gene will produce 100% more Milk/Wool. Be careful however, as animals can have genes with values under 100%, resulting in a decrease to base values.
The gene range for wild/parentless animals as well as the mutation factor can both be adjusted in game via the mod options menu. Also includes two different color schemes when displaying gene values (see screenshots).

Genetic Traits

  • Health - Total health of body parts.
  • Damage - Melee attack damage.
  • Speed - Movement speed.
  • Capacity - Carry capacity and caravan weight.
  • Meat - Meat from butchering.
  • Leather - Leather from butchering.
  • Milk/Wool - Milk/Wool yield.
Images


Compatibility
Plays nice with other mods in testing. Should also be safe to remove and add mid-game.
Requires Harmony.

Downloads
GitHib
Steam Workshop

Notes
MIT License
Please leave a comment here if you find any issues or have any suggestions for the mod.

Nomalastor

Hi Razza,

I really like the idea of your mod. However, when I try to install it, I have a bunch of error notifications.
Error log: https://gist.github.com/79c156ce18070f4f317ff89a6d0f4e27
Please find attached a screenshot of the errors.

Canute

Nomalastor,
when you installed the mod manualy could you check the installed mod folder ! Maybe you missed something.
I download AnimalGenetics-0.5.zip from Github, installed it and got no errors
https://gist.github.com/7250f83ad5054756e52ebb4469709d36

Heni

The mod work well, except that i breed two wild boars, one with 121% of leather and the other with 112%, the others stats are above 100% (they are pretty good)... The problem is that his baby born with 98% on leather and the other stats below 100%, worst than his parents. I want to know if this stats are random or this is a bug?

briteshadowwolf

So the actual genetic modifiers seem to be working and all, but I'm getting no parent values from breeding and all my baby animals are just spawning as if they are new animals instead of bred. I could only find 1 hugslib error message, but maybe I'm doing something wrong or there's a conflict I missed somewhere?

Null key while loading dictionary of Verse.Thing and AnimalGenetics.StatGroup. label=data
Verse.Log:Error(String, Boolean)
Verse.Scribe_Collections:Look(Dictionary`2&, String, LookMode, LookMode, List`1&, List`1&)
AnimalGenetics.AnimalGenetics:ExposeData()
Verse.CrossRefHandler:ResolveAllCrossReferences()
Verse.ScribeLoader:FinalizeLoading()
Verse.Game:Verse.Game.LoadGame_Patch2(Game)
Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow(String)
Verse.<>c:<Start>b__1_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()

Meitana

Great mod, I was thinking the other day about a mod like this. I had some success breeding a better than average foal in two generations though I also had some suggestions:

* Adjustments to food requirements. I imagine a higher milk/wool/egg (other non-slaughter resources) production would mean higher food needs and would balance out breeding super-producers
* Impact of inbreeding/genetic issues. Chance of negative mutations (listed on the health tab) that override the genetic percentage, as well as being passed down. Most likely an optional addition as with a small breeding pool this can cause major issues
* Intelligence and Endurance. Two additional options, intelligence can either allow for higher (or lower) training skills (e.g. from basic to intermediate to advanced) or increase/reduce the time it takes for an animal to lose a trained skill. Endurance ties in to tiredness and sleep, as well as overworld travel time