RELEASED [SMAPI] New machines (flour, sugar, vinegar, rice?)

Discussion in 'Mods' started by Igorious, Mar 31, 2016.

Tags:
  1. BadShaddy

    BadShaddy Subatomic Cosmonaut

    Hello, I'm trying this mod and I'm liking it so far, but I can't understand if the quick guide lacks some stuff..
    While checking the config files, I saw these lines in SimpleMachines.json, right after the Drying Rack infos:
    839: {
    InputCount: 4,
    ID : "Rice",
    Draw: {
    Working: 2,
    WorkingColor: "FFFFFF",
    Ready: 2,
    ReadyColor: "FFFFFF",

    What item is the "839"? From what I've read so far, the mod didn't have the feature to produce rice yet.. am I wrong?
     
    • lannihamm

      lannihamm Big Damn Hero

      I believe that's in reference to the rice produced through the More Crops Mod -- for the most part, the crops produced through that mod are compatible with this mod, and some produce unique items (e.g. placing 5 rice in a keg produces sake).
       
      • BadShaddy

        BadShaddy Subatomic Cosmonaut

        I thought it was related to MCM but I couldn't find info about ID 839 in MCM's files..
        But I guess it must be that anyway, thank you!
         
        • Mr. Brimstone

          Mr. Brimstone Void-Bound Voyager

          Will you stick to these 3 machines or do you plan to create more? I think about a Fish Canning Machine for fish, Gem Cutting Machine for gems and Perfume Machine for flowers. Just suggestions thrown in the wind.
          imagem.PNG
           
            Snarkypie likes this.
          • tenott

            tenott Master Chief

            Here's the DLL update I made based on github source code, for the conflicts between NewMachineMod and Tego's farm expansion.

            [​IMG]

            Both mods are loaded, but not fully tested. I only tested the NMM contents correctness and automatic save at the end of a day.
            I hope the official updates would take place.

            How to use:
            Extract the files and replace the DLL files, for NewMachineMod and AdvancedLocationLoader (recommend backups for saves / DLL files)

            Known Problems :
            At the end of the month, the status does not save correctly and the date goes into Tue 30, which is not possible. Copying [spring/summer/fall/winter]_zcustom01.xnb in the Tego mod into original Contents/ and Contents/Maps directory solves the issue.


            Since ALL fully replaces the content manager and overrides the Load<T>() method, the current Igorious.DynamicAPI does not seem to work correctly.
            Especially, the execution path Game1.content.Load<T> -> Game1.content.GetField<>("loadedAssets") falls into NullReferenceException.

            Thus, I updated the codes as follows, for the BundleService and InformationService.

            Code:
            Game1.content.Load<Dictionary<string, string>>(@"Data\Bundles");
            var loadedAssets = Game1.content.GetField<Dictionary<string, object>>("loadedAssets");
            var bundles = (Dictionary<string, string>)loadedAssets[@"Data\Bundles"];
            
            --> var bundles = Game1.content.Load<Dictionary<string, string>>(@"Data\Bundles");
            Also, I found the automatic save issues, since the ALL sanity check routines considers the updates by DynamicAPI as a "Corruption".
            I commented out the sanity check statement of ALL, to make other DayOfMonthChanged events are called correctly.
             

              Attached Files:

              Last edited: Jul 24, 2016
              foghorn likes this.
            • Aramina

              Aramina Void-Bound Voyager

              I've been trying to get this mod to work on an existing save file with farming level 8, but despite the fact it looks like it should be working in the SMAPI, I can't see the recipes for crafting the new machines - do I need to level up again in order to learn the recipes or something?
               
              • soapyjam

                soapyjam Void-Bound Voyager

                This mod is so well done, and fits in very nicely, I love it! Great stuff!
                 
                • Shocktread

                  Shocktread Poptop Tamer

                  I do enjoy this mod. It really adds an interesting feature to my farm.

                  The only issue i'm finding myself with is that I can no longer drink the wines I make. Is there a fix for this or should I just go without that for now?

                  After some poking around, I found a way to tweak it, so never mind.~ :V
                   
                    Last edited: Aug 1, 2016
                  • Sena

                    Sena Void-Bound Voyager

                    You should (I haven't actually tested it) be able to make wines drinkable by editing Items.json in the configuration folder, using any text editor. Just add Edibility (determines how much health/energy is restored, at base quality it will give that amount of energy and 2.5x that amount for health) and MealCategory properties to the wine. Also SkillUps and Duration if you want it to give a buff. You can look at other items in that file for examples.
                     
                    • Shocktread

                      Shocktread Poptop Tamer

                      I decided to risk poking around, after backing up, so yis. I discovered this. Thank you though! I appreciate the willingness to at least give me a starting point.~ Now...I just wonder if it's possible to add recipes. Because I really want to use corn for moonshine in the keg.
                      ...
                      Don't judge.
                      (Not running the mines with an inventory full of alcohol, NOPE!)
                       
                      • Sena

                        Sena Void-Bound Voyager

                        Adding corn->moonshine to the keg shouldn't be hard either, the hardest part would be making a new sprite for it if you don't want to just re-use an existing one. You'd need to add a new 16x16 sprite to Items.png in the resources folder, add a new listing for moonshine in Items.json, and add the recipe to the keg in MachineOverrides.json. There's a useful guide on page 25 of this thread that should be helpful (you can ignore the part about new machines), and details on all the configuration options on page 6.
                         
                          lannihamm likes this.
                        • Shocktread

                          Shocktread Poptop Tamer

                          ...You are a god send. Not sure which one, but you are. Thank you, you beautiful soul.X3
                          --- Post updated ---
                          Annnnnnd I have created moonshine! :party:

                          Thank you Sena for pointing me in the right direction, and Igorious for the explanations.
                          I don't feel like modding is going to be impossible anymore!
                           
                            lannihamm likes this.
                          • kashue

                            kashue Master Chief

                            Just wanted to say the compatibility fix posted by tenott a few replies back appears to work with the latest version of ALL. I think the corrupt save check was a bit overzealous and was fixed a few versions back. I was able to use the updated new machines dlls with original ALL 1.1.13 files. Did a quick test trying out the new machines and new wines/jellies. Went into a new month without issue, looks like it is working. A big thank you to tenott, and of course to Igorious for the awesome mod!
                             
                            • Penelo

                              Penelo Void-Bound Voyager

                              I don't know if this has been addressed before but if you put corn and amaranth flour in the fridge you can make infinite amounts of food with it. Normal flour worked just fine so I think its the mod.
                               
                                Last edited: Aug 5, 2016
                              • Shocktread

                                Shocktread Poptop Tamer

                                I've made a few recipes now and plopped them into the game. (A few drinks and some desserts.)
                                Luckily Gus is selling them at his shop and I added them to my collection.
                                The only issue seems to be that the shop isn't checking if I have the recipes already, thus they end up reappearing in the saloon shop list.
                                It's just a minor annoyance, really, but I felt it best to share.
                                 
                                • Snarkypie

                                  Snarkypie Void-Bound Voyager

                                  I am running this mod along with Tego's Expansion, and even though I applied tenott's fix, I am still getting this

                                  [02:57:21.176 AM] An exception occured in XNA LoadContent: System.NullReferenceException: Object reference not set to an instance of an object.
                                  at Igorious.StardewValley.DynamicAPI.Services.InformationService.GetDataCache(String assetPath, Boolean useTemporary)
                                  at Igorious.StardewValley.DynamicAPI.Services.InformationService.LoadMainContentToGame()
                                  at Igorious.StardewValley.DynamicAPI.Services.InformationService.<.ctor>b__0_0(Object s, EventArgs e)
                                  at System.EventHandler.Invoke(Object sender, EventArgs e)
                                  at StardewModdingAPI.Events.GameEvents.InvokeLoadContent()

                                  Which I don't know what to do with, really. Did I miss something else? Is there a conflict between the updated files for Tego's Expansion by Entoarox and this?
                                   
                                  • xenophillior

                                    xenophillior Void-Bound Voyager

                                    I edited the Separator, Churn and Fermenter.

                                    I made it so that it's sorta the size of the machines in-game, however it doesn't have the same design of the original machines. I did try to make it seem like it made sense though.

                                    Craftables.png
                                     
                                      lannihamm and MoonlitBrenya like this.
                                    • MoonlitBrenya

                                      MoonlitBrenya Phantasmal Quasar

                                      very nice! think I just might grab that, thank you!
                                       
                                      • Shocktread

                                        Shocktread Poptop Tamer

                                        It LOOKS like the coding is making a reference to something that isn't actually present in the files. Like a texture or item. I'm not really much of a coder but I can tell you that it's pretty much saying "The reference is a lie!" That's pretty much the most I can say. There might be something one mod is referencing that the other doesn't have?
                                         
                                        • Snarkypie

                                          Snarkypie Void-Bound Voyager

                                          I wound up needing to take out Tego's expansion so it's moot now, but thank you for translating the error!
                                           

                                          Share This Page