Tool SMAPI: Stardew Modding API

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

  1. Wingyl

    Wingyl Industrial Terraformer

    Seems like either an old XNB replacer mod causing issues, or a corrupted save file. Verify your content files and see if it happens again; if it does post the zipped save file here.
     
    • pepoluan

      pepoluan Star Wrangler

      I'm just concerned if I was wrong with that "true" value in the line
      Code:
      Chest chest = new Chest(true);
      The object browser only said that the parameter was "playerChest" (IIRC), so I naturally assume it has to be set to "true".

      Also, I'm not quite sure what "initialPlacement" parameter means in the ".dropObject()" call.

      (Here's a link to the source code repository)
       
      • pepoluan

        pepoluan Star Wrangler

        Okay, my dropped chest seems ... different.

        This is how a my dropped chest looked like when hovered:
        2019-12-12_012510.jpg

        This below is how a NORMAL chest should look like when hovered:
        2019-12-12_012526.jpg

        Notice that with my chest, the cursor is an "arrow plus", while with a normal chest, the cursor is a "hand".

        Why is this happening?
         
        • Sabaene

          Sabaene Intergalactic Tourist

          I have The Mighty Nein in Stardew Valley, and Stardew Valley Expanded. Every time I catch a flounder in the spring the game crashes. Is there any way to fix it?
           
          • Mizzion

            Mizzion Phantasmal Quasar

            If you go to https://smapi.io/log and follow the directions, then share the link with us. We can take a look at the log and see what errors SMAPI is catching.
             
            • Mizzion

              Mizzion Phantasmal Quasar

              It looks like it's turning your chest into a forager item. I went through my FarmCleaner mod, and found how I did the chest that stores my farms items. You can see the chest codes HERE . As for the playerChest, Im pretty sure that means it stays if it gets hit by the pickaxe, instead of vanishing.


              Edit
              If you want help faster, I would suggest you join us in the SDV discord, there's usually modders around who can help faster than you can get on the forums. https://discord.gg/stardewvalley
               
              • jahangmar

                jahangmar Starship Captain

                @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 Star Wrangler

                  Ahhh thanks for the explanation!

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

                    Evielutional Space Spelunker

                    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 Starship Captain

                      @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 Space Spelunker

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

                          Wingyl Industrial Terraformer

                          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 Star Wrangler

                            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 Starship Captain

                                      @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 Starship Captain

                                        @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 Starship Captain

                                          @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.

                                          Share This Page