REQUEST Bring Back the Butchery Mod

Discussion in 'Mods' started by TheSecretman83, Apr 3, 2017.

  1. TheSecretman83

    TheSecretman83 Void-Bound Voyager

    Someone who actually understands coding PLEASE bring back the Butchery Mod. It carried such promise before some serious issues took it down.

    What killed the mod -

    As near as I could tell from reading the forums surrounding that mod, the mod maker took it down from download because:

    - Swinging a weapon in certain stages on the mines, as well as a couple of random locations on the map dependent upon where you put your barns and coops on your farm. In some cases this caused a meat duplication glitch.

    - Upon being slain, the parameter's marking that an animal inhabits the coop or barn is not removed, meaning that you cannot purchase more animals for that barn, nor can you remove the barn.

    These are obviously game-breaking issues, so the mod being removed from download was quite understandable.

    Possible Solutions -

    Someone had proposed an idea that the mod maker had recognized and said was being looked into. Instead of being able to use any 'ol melee weapon, a special tool would be used instead. The pitched item was a butcher's knife. The knife wouldn't be usable as a melee weapon, but could be used to kill and butcher your animals. I honestly believe that if this could be done, it would completely fix the first problem.

    As for problem #2, it seems theoretically possible for the kitchen knife to change the parameters that the animal it's killing is attached to, so that it actually marks the animal as removed.

    Now, I see one HUGE problem that I have no idea how to get around. The mod was taken down from being downloadable, so anyone trying to bring the mod back would either have to see if they can get the files from the original modder, or start from scratch. I understand that some people don't think butchery would fit the game, and I understand and respect those opinions, but I personally believe that butchery is an important part of raising animals on a farm. Even Marnie has to understand that.

    DISCLAIMER - I am not a programmer. I know nothing about C# and Stardew Valley Modding, What I'm proposing seems possible, but I could be wrong, If something like this isn't possible, please let me know.

    The Original Thread -
    http://community.playstarbound.com/...utcher-animals-for-meat-deleted.111196/page-4
     
      Last edited: Apr 9, 2017
      Ichimatsu, Beon, Androxilogin and 3 others like this.
    • Declension

      Declension Cosmic Narwhal

      I do still have the original files for the mod, but in this case, I'm not sure I'm allowed to share it as intellectually it is not mine. I can't get in contact with the mod maker either to see if it's okay.
       
      • Digus

        Digus Spaceman Spiff

        Out of curiosity, I'm learning to mod the game with the intention of making a "meat from animals" mod.
        Thank you from putting together the problems others had. I was not planing on doing things the way they did, but its nice to know where things could prove difficult.
        I don't promise anything, I might give up sooner than later, but if things start to grow I will create a topic to show some progress.
         
          Ichimatsu and HopeWasHere like this.
        • Digus

          Digus Spaceman Spiff

          The idea seems to have worked:
          [​IMG]

          I extended the Tool class to create the Meat Cleaver.
          I used the same logic of the Milk Pail to interact with the animal, the same sprite of the Axe for the tool animation, the same logic of selling animals to get it out of the game, and some code someone posted as been of the old killing method, to create the kill animation and make the meat appear.
          I tested buying animals afterwards and could fill the whole coop.
          Everything seems to work just fine but I just got this results, so there could be unpredicted bugs.
          I'm documenting it here so anyone willing to might give it a try.
          Since the concept worked, I will start to get more serious about the mod, but there is a lot to learn. I'm still trying to figure out how the Meat Cleaver can be saved without breaking the game.
           
          • Flor3nce2456

            Flor3nce2456 Aquatic Astronaut

            Oh snap, that worked like a charm! I'm not even interested in this mod, but dang that looks smooth, and no doubt OP would love to get their hands on that.
             
              Digus likes this.
            • HopeWasHere

              HopeWasHere Existential Complex

              This is looking great! I would love to help out with sprite work if you need it.
              If you do end up going forward with this mod, I would suggest (if possible) that it takes X number of hits to kill the animal, maybe lowering it's happiness with every hit. That way if you do it by accident you don't kill your animal, but you are penalized for it.
               
                Ichimatsu and Digus like this.
              • Digus

                Digus Spaceman Spiff

                I will probably want some help with sprites in the long run.
                My initial goal is to release lite version as soon as possible.
                That means no great changes to sprites.
                I'm now testing all basic animals, than I will do some balancing on meat price, amount released and stuff like that.
                There is not meat for sheep, goat and dinosaurs. So will be using the "cheap meat sprite" (named lamb) for sheep and goat, and probably make the dinosaurs immortal for the first version.

                I thought about putting a question dialog to confirm the tool action, but it seems super difficult. Your idea of lowering the friendship will not work well because friendship is used to determine the sales price of the animal. I intend to use a similar calculation for the amount and quality of the meat droped. But I can still place a counter and only kill the animal if hit twice in a row. I will try that.
                On my tests I accidentally killed the wrong animal the same way people usually water the wrong tile, depending on there you place the mouse. It sure won't be fun in the case of animals butchering.
                 
                  Ichimatsu and HopeWasHere like this.
                • Digus

                  Digus Spaceman Spiff

                  Update:
                  I finished balancing the meat price and amount given. (Rules of quality for animal's products being used)
                  You need to hit the same animal twice in a row for it to drop meat. They make a pinch sound on the first hit.
                  Animals that have not matured can't be killed and it shows a message if you try to.
                  Before releasing a beta version, I still want to:
                  * Add a chance for wool, duck feather and rabbit's foot to be dropped.
                  * Add a letter to be received with the Meat Cleaver when you have animals and don't own one yet.

                  I will create a new thread when I'm done with these stuff, probably this weekend.
                  There I will list my next goals and ask for feedback and help with sprites and other things.
                   
                    Last edited: Oct 6, 2017
                  • Karmylla

                    Karmylla Space Kumquat

                    This is looking great, excellent job!!! :D
                     
                    • Digus

                      Digus Spaceman Spiff

                      New Update:
                      It took me more time than I expected to do the letter thing. I ended up making a Mail Framework as a stand alone mod so it can help others in the future.
                      But everything I intended to implement seems to be working. Just need to test pigs and refractory some code before releasing.
                      Here is a new gif of the mod in action.
                      https://imgur.com/DmT0R7i
                      There is no quality meat in the video because every animal slept out and was grumpy. I was testing the conditions to receive the letter.
                       
                      • Ichimatsu

                        Ichimatsu Pangalactic Porcupine

                        That's looking awesome and quite smooth! Be sure to announce your mod here in case I miss it, so I can help testing it too :D
                         
                        • Ichimatsu

                          Ichimatsu Pangalactic Porcupine

                          Hope I don't end up accidentally chopping up my cat :cato3o:
                           
                          • Digus

                            Digus Spaceman Spiff

                            Last edited: Oct 9, 2017
                            HopeWasHere and Ichimatsu like this.

                          Share This Page