RELEASED [SMAPI 1.5] CJB Automation v1.4 Beta [01-Jan-2017]

Discussion in 'Gameplay Mechanics' started by CJB, Mar 29, 2016.

  1. TheDauthi

    TheDauthi Void-Bound Voyager

    Not the person you were asking, but see attached. Unenlightening. Is there any way to increase the debug log level? I don't see it in smapi's code, but I could be overlooking it.

    Steps to reproduce:

    1) Start new day
    2) Place seed maker, wait for clock tick. Game does not crash.
    3) Place empty chest to right of seed maker, wait for clock tick, Game does not crash.
    4) Place single starfruit into chest, wait for clock tick. Game crashes.

    If the code's available anywhere, I can help debug.
     

      Attached Files:

    • Borodin

      Borodin Oxygen Tank

      That's...odd. But the log is enlightening, in the sense that the issue at least doesn't appear to be external to CJB Automation. I've never had a problem doing this with vanilla, so CJB is the one to ask about it.
       
      • this2x4skeleton

        this2x4skeleton Master Chief

        Having a similar issue. Put a stack of 160 berries into a chest connected to a preserves jar and they just vanish.

        Edit: was happening because I was using some other chest mod
         
          Last edited: Oct 23, 2016
        • Eurion

          Eurion Master Chief

          Here's my version. I've also made it so that you should be able to use the machines in the new shed. I've tested the Seed Maker and the Preserves Jar to make sure they don't crash the game.

          credits for the original modified source goes to http://community.playstarbound.com/members/huancz.726285/
          credits to CJB for the official release.
           

            Attached Files:

            Radhra and this2x4skeleton like this.
          • huancz

            huancz Subatomic Cosmonaut

            You probably want to rebase your changes, another (stupid) mistake fixed for casks.
             
            • this2x4skeleton

              this2x4skeleton Master Chief

              Yay. My kegs are working now. Thanks.
               
              • Eurion

                Eurion Master Chief

                Thanks for the update.


                You're welcome. Here's the new version from huancz. I've also added the mushroom boxes in the Farm Cave to auto harvest when they're ready.
                 

                  Attached Files:

                  clearbit and shamien7 like this.
                • shamien7

                  shamien7 Void-Bound Voyager

                  Thank you so muchhhhhh!!! ⊂( ♡⌂♡ )⊃
                   
                  • clearbit

                    clearbit Master Chief

                    Thank you very much.
                    How does the mushroom boxes work? Do I put a chest in the Farm Cave?
                     
                    • Eurion

                      Eurion Master Chief

                      The way I currently have it set up is no different than say a furnace, you just have to have a chest hooked up to the box itself. When its ready for harvest, it will be put into the chest. It takes up some room but it seems to be working fine as of now.
                       
                      • DWrathh

                        DWrathh Big Damn Hero

                        So I've run into a bizarre problem with the mod.
                        When leaving a chest to do it's own thing, instead of taking a fruit / vegetable / etc and turning it into its respective beverage, it clones the original item and then still outputs what you'd normally get from it.
                        As in, if you had a crystal fruit in the chest, it'd clone that crystal fruit, and the keg would still go through the process of making crystal fruit wine.
                        Admittedly, I originally had 10 or so mods but I took them all off and this still happened when I was only using the automation mod.

                        I assume you'll want the log so I'll attach it but there doesn't appear to be any errors?
                         

                          Attached Files:

                        • Eurion

                          Eurion Master Chief

                          Thanks for the info on the kegs. This should fix the issue. I didn't test all the vegetables or fruits, but I did test random ones with different amounts of each to make sure it took the item from the chest.
                           

                            Attached Files:

                          • DWrathh

                            DWrathh Big Damn Hero

                            It's working perfectly now.
                            Thank you kind sir~
                             
                            • huancz

                              huancz Subatomic Cosmonaut

                              I've scraped some time to read the whole thread, and it looks like I wasn't alone to be bugged by a few issues - except I went ahead and fixed them.

                              All fixed issues that were mentioned in this thread:
                              - charcoal kiln cost - it was already fixed by CJB in the code I got, though the first version of the mod I tested (likely from nexusmods) had it wrong
                              - seedmaker crash
                              - 1.1 content - coffee, void mayo, mead, casks; Eurion mentioned that shed is not working, though it is working correctly for me without any changes. Maybe only some specific machine is broken?
                              - slime egg-press
                              - prioritization of stuff - kegs and casks take items from first eligible stack from the left instead of having fixed priority; may be extended to other machines in the future, kegs just were most pressing and casks had to be written from the scratch

                              I didn't add crab pot automation for now. Mine are all on the beach (darned lobsters almost as rare as prismatic shards - only 3 in almost 2 years) and the mod doesn't automate any machines outside of farm. It would be easy to allow machines to be automated anywhere, but it would make the mod significantly more powerfull - I left that decision for another time.

                              What seed are you trying to make? I can confirm that strawberries, sunflowers and ancient seeds work, didn't try other crops - it may be just that some are missing. Also... "not even trying to pull in a seed" - I hope that this is just wrong use of words, otherwise it would mean that you are trying to put in seed and expect it to spew out more seeds. You have to put actual crop inside.

                              Could you share what was the problem? My kegs seemed to work properly, but I admit I didn't keep too close eye on them, just a quick test with some fruit to see if they consume what should be consumed and brew correct wine. After that I just stuffed their chests with 50+ ancient fruits and starfruits and stopped paying attention. I was beginning to think that it is stable enough to PR CJBok, but maybe I should wait for PR from you first. Or you could take over I guess, my interest in SDV is already waning a bit.
                               
                                Radhra likes this.
                              • Eurion

                                Eurion Master Chief

                                When I tested my Shed out, it didn't seem to work, so I just added a location check to go with the farm and cellar. That seemed to have fixed it. Admittedly I didn't check all the machines to make sure, it was just a quick fix.


                                After I seen DWrathh's post, I seen that the kegs had a -1 in the removal of the item's. From what I seen in the "function" of the removal of items from chests I figured that would be the stacksize to be removed. Being a -1 it looked like it added to the chest instead resulting in a dupe of the item. So I removed that from the "function" and it seemed to work as planned.


                                As for taking it over, I can continue to help when possible. But I admit my knowledge of C# isn't the greatest.
                                 
                                • huancz

                                  huancz Subatomic Cosmonaut

                                  I just tested again, and my shed works out of the box. It should be the same as with all other farm buildings and greenhouse, and the mods already accounts for those. Only thing that doesn't work in a shed are casks, which is intentional - same as in vanilla game.

                                  Thanks, you are right, another stupid mistake of mine. I probably only tested the special crops (Hot pepper and Tomato) and not the two general cases for fruits and veggies. I refactored it a bit, now it only getting decreased in one place, not in each switch branch individually, it should be a bit safer that way.
                                   
                                  • Eurion

                                    Eurion Master Chief


                                    I just retested my shed and it is indeed working without my location checker. I must have been having a blind day that day lol. I've modified my source to keep them as similar to yours as possible.

                                    Here's the latest dll version of this. I did make a small change to the mushroom cave, that will collect from the mushroom boxes and deposit into a single chest in the cave itself. This option is totally up to the end user, you can connect each box to a chest or have a single chest saving space.


                                    For huancz:

                                    I have included my version of the source, this way we can keep it as open-sourced as possible.
                                     

                                      Attached Files:

                                      rafaellouy93 likes this.
                                    • huancz

                                      huancz Subatomic Cosmonaut

                                      Thanks, I added it to my github - or at least something close to it. Sharing code through forum attachments (instead of patches or pull requests) doesn't seem to work too well. For example you missed one of my fixes for casks, your version wouldn't remove items when they reach iridium quality, so it wouldn't replace them with fresh stuff to age either - your code still checks for quality of the cask itself, not of heldObject. Unfortunately there were many purely cosmetic changes all over the sources. Visual studio likes to reformat code that doesn't conform to coding style when you do certain actions, and adding a region is one such action. While trying to sort it out I ended up almost rewriting your mushroom code. It should still work the same as your version, and I kept the regions you added, they make the code easier to look at.

                                      Build of my current code is available here and here - both links should always get you the latest available version.
                                       
                                      • Eurion

                                        Eurion Master Chief

                                        Perfect thanks.
                                         
                                        • Radhra

                                          Radhra Void-Bound Voyager

                                          So, I noticed a problem with the last version (and I cant remember if this was from huancz or Eurion, sorry! :confused: Is there a way to check in the files?), the casks are not putting the finished iridium quality in the chests.
                                          They pull from it perfectly the first time, but I have to manually collect it myself. None of the others machines presented this behavior, always working as intended.

                                          Also, thanks for the wonderful work guys!
                                           

                                          Share This Page