WIP BETA: FarmAutomation Mods (for SMAPI 0.39.6+)

Discussion in 'Mods' started by Oranisagu, Mar 28, 2016.

  1. Bunkmaster

    Bunkmaster Space Spelunker

    So, SMAPI (0.39.2) threw this at me when I tried to load your BarnDoorAutomation mod

    [15:00:53] Found Manifest: D:\SteamLibrary\steamapps\common\Stardew Valley\Mods\FarmAutomation.BarnDoorAutomation\manifest.json
    [15:00:53] Loading Mod DLL...
    [15:00:53] Failed to load mod 'D:\SteamLibrary\steamapps\common\Stardew Valley\Mods\FarmAutomation.BarnDoorAutomation\FarmAutomation.BarnDoorAutomation.dll'. Exception details:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void StardewModdingAPI.Log.Info(System.Object)'.
    at FarmAutomation.BarnDoorAutomation.BarnDoorAutomationMod..ctor()
    --- End of inner exception stack trace ---
    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
    at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
    at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
    at System.Reflection.Assembly.CreateInstance(String typeName)
    at StardewModdingAPI.Program.LoadMods()


    I haven't tried your ItemCollector mod yet as I'm still using CJB's automation mod, but I'll do that later this evening.
     
    • bugmenever

      bugmenever Phantasmal Quasar

      Hello. First of all let me thank you for such an amazing mod.
      After using it for a while, i noticed some strange behavior of machines (in my case, the furnace and recycler).
      I have this setup: [Chest][Furnace][Recycler][Chest]. In 1st chest i have ores and coal, in 2nd - trash. So the furnace tooks frome the left (and puts to the left) and recycler respectively woks with the right. At least, that's what i expected. In practice, only one machine works at a time, until i break one fo the chests and/or put it's content to the other.
      -----------------------------------
      I've looked in the SMAPI console and saw this:
      [INFO] Refilled your {0} with a {1} of {2} quality. The machine now takes {3} minutes to process. You have {4} {1} left
      Are those {0-4} supposed to be like that, or there should be the names of machines, time and other stuff?

      P.S. I'm using SMAPI v0.39.6
       
        Last edited: Apr 3, 2016
      • suzannemonroe

        suzannemonroe Scruffy Nerf-Herder

        the newest version of the item collector doesn't work for me :( i'm using SMAPI 39.2 any idea why it doesn't work? :(
         
        • samp0ern4

          samp0ern4 Scruffy Nerf-Herder

          I'm using smapi 39.6 and it's work well on my game even with 20 other mod include this became 21 mod, the mod work ;)
          maybe u can try using 39.6
           
          • Tassii

            Tassii Cosmic Narwhal


            yeah same thing so I updated SMAPI to 39.6 and all is well now
             
              Last edited: Apr 2, 2016
            • cossack1977

              cossack1977 Intergalactic Tourist

              Great mod does wonders for freeing my day up. Are there plans for Lightning Rod and Mushroom Box. Is there also plans to connect the cave like you are going to do with barn and coop.
              Thanks

              ** found some bugs:
              1) So I decided to try and make a whole heap of different wines so see sell price and when completed I got the notification that 7 wines were made but on 2 went into chest. I tried again and only 1 of the 7 went into the chest.

              2) Added Mushroom Box into the config. I get notified that i got 12 mushrooms but only 4 went into the chest. Next time around i got 7 into the chest.

              additional info: smapi 39.6
               
                Last edited: Apr 3, 2016
              • XxhexerxX

                XxhexerxX Phantasmal Quasar

                Sorry if the question is rather silly but do the machines & chests HAVE to be placed on the bare ground?
                All my stuff are placed on various floor types and it doesn't seem to work even when the machines & chest are touching horizontally.


                Edit: Nvm, found that I had to re-place the chest to get it working lol.
                 
                  Last edited: Apr 3, 2016
                • Oranisagu

                  Oranisagu Subatomic Cosmonaut

                  new release: https://github.com/oranisagu/SDV-FarmAutomation/releases/latest
                  • Updated logging to the SMAPI 0.39.6 variant.
                  • added Mushroom Box & Lightning Rod
                  • Bugfix where some items didn't get placed in the chests anymore.

                  RANT: SMAPI 0.39.2 and lower offered a logging function to print out stuff, but the newest version deprecated it (which is of course fine). unfortunately, the devs decided instead of deprecating it gracefully (i.e. marking it as obsolete and then removing it a few releases from now) they simply removed the entire functionality. I have to say, that's very bad coding practice if you know others have to use it, but oh well.

                  thank you, that was a kinda weird bug where items of types which had not been processed before not being added to the chests anymore. it should be fixed now.

                  actually that shouldn't be necessary. whenever your inventory changes the mod checks if one of the affected items was in the change (picked up or put down a machine or chest or floortile). but it's very possible it had to to with the bug I fixed with this release. anyway, I hope it won't happen anymore =)
                   
                  • bugmenever

                    bugmenever Phantasmal Quasar

                    I still have this issue with Chest-Furnace-Recycler-Chest layout, even after updating to the v0.1.6.
                     
                    • Oranisagu

                      Oranisagu Subatomic Cosmonaut

                      well, multiple chests are still not supported (and in this version I won't add it in, maybe in the next one), so it will try to work with the first chest it finds - if that one doesn't have the necessary items, it won't do anything.

                      so please, try to remove at least one of those chests and see if it works then.
                       
                      • ic3pto

                        ic3pto Intergalactic Tourist

                        Hey, i'm using your latest version (v0.1.6) and i'm getting some errors:

                        [ERROR] an error occured with the automation mod: System.NullReferenceException: Object reference not set to an instance of an object.
                        in StardewValley.FarmerSprite.animateOnce(Int32 whichAnimation, Single animationInterval, Int32 numberOfFrames, endOfAnimationBehavior endOfBehaviorFunction, Boolean flip, Boolean secondaryArm, Boolean backwards)
                        in StardewValley.Farmer.animateOnce(Int32 whichAnimation)
                        in StardewValley.Objects.CrabPot.checkForAction(Farmer who, Boolean justCheckingForActivity)
                        in FarmAutomation.ItemCollector.Processors.MachineHelper.HandleFinishedObjectInMachine(Object machine, Chest connectedChest)
                        in FarmAutomation.ItemCollector.Processors.MachineHelper.ProcessMachine(Object machine, Chest connectedChest, MaterialHelper materialHelper)
                        in FarmAutomation.ItemCollector.Processors.MachinesProcessor.ProcessMachines()
                        in FarmAutomation.ItemCollector.ItemCollectorMod.<Entry>b__5_2(Object s, EventArgsIntChanged e)

                        I'm using SMAPI 0.39.6 if that helps.
                         
                        • Tassii

                          Tassii Cosmic Narwhal

                          hummm I put a chest on crab pots and when they collect stuff instead of going to chest the items just disappear.. am I setting it up wrong?
                           
                          • dem0z

                            dem0z Star Wrangler

                            do you have chest pooling mod by any chance? if so the items just went to the other chest and stacked.
                             
                            • bugmenever

                              bugmenever Phantasmal Quasar

                              Indeed, as i wrote before, if i remove one chest or put it's content into the other, everything works. So, if i understood you correctly, machines don't look for all chests they are connected to, but work only with the first found, and all i have to do is to modify the layouts, so that different types of production (machines+chest) are separated from each other.
                               
                              • JulesC

                                JulesC Void-Bound Voyager

                                Firstly, thanks for this mod, it makes many things more manageable and less repetitive. Unfortunately, there are several issues in the latest builds (I mainly tested 1.5 but I checked, they are persistent in 1.6 also).

                                First things first: I can confirm Tassii, crab pots are harvested but the items are not placed in the chest. Also, there are error messages:
                                error.jpg

                                Secondly: I don't know if this is a problem of the mod handling multiple barns and coops, or if it is because of updated versions of the mod, but the automatic milk/wool collection and collection of eggs does not work anymore for my first coop and barn: sheep.jpg coop.jpg

                                I tried to pickup the chests in the buildings and replace them, which seemed to work; but I'm not sure if that just means that my other barn/coop now stops producing - clarification of the issue would be appreciated. Is it intended, that only one barn/coop is supported by the mod, or should it work for all buildings? Do I have to replace the chests after mod updates so they continue working? Also, I got this strange message:
                                error2.jpg
                                There is more than enough space in the chests in my barns, so I can't understand why this error appears.

                                Another issue is concerning tappers and honey. My tappers don't produce anymore - or rather, I don't know if they produce, but the harvest gets lost like the crab pots. I skipped nearly a week, but none of the tappers produced, so I'll take them off the automation for the while being. As for the honey... this does produce, and gets harvested and stored regularly, but it only produces wild honey, instead of blue jazz honey, as seen in the picture below. And yes, the flower is blooming for a good while - When I skipped the next harvest was also only wild honey which is wrong.
                                wild_honey.jpg

                                P.S: Could you make it so that when going to bed early, the barn/coop doors are closed? This is not the case when going to bed before 7: 30 PM atm.
                                 
                                  Last edited: Apr 3, 2016
                                • Oranisagu

                                  Oranisagu Subatomic Cosmonaut

                                  thanks for the detailed report!

                                  hm, these red errors have to do with the virtual farmer. the game code is a bit mangled there and I had to do some workarounds, I'll look into it. the main problem was getting it running without disturbing the player (simply adding another farmer into the game lead to the player being locked up because the game doesn't really support it) and this was one of the problems I had. I found a fix but it takes a few milliseconds, so I only run the fix once a day, at first I had it for every harvest but the game started lagging horribly (a good half second freeze) during updates.

                                  0.1.5 introduced a bug. simply put: any empty slot in the farmers inventory has to be set but NULL (i.e. nothing), so I falsely assumed it worked the same for chests (my fault for not checking it more carefully). thus, the chests got filled with those NULLs until they had no more space left, which was when the bug started happening: any object not yet in the chest and stackable, would simply disappear. I fixed this in 0.1.6 but from your description it sounds like those chests were still full of nothing from the 0.1.5 version.
                                  I don't think I'll be able to put out a version which deletes those nothings from the chest this evening anymore, but I'll definitely patch it in tomorrow morning. until then, I think there might be a simple workaround: empty the chest and pick it up. once placed again, it should be clean (that is, if you can pick it up, I really hope so).

                                  animals don't get harvested if their chest is full, so I think I will do the same for machines, or I could simply send any of the items which can't be placed into the chest via mail (might lead to a bit of spam though)

                                  so the mod should definitely work with as many barns/coops as you want, I think 0.1.5 simply bugged those chests, that would explain the error messages you get from the full chests as well.

                                  I think the tappers and honey are the same problem as well, except that you get the wrong kind of honey, I have to test that in detail.

                                  great suggestion about closing the doors if you go to sleep early. I don't know if its possible (depends on whether SMAPI has some callback for this event), but if it is, I'm a bit unsure how to handle it: say you go to bed at 3pm, and all animals are still outside. if I close the door, they'll probably be kept outside during the night, which isn't great either - so if it's letting the door stay open or forcing the animals to sleep outside, what would be preferred? I'll of course try to find a way around this, but there's a good chance it's not possible.
                                   
                                  • Tassii

                                    Tassii Cosmic Narwhal

                                    yeah I do but I checked all chest and they were no where to be found...will remove it and give it a try again to see if that is it....
                                     
                                    • cera12sim

                                      cera12sim Subatomic Cosmonaut

                                      is there a way to not be notified when things have been finished processing
                                       
                                      • Oranisagu

                                        Oranisagu Subatomic Cosmonaut

                                        since I switched to working with a virtual farmer in the background (0.1.5+) this actually happens - you see each item being collected on the bottom left of your screen. I tried to disable it but didn't find a way, so I decided to leave it in and just call it a new feature ;-)

                                        I didn't know this mod and have never tested it, but if it affects the way chests are handled it is very possible it could interfere with this mod. I'll have a look at it and see what I can do but I can't promise I can make my mod compatible with this one, as the conflicts might be unresolvable.

                                        new release (which solves the problems left over by 0.1.5) is incoming in a bit.
                                         
                                        • cossack1977

                                          cossack1977 Intergalactic Tourist

                                          trying out the crab pots and i get the notification that i got a lobster and a crayfish but neither went into the chest. Chest is taking bait out fine and no other machines are connected. Ok it looks like no items are being collected. Last notification popped up with junk, cray, etc and nothing went into chest.

                                          [06:56:17.879 PM] [INFO] Refilled your Crab Pot with a Bait of Low quality. The machine now takes 0 minutes to process. You have 87 Bait left
                                          [06:56:17.879 PM] [INFO] Refilled your Crab Pot with a Bait of Low quality. The machine now takes 0 minutes to process. You have 86 Bait left
                                          [06:56:17.880 PM] [ERROR] an error occured with the automation mod: System.NullReferenceException: Object reference not set to an instance of an object.
                                          at StardewValley.FarmerSprite.animateOnce(Int32 whichAnimation, Single animationInterval, Int32 numberOfFrames, endOfAnimationBehavior endOfBehaviorFunction, Boolean flip, Boolean secondaryArm, Boolean backwards) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\FarmerSprite.cs:line 362
                                          at StardewValley.Farmer.animateOnce(Int32 whichAnimation) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Farmer.cs:line 2687
                                          at StardewValley.Objects.CrabPot.checkForAction(Farmer who, Boolean justCheckingForActivity) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Objects\CrabPot.cs:line 100
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.HandleFinishedObjectInMachine(Object machine, Chest connectedChest)
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.ProcessMachine(Object machine, Chest connectedChest, MaterialHelper materialHelper)
                                          at FarmAutomation.ItemCollector.Processors.MachinesProcessor.ProcessMachines()
                                          at FarmAutomation.ItemCollector.ItemCollectorMod.<Entry>b__5_2(Object s, EventArgsIntChanged e)
                                          [06:56:46.963 PM] [INFO] Refilled your Crab Pot with a Bait of Low quality. The machine now takes 0 minutes to process. You have 86 Bait left
                                          [06:56:46.965 PM] [INFO] Refilled your Crab Pot with a Bait of Low quality. The machine now takes 0 minutes to process. You have 85 Bait left
                                          [06:56:46.965 PM] [ERROR] an error occured with the automation mod: System.NullReferenceException: Object reference not set to an instance of an object.
                                          at StardewValley.FarmerSprite.animateOnce(Int32 whichAnimation, Single animationInterval, Int32 numberOfFrames, endOfAnimationBehavior endOfBehaviorFunction, Boolean flip, Boolean secondaryArm, Boolean backwards) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\FarmerSprite.cs:line 362
                                          at StardewValley.Farmer.animateOnce(Int32 whichAnimation) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Farmer.cs:line 2687
                                          at StardewValley.Objects.CrabPot.checkForAction(Farmer who, Boolean justCheckingForActivity) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Objects\CrabPot.cs:line 100
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.HandleFinishedObjectInMachine(Object machine, Chest connectedChest)
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.ProcessMachine(Object machine, Chest connectedChest, MaterialHelper materialHelper)
                                          at FarmAutomation.ItemCollector.Processors.MachinesProcessor.ProcessMachines()
                                          at FarmAutomation.ItemCollector.ItemCollectorMod.<Entry>b__5_2(Object s, EventArgsIntChanged e)

                                          edit:
                                          seem to be getting an error as well:
                                          [06:26:46.721 PM] [INFO] Collecting a Oil from your Oil Maker.
                                          [06:26:46.740 PM] [ERROR] an error occured with the automation mod: System.NullReferenceException: Object reference not set to an instance of an object.
                                          at StardewValley.FarmerSprite.animateOnce(Int32 whichAnimation, Single animationInterval, Int32 numberOfFrames, endOfAnimationBehavior endOfBehaviorFunction, Boolean flip, Boolean secondaryArm, Boolean backwards) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\FarmerSprite.cs:line 362
                                          at StardewValley.Farmer.animateOnce(Int32 whichAnimation) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Farmer.cs:line 2687
                                          at StardewValley.Objects.CrabPot.checkForAction(Farmer who, Boolean justCheckingForActivity) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Objects\CrabPot.cs:line 100
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.HandleFinishedObjectInMachine(Object machine, Chest connectedChest)
                                          at FarmAutomation.ItemCollector.Processors.MachineHelper.ProcessMachine(Object machine, Chest connectedChest, MaterialHelper materialHelper)
                                          at FarmAutomation.ItemCollector.Processors.MachinesProcessor.ProcessMachines()
                                          at FarmAutomation.ItemCollector.ItemCollectorMod.<Entry>b__5_2(Object s, EventArgsIntChanged e)
                                           
                                            Last edited: Apr 4, 2016

                                          Share This Page