WIP Animal Breeding Mod

Discussion in 'Mods' started by Axelius, Mar 10, 2016.

  1. Axelius

    Axelius Tentacle Wrangler

    So, I've been looking into getting into modding lately, and I came up with an idea for a mod I haven't seen much talk of so far, one that focuses on deepening the animal reproduction cycle. So I've laid up a plan for adding male animals to the game and gating pregnancy behind the presence of both a male and a female of the species. The initial plan is to do it for Cows, but later adding it to other animals as applicable.

    Considered features for version 1:
    • Adding male cows, bought separately from Marnie, not milkable.
    • Pregnancy automatically disabled unless both male and female live in the same barn.
    • Mating chance calculated overnight in the barn.
    • Listing of both parents on the kid.
    Features for the future:
    • Males for other barn animals.
    • Mating chance based on proximity over the day.
    • Pregnancy period (unsure if this is already in the game)
    • Prevention of incest.
    • Mating animation (optional).
    Possible future features:

    • Breeding quality, adding a multiplier to all breedable animals that affects Price, Chance of Large Milk, Wool growth, Truffle finding chance.
    • Roosters and male ducks (presence increases chance of eggs being produced and chance of Large Eggs, presence required for incubator)
    • Bunny mating

    My current plan is to start to seriously digging into the game files this weekend, but I appreciate any help offered, as I predict this might become a bit fiddly.
     
    • Greenxblack164

      Greenxblack164 Scruffy Nerf-Herder

      I would love this!
       
      • nickelcurry

        nickelcurry Subatomic Cosmonaut

        Yessss, I would also love this! It would be so fun to get different qualities from the parents and different generations :D
         
        • alacazain

          alacazain Void-Bound Voyager

          Please also add butchery mod. So we can profit on nice steaks.
           
            Declension likes this.
          • Axelius

            Axelius Tentacle Wrangler

            Rest assured, I have not dropped this project, but the functionality of the API doesn't quite support the things I need it to do to be able to pull it off. I'm looking at ways to contribute to the API so it can be done, but as I haven't done that type of coding before it is tough. I do know roughly where all the variables I need to change are located though.

            As for butchery, I have plans for that as well, but I am unsure about if it should be another mod in its entirety or if it should be part of the same.
             
            • taintedwheat

              taintedwheat Master Astronaut

              I was telling my husband that there should be something like this. I'd like to be a dog breeder ahhhh gd
               
              • Axelius

                Axelius Tentacle Wrangler

                Once I have everything I have already planned adding in a kennel and dogs ought to be pretty easy. But as said, the first step is the hardest.
                 
                  taintedwheat likes this.
                • taintedwheat

                  taintedwheat Master Astronaut

                  Still man, even without a meatery yet you're still badass-ery for trying.

                  /lame
                   
                  • Kenma

                    Kenma Void-Bound Voyager

                    I'd totally support this. Can't wait for that mating animation though X3
                     
                    • Axelius

                      Axelius Tentacle Wrangler

                      Just realised that if I made the new dogs a type of Farm Animal they would have to have a meat index... I'm not sure I am comfortable with this...
                       
                      • taintedwheat

                        taintedwheat Master Astronaut

                        Ugh, me neither because I love pups man.

                        In a different worldly perspective, I kinda understand but not really. Especially when dogs show affection toward everybody.

                        But it's kinda crazy how people eat dogs and other cute animals in different places around the world. Like guinea pigs in Peru
                         
                        • taintedwheat

                          taintedwheat Master Astronaut

                          Could the index be put at zero or a negative integer so even if someone tries to do that especially because they're mean and crazy, won't get any money from it?
                           
                          • Axelius

                            Axelius Tentacle Wrangler

                            There are ways of handling it, and I could if I want it set their meat index to "sap", it was more merely the concept of setting such a property.
                             
                            • taintedwheat

                              taintedwheat Master Astronaut

                              Oh definitely, I feel you dude. Principle is important V:
                              Especially dogs are way better than sap xD
                               
                              • Rocazino

                                Rocazino Space Hobo

                                That would be awesome :-D I'd love to download this when it's done. Must be difficult to make, though
                                 
                                • Axelius

                                  Axelius Tentacle Wrangler

                                  Bit of an update on the current situation. I've looked at the code and I have a pretty good grasp on what happens in the current established events and the rules that surround it and I think I have a solution. As such, these are my conclusions for what I will do.

                                  1. At least to start with this will be a combined .xnb and Storm API mod. The things I need to do for pregnancy events and such require me to use Storm, but Storm lacks the tools for now to completely add a new type of animal. To begin with the xnb that will be edited is the FarmAnimal data xnb, so this mod will be incompatible for the forseeable future with any mod that changes it. Sprites will be supplied in their own xnbs for this mod.
                                  2. Trying to untangle the current Pregnancy event would be too much of a hassle to deal with now, so I'll leave it in for the time being. Instead the mod pregnancy event will fire after any normal farm event. Currently the mod pregnancy event only works for cows anyway, so I felt it best to keep the old one in. This means that the "virgin births" of the game may still happen and you can have two births the same night, but also that Bulls can spontaneously multiply as well. Once I have implemented functionality for all current barn animals I'll have the mod turn off the normal pregnancy entirely.
                                  3. To balance this this event is farm more likely to fire than the normal event, I have yet to decide how much, but I was thinking of having a 10% chance of doing this check every night (compared to roughly 5% on a night no other event happens). Breeding with bulls can also happen in a normal barn instead of a Big Barn and up.
                                  4. The child will for now always be a cow of the same type that the mother is. I hope to change this to include child bulls in the future, but I have not been able to do it yet.

                                  Remaining to do before release is:
                                  • Add Bulls to Marnie's animal shop.
                                  • Finish off Bull Sprite, for now I am just modifying the white cow to remove the udders and add a nose ring, but if any more artistically talented people out there want to help, it would be gladly accepted.
                                  • Testing. Testing. Testing.
                                   
                                    Zhuria, Kenma and Pingulrik like this.
                                  • Pingulrik

                                    Pingulrik Scruffy Nerf-Herder

                                    Awesome! I'm really excited for this!
                                     
                                    • blargsnarf

                                      blargsnarf Pangalactic Porcupine

                                      ;)
                                       
                                        Pingulrik and Kenma like this.
                                      • Kenma

                                        Kenma Void-Bound Voyager

                                        *winky face* *winky face* *winky face* *winky face*

                                        In all seriousness, this is looking really promising. I wish I could do more to help beyond wishing you luck, but my talents are pretty limited to just testing and maybe some crappy sprite work. :slowpoke:
                                         
                                        • alacazain

                                          alacazain Void-Bound Voyager

                                          Support this, like to add some though. Add bulls (what are male cows xD?), calfs, hogs.

                                          Add butchery!
                                           
                                            Declension likes this.

                                          Share This Page