Tool SMAPI: Stardew Modding API

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

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

    pepoluan Big Damn Hero

    What's the "modern" version of the ContentEvents.AfterRead event?

    Edit: To be clearer, I want to add a custom weapon via SMAPI, and I've been reading on SMAPI's Issue #173 which gives me some thinking idea...
     
    • Pathoschild

      Pathoschild Tiy's Beard

    • pepoluan

      pepoluan Big Damn Hero

    • Pathoschild

      Pathoschild Tiy's Beard

      @pepoluan Try calling Game1.player.holdUpItemThenMessage(item) for that.
       
        pepoluan likes this.
      • fandy

        fandy Space Hobo

        Hey guys, i'm posting here again for another issues.

        Got this on my log, and yes its a multiplayer game

        https://log.smapi.io/YvtGqVMs

        any idea how to fix this ?
         
        • pepoluan

          pepoluan Big Damn Hero

          IT WORKS!!!

          Thank you!!!!
           
          • Tharmekul

            Tharmekul Space Hobo

            hey ive been having issues adding the stardew expanded mod any help would be welcome
             

              Attached Files:

            • Pathoschild

              Pathoschild Tiy's Beard

            • 13akoors

              13akoors Scruffy Nerf-Herder

              Umm...perhaps just re-install the game?
               
                haskg84 likes this.
              • Pathoschild

                Pathoschild Tiy's Beard

              • haskg84

                haskg84 Void-Bound Voyager

              • Pathoschild

                Pathoschild Tiy's Beard

                @haskg84 You have Json Assets content packs that provide duplicate items, which Json Assets doesn't handle well. Search "Duplicate" in that log to see which items are duplicated, then remove one of the content packs to fix the error.
                 
                • skeleman

                  skeleman Intergalactic Tourist

                  https://log.smapi.io/nuiwY1WG

                  For some reason, my game crashes on launch, how do I go about fixing this? the only mod I use is the one that expands the cellar
                   
                  • SpringsSong

                    SpringsSong Cosmic Narwhal

                    Update SMAPI, and that should fix the problem. :3
                     
                    • Asmmodeus

                      Asmmodeus Void-Bound Voyager

                      idk if this can be saved with so many mods on it, but it's worth a try.
                      https://log.smapi.io/mfWpPzfb

                      The game crashes on the second year, between Fall 3 to 4.
                      Whenever I go to sleep the game crashes before it can save. I've tried running the game with most of the mods off and no dice. I've restored all the xbn files to it's defaults and it still crashes on the same day.
                      I've tried a couple of back ups (starting on Summer 28) and just simply sleep nonstop until I reach fall 3 and crash before I can reach fall 4.
                      I've trying changing the date and next day weather on the savefile, but it changed nothing.
                      For longevity, I have all the features off except Taxes in order to maximize compatibility.
                      This save has been working for over 73 hours of gameplay (yes I have that much time on it) with no issues until I reach that day.

                      I will try and older savefile (from a month back in game or before) and sleep nonstop to see if I get the same issue again. I'm thinking it might be a mod that has something coded for that day or night and it's nuking my file, or a core game event like a fairy (already had one in this save no issues) or a witch.

                      I've read about this bug in the core game from about a year ago but as far as I know it was already patched on pc and only wii users still experience it. I tried the following fixes for such case with no results
                      - emptying fridge before bed time
                      - putting all my tools and inventory items in a chest before bed time
                      - Reorganizing all my chests to look for gaps before bed time

                      so far, from the logs, this seems to be what's causing the issue (I have no idea what it means):


                      19:57:02 ERROR game System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Convert.ToInt32(String value) at StardewValley.NPC.loadCurrentDialogue() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\NPC.cs:line 1975 at StardewValley.NPC.get_CurrentDialogue() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\NPC.cs:line 244 at StardewValley.Game1.warpCharacter(NPC character, GameLocation targetLocation, Vector2 position) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 6504 at StardewValley.NPC.dayUpdate(Int32 dayOfMonth) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\NPC.cs:line 3699 at StardewValley.Game1._newDayAfterFade() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 5582 at StardewValley.Game1.<>c.<newDayAfterFade>b__516_1() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 5219 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()


                      Any help with this is always welcome
                       

                        Attached Files:

                      • MouseyPounds

                        MouseyPounds Cosmic Narwhal

                        @Asmmodeus : The most important bits of that error are the following: "Input string was not in a correct format" , "StringToNumber", "NPC.loadCurrentDialogue()". Basically one of your dialogue mods has a formatting error in one of its entries that the game is trying to load for the next day in your save. Your best workaround is to disable all dialogue mods, play through the day, and then restore the mods after successfully saving the next day. Often that will temporarily resolve the issue as a different dialogue will be queued up for the day after.

                        If you want to try and narrow it down so that you can report it to the mod author, you'll want to just disable about half of the dialogue mods and keep doing so until the game successfully saves. At that point, you know the error was in the last set disabled and you could go back to the problem save and reenable mods one by one until the error occurs again.
                         
                        • pepoluan

                          pepoluan Big Damn Hero

                          How do I choose the color of a chest?

                          I tried doing:

                          Chest c = new Chest(true);
                          c.Tint = <some color>;
                          <dropObject code here>

                          yet the chest didn't actually change color; it just got like this "filter" applied on top of the sprite...
                           
                          • Asmmodeus

                            Asmmodeus Void-Bound Voyager

                            @MouseyPounds thanks for helping me!
                            I did what you told me, removing dialog mods until I find the culprit or something. When I uninstalled The Robin Romance mod (https://www.nexusmods.com/stardewvalley/mods/3239?tab=description) I got this:
                            https://log.smapi.io/PDTnCY3x

                            I guess this might be the mod causing me issues, the problem now is that my game get's tuck in an infinite loading loop whenever I uninstall that mod. I'm planning on informing the author of that mod, but it seems like they are struggling on fixing that mod and has reports of this mod making peoples' games crash. But now bricking someone's save like this after uninstall is serious. I just don't want to trow this in yet until I can confirm that Indeed The Robin Romance mod is bricking saves and not just me misinterpreting information. If someone can confirm this for me, it would be much appreciated. Or even better make an unofficial patch (assuming this is the culprit) to solve this issue would be amazing.

                            I have attached my save game below in case someone wants to check it. I know I can edit my save to remove the references from this mod but have no Idea on how to do it.

                            Thanks once again in advance.
                             

                              Attached Files:

                            • MouseyPounds

                              MouseyPounds Cosmic Narwhal

                              @Asmmodeus : If that mod is the problem it is a little trickier to remove because it adds a custom NPC in addition to editing dialogue. Basically, any custom NPC has to be manually removed from the save file once the mod for it is disabled. Here is a copy of your save with the Ram NPC from that mod removed so that you can continue your testing (or continue the game without that mod if you choose)
                               

                                Attached Files:

                              • CatWithHoodie

                                CatWithHoodie Space Hobo

                                Hello. This is my first time trying to mod a game and i messed up. It always crashes but before it crashes i see the Stardew Valley game screen and its purple. Can anyone help me with this please? I realy want to try playing different mods.
                                https://log.smapi.io/tyS3a1Tj
                                 
                                Thread Status:
                                Not open for further replies.

                                Share This Page