1. Hey Guest! Our new game Wargroove has released! Check out the forums or wiki for more information!
    Dismiss Notice

Modding Help Do's and Don'ts of reporting issues with SMAPI mods

Discussion in 'Mods' started by Entoarox, Oct 5, 2016.

  1. Unoperation

    Unoperation Scruffy Nerf-Herder

    Hi, I was able to play for till now and game kept crashing every time I tried to sleep. I have no idea what the cause is. All I did was went into the mine after picking up my upgraded pickaxe then done with mining then hit the farm and sleep for the next day then a sudden crash.

    https://log.smapi.io/USCK0a8X
     
    • Entoarox

      Entoarox Oxygen Tank

      The TunnelSystem content pack, for the Content Patcher mod is broken, report the issue to the pack's author and disable it for now.
       
      • Neko0000

        Neko0000 Space Hobo

        Sooooo I downloaded and unzipped everything, Started up the game. Hit I and... nothing happend. It was as if the mod was never installed. I followed the instructions and troubleshoot options on the wiki to the tee, but still nothing. I would love to upload the error log, but I dont have one. I went to https://log.smapi.io and did what it said, but my computer told me that file did not exist. I have the latest version of smapi and of the mod, they are both fully compatible with my computer and my version of stardew valley, and the mod shows up in my mods folder, but nothing happens when I hit i, and the so the mod does't work.

        (I am using the latest smapi that is not in beta, not the one that is in beta)
         
        • Entoarox

          Entoarox Oxygen Tank

          If no SMAPI log exists, then you are not running the game with SMAPI active, please go back to the wiki and check the instructions from step 1 again, also make sure you ran the SMAPI installer and that it gave you a success message.
           
          • milocricket

            milocricket Space Hobo

            I am using the latest version of SMAPI. I have an issue where my mod config files reset every launch. No matter how I change them they are forced to reset to the default values when I start SMAPI. How do I fix this? Here is the log, although I can't imagine it's useful. https://log.smapi.io/han6urc0
             
            • Pathoschild

              Pathoschild Cosmos Killer

              @milocricket Can you pick one affected mod, make your changes to the config.json file, then attach a copy of it here before and after running the game? (And mention which mod it's for.)
               
              • milocricket

                milocricket Space Hobo

                As per tradition, the issue fixed itself as I tried to get the reset file. If it happens again I'll make sure to get both copies.
                 
                • Neko0000

                  Neko0000 Space Hobo

                  thanks
                   
                  • airbender0610

                    airbender0610 Space Hobo

                    I just got Stardew Valley on Steam after loving it on the iOS version but I was unhappy with the limitations, especially the fishing. But I am still having a similar issue on the computer and now I am totally helpless trying to install some sort of fishing mod to help me out. Basically the game is still running like normal but the mod is not working. I'm not sure if I installed it wrong, it's a bad mod, or if there's something I just did not do correctly. When I launch the game a new window appears with a code and it looks like i've at least got SMAPI installed right but when I go to fish in the game, its normal and not how the mod was described as "instant fishing".

                    Here is my SMAPI log, I am completely clueless any help would be greatly appreciated: https://log.smapi.io/2Tk4VMVH


                    Let me know if that link is incorrect or anything. Again, totally clueless over here. Also, I am on a Mac.
                     
                    • Moragaine

                      Moragaine Big Damn Hero

                      @airbender0610 Your log looks fine, just a little bare. Being on a Mac won't matter, mods work the same on Win, Mac or Linux machines. However, it doesn't look like the fishing mod installed, though. Do you have a link to the fishing mod you were trying to install?
                       
                      • Red_Winter

                        Red_Winter Poptop Tamer

                        I have the same issue with SMAPI overwriting changed config.json values with the defaults set in the ModConfig class.

                        I put the following to access the ModConfig class in ModEntry:

                        private ModConfig Config;
                        public override void Entry(IModHelper helper)
                        {
                        this.Config = this.Helper.ReadConfig<ModConfig>();
                        Util.Log("_0o_Post-read config - Sp, Su, Fa, Wi: "
                        + Config.SpringRainChance + ", "
                        + Config.SummerRainChance + ", "
                        + Config.FallRainChance + ", "
                        + Config.WinterSnowChance);
                        }



                        With ModConfig as:

                        public class ModConfig
                        {
                        public double SpringRainChance { get; } = 0.35;
                        public double SummerRainChance { get; } = 0.12;
                        public double FallRainChance { get; } = 0.30;
                        public double WinterSnowChance { get; } = 0.50;
                        }

                        Even if I change the config.json (SpringRainChance --> 0.15), it resets as soon as I start the game back up. The Util.Log outputs the default values despite my changing it manually in the config.json, which seems to mean it overwrites as its trying to read it, like it doesn't know it exists and makes a new one.

                        The mod is called "Gameplay_0o_Weather" in the log. However, the Util.Log function I used outputs as "game", so it'd be found by searching "_0o_Post-read config" in the SMAPI-latest.txt file. log.smapi.io/07HQue0Z

                        I'm on linux if that matters
                         
                          Last edited: Feb 10, 2019
                        • Mizzion

                          Mizzion Big Damn Hero

                          Would you mind putting your copying your files to https://pastebin.com/ ? That way we can see the entire file, just in case you're editing it somewhere else. As for SMAPI not outputting your changes to the log. After you change the settings, you may need to reload the config file itself through SMAPI, especially if you're updating the config by a text editor while in the game.
                           
                          • Red_Winter

                            Red_Winter Poptop Tamer

                            Okay, so the following is the ModEntry.cs:

                            https://pastebin.com/7qrfaKUm

                            The following is the ModConfig.cs:

                            https://pastebin.com/r5aPTRcq

                            However, its worth noting that I didn't allow the "set;" method in the ModConfig file, which means if I ever tried to change the value in the dll, it'd throw an error and fail to compile. The issue existed even when I allowed "set;" though. I actually removed it initially to see if that'd fix it. It didn't, but I liked the fact that it prevents me from accidentally changing them in the dll, so I kept it anyways.

                            Also, nothing in the mod actually accesses them directly after the ModConfig is initially read. I immediately save their values to new static fields in ModEntry and let the mod work with those instead. I was having issues getting access to the config variables from other classes, so creating copies as static and calling ModEntry.[copiedVariableName] was the easiest way to do it. Since those values never change during execution, they only needed to be set on startup.

                            When I tested it, I changed the config.json values when Stardew wasn't running, then started the game, then immediately exited. The values would revert back during SMAPI's startup (before loading save). I logged the values just after helper.ReadConfig reads the config.json for the first (and only) time just to confirm that's where the values revert back to the defaults. I can't check it before help.ReadConfig runs, because the object doesn't exist before that.

                            Also note, I made some minor changes from my last post, like removing "this." from "helper.ReadConfig<ModConfig>();". Also changing ModConfig.cs to "internal" instead of "public". I'm looking at other open source mods to see if maybe my syntax is messing it up. So far, the error persists regardless.
                             
                              Last edited: Feb 10, 2019
                            • Mizzion

                              Mizzion Big Damn Hero

                              I don't see anything in there that would change your settings back to default. Is this all your code? I'm just thinking I'd test it out and see what I can find out. You could always come onto the discord and we can help you further there aswell. You can get to the SDV discord from the following link. https://discordapp.com/invite/stardewvalley


                              You can find us Modders in the "modding" channel
                               
                              • Red_Winter

                                Red_Winter Poptop Tamer

                                No, those are parts that included anything related to ModConfig. However, I found out what was wrong. Turns out the problem WAS not including "set;" in the ModConfig. I could've swore it was acting up before I changed that, but apparently I was wrong.

                                The changes seem to be sticking now. Its weird that the lack of a "set" function would cause it to endlessly reset it. Maybe SMAPI needs it to find the config.json, even if its never used? Anyways, I'll definitely head over to the discord if anything comes up.
                                 
                                  Last edited: Feb 11, 2019
                                • Pathoschild

                                  Pathoschild Cosmos Killer

                                  @Red_Winter SMAPI will read the values from your config.json and store them in your model, but it can't update the model if there are no setters. That means your model will always have the default values, which SMAPI will then write back to the file. Adding setters is the easiest way to fix it, but SMAPI uses Json.NET if you want to look up other ways to initialise your model.
                                   
                                  • Red_Winter

                                    Red_Winter Poptop Tamer

                                    @Pathoschild Ahh, okay. That makes sense. I'll just leave it for now as long as it works.
                                     
                                    • airbender0610

                                      airbender0610 Space Hobo

                                      @Moragaine Here is a link to the mod:

                                      http://www.mediafire.com/file/8ujixtee5hfn48w/InstantFishing+1.3.zip

                                      If you have suggestions for a different mod I should get, let me know. I appreciate the help!
                                       
                                      • Moragaine

                                        Moragaine Big Damn Hero

                                        @airbender0610 That mod is broken, according to https://mods.smapi.io/, which tracks all SdV Smapi mods. You could try Zoryn's Fishing Mod, which the list recommends(it's the one I use, too). Or there are fishing mods of different flavors on Nexus for you to try.
                                         
                                        • soffbum

                                          soffbum Space Hobo

                                          Hi, can someone please help me? I'm using SMAPI with STEAM.
                                          I don't know anythig about these things but i tried to install mods because the game started to be boring, i read many guides and did every single step but my mods and SMAPI still doesn't work.
                                          At first i installed SMAPI in the game folder and realised it was wrong lol, then uninstalled and did it correctly (still doesn't work).
                                          The game opens well and works as usual, but the SMAPI window keeps saying that skipped a few mods because they don't have "manifest.json" but they do have it so i'm like ???
                                          I think i have the latest versions of both Stardew Valley and SMAPI so i don't know what the problem is.
                                          I did this thing so you can see my SMAPI?? (https://log.smapi.io/hracLyVH).
                                          I don't know anything, please help me people :(
                                           

                                          Share This Page