Tool SMAPI: Stardew Modding API

Discussion in 'Mods' started by ClxS, Mar 6, 2016.

Thread Status:
Not open for further replies.
  1. jahangmar

    jahangmar Sandwich Man

    @pepoluan Use setObject instead:
    Code:
    StardewValley.Objects.Chest chest = new StardewValley.Objects.Chest(true);
                    Vector2 pos = new Vector2(Game1.player.getTileX(), (Game1.player.getTileY() - 1));
                    Game1.currentLocation.setObject(pos, chest);
    The dropObject method does weird stuff with crafted items as you noticed.

    Edit:
    Also, the chest added with dropObject can be removed with a pickaxe (the cursor has to be not over the chest) but it acts weird because its seems to be not intended to be used with crafted items and sets chest.isSpawnedObject to true.
    playerChest indicates that it is a chest crafted by a player and not a chest you find in the mines.
     
      Last edited: Dec 12, 2019
    • pepoluan

      pepoluan Big Damn Hero

      Ahhh thanks for the explanation!

      I'm going to change my code later tonight after I return home.
       
      • Evielutional

        Evielutional Aquatic Astronaut

        Hi there. I was wondering if anyone could help me figure out why my game keeps crashing to desktop? I've had all mods installed and updated as best I can throughout this playthrough, but the New Machines have stalled and are stuck in their producing loop and if they do produce I keep getting weeds. And now I'm stuck on Fall 28 of Y1, as when I go to sleep it stalls then crashes the game. Can anyone see where there might be an issue please? Also, the mods stay on the update list despite me downloading the latest version from nexus >_> Don't know what that's about either :/

        Log: https://smapi.io/log/091e007b69ea4ebf9838868451bd3f2b

        Update: Reinstalled all mods from fresh downloads, same issues.

        Newest log: https://smapi.io/log/1Cjpkwaa
         
          Last edited: Dec 12, 2019
        • jahangmar

          jahangmar Sandwich Man

          @Evielutional There is a problem with a mod that adds NPCs or alters the schedules of existing ones. PyTK also has a problem with something but I cannot tell what it is.
           
          • Evielutional

            Evielutional Aquatic Astronaut

            Brill, thank you. I'll have a further dig :)
             
            • Wingyl

              Wingyl Scruffy Nerf-Herder

              PyTK has a problem with being PyTK. That error just happens a lot in the new version of PyTK. It'll be fixed...probably whenever Routine has time.
               
              • pepoluan

                pepoluan Big Damn Hero

                It works! Thank you!
                 
                • CowKing

                  CowKing Intergalactic Tourist

                  Hi! I'm having the same problem as the person above, except I'm trying to sleep on the 28th of Fall on Year 1.
                  My other farm seems to be able to sleep so I think it's the day that's making the game crash?

                  Here's my error log!

                  Thanks!
                   
                  • Sabaene

                    Sabaene Intergalactic Tourist

                    I tried that and I'm on windows 10 and nothing comes up when I try to get the log, any tips?
                     
                    • crystallofolia

                      crystallofolia Space Hobo

                      Hello! I'm having some trouble with figuring out just what is causing an issue with my save file atm. The game crashes to desktop when trying to sleep on Spring 27th. I had experienced no issues until this point and tried setting back to an earlier save where I could sleep as normal until encountering the same issue when trying to load into Spring 28th.

                      Here's my smapi log and thank you in advanced to any one who can assist me. c:
                       
                      • Killparadise

                        Killparadise Void-Bound Voyager

                        I'm having some issue with sardew expanded, it works just fine on my desktop, but when using my laptop (which is running linux) I get some errors with trying to load images. Any thoughts on what might be the problem? I do have Mono installed as the README says.

                        Here is my SMAPI log.
                         
                        • jahangmar

                          jahangmar Sandwich Man

                          @Killparadise A library on your system is missing: "libgdiplus.so". It's a dependency of mono on my (linux) system. You could try to find out which package of your distribution contains that library (it's probably just called libgdiplus) and install it.
                           
                          • jahangmar

                            jahangmar Sandwich Man

                            @crystallofolia Does this happen if you temporarily disable mods? Maybe it has to do with "Reset Terrain Features". Could also be related to "Farm Type Manager" or a mod depending on it.
                            @Sabaene What do you mean by "nothing comes up"? Which step of the instructions did not work?
                            @Billy0815 Do you both use the same mods? It would help to have the log of the host because the error was caused by a mod message sent by the host to the client. The host log should show the same moment when the client crashed. But it is weird that it crashes without mods.
                             
                            • jahangmar

                              jahangmar Sandwich Man

                              @CowKing RangeDisplay has a problem but it doesn't seem to be related to the crash. I would still recommend removing it because it is spamming the log file with error messages. You can try to reset your content files. If that doesn't help you can try to remove mods and find out if one of those is causing the problem.
                               
                                CowKing likes this.
                              • Mattzio

                                Mattzio Aquatic Astronaut

                              • Mizzion

                                Mizzion Phantasmal Quasar

                                Looks like you quit the game while it was still trying to load. I would suggest starting the game and waiting a bit longer.
                                 
                                • Sabaene

                                  Sabaene Intergalactic Tourist

                                  When I go to use the SMAPI log thing, I follow the instructions and when I press the run command, it then asks me what app I want to open it with. I try notepad, then it comes up blank.
                                   
                                  • CowKing

                                    CowKing Intergalactic Tourist

                                    After resetting my content files and removing the Furniture Anywhere mod, it seems to be working fine, I can go to sleep normally. However, because I placed a Chicken Statute outside, there's now this weird X near the spot I placed it in.
                                    The Furniture Anywhere mod doesn't even seem to work anyway, because the chicken statue would always turn invisible the next time I go to look at it. I tried bombing the area because none of my tools will remove that but the game just flashes white constantly (It was probably seizure-inducing) and this effect won't go away no matter what I did, I would have to close the game and relaunch it.
                                    Is there a way I could get rid of this, thanks in advance!

                                    upload_2019-12-13_16-53-13.png

                                    Edit: I figured it out! Playing the unmodded version replaces the spot with a grass/weed item that can be bombable. I just bomb the area and save and that seems to do the trick!
                                     
                                      Last edited: Dec 13, 2019
                                    • Sabaene

                                      Sabaene Intergalactic Tourist

                                      My game has been pooping out more, but I finally got around to finding the file deep in my computer of the SMAPI crash log so here it is....https://smapi.io/log/KvhLq9h2
                                       
                                      • soccera

                                        soccera Space Hobo

                                        I'm not really sure what to do... https://smapi.io/log/JqAApdeL

                                        I'm able to walk around my house but I crash when I walk outside and trigger an event with Gus. I remain on the screen for a few seconds before crashing. I also noticed that my house seems to be missing as well when i go outside.
                                        I decided to remove Paritee's BFAV while still having the animals on my farm so that's probably what's causing this but I don't know how to fix it since the newest version of BFAV is not compatible.
                                         
                                        Thread Status:
                                        Not open for further replies.

                                        Share This Page