Modding Help Error Custom Farming Redux

Discussion in 'Mods' started by Yuka Code, Jan 17, 2018.

  1. Yuka Code

    Yuka Code Aquatic Astronaut

    Attached Files:

  2. Platonymous

    Platonymous Zero Gravity Genie

    Please upload your log to smapi.io and post the link, even if it has no error messages in it directly it will give me some clues to find out what might be wrong.

    Does it only happen with the Oil Mill and none of the other new machines?
     
      Last edited: Jan 17, 2018
    • Yuka Code

      Yuka Code Aquatic Astronaut

      Where must I find a log ? I see red lines in my console.


      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
      [Custom Element Handler] Exception while rebuilding element: Unable to cast object of type 'CustomFarmingRedux.CustomMachine' to type 'CustomElementHandler.ISaveElement'.
      [Custom Element Handler] at CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement, Boolean cleanup) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomElementHandler\SaveHandler.cs:line 107
       
      • Pathoschild

        Pathoschild Master Astronaut

      • Platonymous

        Platonymous Zero Gravity Genie

      • Yuka Code

        Yuka Code Aquatic Astronaut

      • Platonymous

        Platonymous Zero Gravity Genie

        Delete the Platonymous.Examples folder in /Machines and replace it with this, to ensure there's nothing wrong with the files.
         

          Attached Files:

        • Yuka Code

          Yuka Code Aquatic Astronaut

          Oil mill is still error. After i delete a old file and add new a file, i see a new red line in my console.


          [PyTK] Exception while rebuilding element: Object reference not set to an instance of an object.
          [PyTK] at CustomFarmingRedux.CustomMachine.build(CustomMachineBlueprint blueprint) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomFarmingRedux\CustomMachine.cs:line 79
          at CustomFarmingRedux.CustomMachine.rebuild(Dictionary`2 additionalSaveData, Object replacement) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomFarmingRedux\CustomMachine.cs:line 382
          at PyTK.CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\PyTK\CustomElementHandler\SaveHandler.cs:line 235
          [PyTK] Exception while rebuilding element: Object reference not set to an instance of an object.
          [PyTK] at CustomFarmingRedux.CustomMachine.build(CustomMachineBlueprint blueprint) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomFarmingRedux\CustomMachine.cs:line 79
          at CustomFarmingRedux.CustomMachine.rebuild(Dictionary`2 additionalSaveData, Object replacement) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\CustomFarmingRedux\CustomMachine.cs:line 382
          at PyTK.CustomElementHandler.SaveHandler.rebuildElement(String dataString, Object replacement) in C:\Users\David\Documents\GitHub\Stardew-Valley-Mods\PyTK\CustomElementHandler\SaveHandler.cs:line 235
           
            Last edited: Jan 17, 2018
          • Loony Luna

            Loony Luna Tentacle Wrangler

            I've been having a similar problem. The oil mill, the hay dryer, and the vinegar jar don't seem to work. I can craft them, but they turn into three green lines that I can't place. I"m not getting any error codes. I am using other mods so it might be that the mods aren't working together. If you can think of anything that might help, that would be awesome. Thanks.
             
            • Platonymous

              Platonymous Zero Gravity Genie

              That is possible, but I haven't found which mod might do that. I could not recreate the error yet, which makes it hard to fix. You can however get around the problem: These versions of Examples & NewMachines are changed so that you have the option to just buy them from Pierre's.
               

                Attached Files:

              • Loony Luna

                Loony Luna Tentacle Wrangler

                I installed those files correctly, and all the machines are in the store. I can buy them, but it still gives me three green lines that can't be placed. When I mouse over the item, it tells me the name of the machine, but the description is just three question marks.
                 
                • Pathoschild

                  Pathoschild Master Astronaut

                  @Loony Luna Can you do this to provide more info?
                  1. Install the Lookup Anything mod.
                  2. Run the game once to generate its config file.
                  3. Open Lookup Anything's config.json file in a text editor, and change the ShowDataMiningFields field to true.
                  4. Launch the game.
                  5. Put the cursor over one of the broken items, press F1 to show info, and post a screenshot here.
                  6. Put the cursor over a non-broken custom item (if any), press F1 to show info, and post a screenshot here.
                   
                  • Loony Luna

                    Loony Luna Tentacle Wrangler

                    These are all the screenshots. I'm sorry I had to break them up to upload. Thank you!
                     

                      Attached Files:

                    • Pathoschild

                      Pathoschild Master Astronaut

                      @Platonymous It looks like the broken items aren't replaced with your custom item type.

                      For example, here's a Butter Churn (working fine):
                      upload_2018-1-19_15-1-6.png

                      And here's a Hay Dryer (broken):
                      upload_2018-1-19_15-1-56.png
                       
                      • Pathoschild

                        Pathoschild Master Astronaut

                      • Loony Luna

                        Loony Luna Tentacle Wrangler

                        Here are the save files and most of the mods. I'm also using the Longevity mod which is too big to upload even compressed by itself. Thanks for your help.
                         

                          Attached Files:

                        • Platonymous

                          Platonymous Zero Gravity Genie

                          Found the problem, it's Longevity.
                          Set
                          "Price_Balance": false,
                          in longevitys config to avoid the problem, while I look into if CFR can be made compatible.
                           
                          • Platonymous

                            Platonymous Zero Gravity Genie

                            I added a fix for this in PyTK 0.5.6.
                             
                            • Loony Luna

                              Loony Luna Tentacle Wrangler

                              Thank you both so much!! I updated PyTK and that fixed the machines. Thank you!!!
                               
                              • Malrift

                                Malrift Intergalactic Tourist

                                First off @Platonymous I would like to say I love your work. Your dedication and constant innovation keep this game fresh and I'm always looking forward to seeing what you come out with next.

                                I have a new one for ya. I was able to recreate this multiple times and even went as far as to removed all mods other then SMAPI, Customfarming, and PyTK. The only machine I used was the mailbox PC and removed the rest of the machine folders as well. When the PC is placed in the house it works great, I can pick it up, and re/move it. However once the house gets upgraded (and the PC was in place prior to the upgrade) it cannot be moved. Attempting to do so creates the miniature "pick me up" version of the PC just outside the house frame. When I attempt to sleep, the game just idles on "saving...." until I am forced close the window.

                                I'll just have to walk those extra 5 or so squares to check the mail from the comfort of my upgraded house... first world problems. Below is a link to the SMAPI trouble log of the minimum mod method. (I can attached if needed).

                                https://log.smapi.io/XdryJF5c

                                P.S. I first encountered this error before updating to the latest version of both mods, and continued after updating.
                                 

                                Share This Page