RELEASED Animal Husbandry Mod (former Butcher Mod) [v2.4.1]

Discussion in 'Mods' started by Digus, Oct 9, 2017.

  1. Digus

    Digus Spaceman Spiff

    Status:
    Found some problems with the code to save the tools. Fixed it and it seems to be working in singleplayer. Multiplayer is still bugged.
    Also fixed some test code I left before, pets were not consuming items when being feed. That is over now, hehehe

    I'm thinking on changing how the mod open custom letters and the animal query menu.
    Now they use the SMAPI menu changed event. The problem is that they run all the code in the constructor before I know the menu was open so I can change and open it again. It has some weird effect like an extra sound and custom buttons being shown a little bit after the rest of the menu. I can use injection avoid this problems and even give me more control of what happens. This will be useful to implement the letter background, but that means the MailFrameworkMod will also depend on the Harmony framework. I'm still thinking about it.
     
    • Digus

      Digus Spaceman Spiff

      Status:
      Manage to change the way letters are open using the patching.
      Also implemented custom background for letters, using the same ones from the game:
      [​IMG]
      [​IMG]

      I also placed a way to set which Texture2D object to use, so you can set your own custom one. But have not tested it yet.
      I also need to implement a way to change the letter color, since darker background will not work with the default color font.

      After that I will make a custom background for the interdimensional friend.
      [​IMG] [​IMG]
       
        lexiejetts and HopeWasHere like this.
      • Digus

        Digus Spaceman Spiff

        Status:
        Added a way to change the letter color. It's not any color, but you can change to any color the game supports ( 10 different ids)
        Also tested the letter color and background, it's working fine.
        All this will be on version 1.3 of the MailFrameworkMod.
        [​IMG]
         
          HopeWasHere likes this.
        • Majii

          Majii Aquatic Astronaut

          Just wanted to pass along that the latest version of SMAPI passes over loading Animal Husbandry for me. But then again it also says that MailFramework and PyTK are out of date despite using the beta friendly versions. https://log.smapi.io/GuaYGBWG
           
          • Digus

            Digus Spaceman Spiff

            Thanks for the warning.
            Probably there was some change on the Stardew Valley code that broke the mods.
            There is not much I can do now, I will take a look at it when I get home.
             
            • Digus

              Digus Spaceman Spiff

              Looking better in the log, the problem is what I said, the logs even say what has changed:
              Code:
              08:58:35     TRACE     SMAPI           Broken code in PyTK.dll: reference to StardewValley.Farmer.craftingRecipes (field returns StardewValley.Network.NetStringDictionary<System.Int32,Netcode.NetInt>, not StardewValley.SerializableDictionary<System.String,System.Int32>).
              08:58:35     TRACE     SMAPI           Broken code in MailFrameworkMod.dll: reference to StardewValley.Farmer.cookingRecipes (field returns StardewValley.Network.NetStringDictionary<System.Int32,Netcode.NetInt>, not StardewValley.SerializableDictionary<System.String,System.Int32>).
              08:58:35     TRACE     SMAPI           Broken code in AnimalHusbandryMod.dll: reference to StardewValley.Farmer.professions (field returns NetList<System.Int32,Netcode.NetInt>, not List<System.Int32>).
              It should be really easy to fix, but PyTK will need to be fixed.
               
              • Digus

                Digus Spaceman Spiff

                Status:
                Uploaded the new beta version of Animal Husbandry Mod and MailFrameworkMod.
                PyTK still needs to update, the mod will require the new 0.9.4 version.

                MailFrameworkMod now includes harmony. If harmony fails to load some how, the mod will use the old method to open letter, but color change to the letter text will not work, since it also depend on the harmony.
                Animal Husbandry Mod does not includes harmony anymore since both it's dependencies already includes it. It still use it though.
                 
                • Majii

                  Majii Aquatic Astronaut

                  MailFrameworkMod is crashing on load. https://log.smapi.io/xfaM7RHx
                   
                  • Digus

                    Digus Spaceman Spiff

                    I'm aware of that. PyTK changed its version of harmony and is causing conflict.
                    It shouldn't affect anything important.
                    Next version will fix this.
                     
                      Majii likes this.
                    • Digus

                      Digus Spaceman Spiff

                      Status:
                      Just updated the new version fixing the harmony conflicts.
                      Lost most of the night trying to set breakpoints to debug the code. The problem is with SMAPI. Thanks to Cat from the discord channel, he sent me a workaround until it's fixed.
                      I also implemented the new way to open the extended animal query menu, now there will be no more double sound and the new buttons will load together with the menu.
                      Since I was patching the 'pet' method, I also implemented a fix to the profession overflow.
                      It should not conflict with other mods that does that. I just check with the bug is going to happen before calling the pet method. If it does, I subtract the right amount before calling the method, this way the mood will never overflow and will sum 255 correctly.
                       
                      • Majii

                        Majii Aquatic Astronaut

                        Completely and totally platonically love you right now.
                         
                        • Digus

                          Digus Spaceman Spiff

                          Status:
                          Implemented eater egg feature to get meat from dinosaurs.
                          It won't have it's own kind of meat, instead a dinosaur will give any of the other 6 kinds of meat. You can disable this on the config as always.
                          The amount of meat follow the same rules for other animals, and the maximum amount of meat pieces consider the max value of the dinosaur and the meat price.
                          If you are lucky to find an dinosaur early in game, you can also get all kinds of meat early. But dinosaurs are not a good source of meat, their max value is only 1300g, so unless you get rabbit or pork, it's not worth the trouble of raising them.

                          I also implemented meat as a shipped item. It now will show in shipping collecting as well as the shipping count. Unfortunately, only meat shipped after the new version will count.

                          All this will be up when I upload a new beta version.
                           
                          • Digus

                            Digus Spaceman Spiff

                            Status:
                            Finished the custom letter background for the inter dimensional friend.
                            Too the wizard letter as base, changed the color and added what should be their world like, with the animals they receive and their meat trees in the side.
                            [​IMG]
                             
                              Last edited: May 22, 2018
                              HopeWasHere likes this.
                            • Digus

                              Digus Spaceman Spiff

                              Status:
                              Made some minor adjusts to the letter background.
                              Implemented a way to change the recipe composition and the amount of cooking items given, editing the cooking.json file.
                              I think that covers the requests people made that were somewhat easy to do.
                               
                                HopeWasHere likes this.
                              • Digus

                                Digus Spaceman Spiff

                                Status:
                                I'm still holding to publish the last modifications I did to the mod as I did not extensively tested it.
                                I have been busy fishing the translation to Portuguese, something I wanted to do since I implemented the i18n capability. But after I added the Livin' with the Animals channel, it was a lot of text to translate and review, and I was a little burned out at the time to go through so many text. But now it's out: https://www.nexusmods.com/stardewvalley/mods/2253/

                                I also have been fooling around with some other mod idea someone requested here in the forums.
                                 
                                • Digus

                                  Digus Spaceman Spiff

                                  Status:
                                  Version 1.3.17 of the game broke my mod, I just needed to recompile to fix the issue.
                                  Uploaded the fix with some new functionalities I talked here before.
                                  I also included a console command to add all meat recipes to the player: player_addallmeatrecipes
                                   
                                  • matheus153

                                    matheus153 Scruffy Nerf-Herder

                                    suggestion: can you please add genders for animals? I could help with textures...
                                    that's a bull i've mad some time ago
                                    upload_2018-6-8_4-51-0.png
                                     
                                      HopeWasHere likes this.
                                    • Digus

                                      Digus Spaceman Spiff

                                      That is a nice bull.
                                      Implementing real genders would be really difficult, but I wanted to implement some animal that would be their just for their meat, like CA first thought, like Hog and Angus.
                                      I could make them be bought for their minimal price instead of the base price.
                                      But for now I'm not working with that. I will let you know if I start working on that in the future.
                                       
                                      • Christoffyw

                                        Christoffyw Space Spelunker

                                        why Is there an "i" after "livin" on the animal show.
                                         
                                        • Digus

                                          Digus Spaceman Spiff

                                        Share This Page