Tool SMAPI: Stardew Modding API

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

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

    simdebster Scruffy Nerf-Herder

    When SMAPI says that a mod "patches" the game, what does that mean exactly? Are they actually patching to the new version of the game (hope not) or is it just a warning that the mod changes what the game code normally would do? In the case of the latter, just removing the mod should have it all back to normal correct? Or does this mean that your Save file is basically screwed upon removing the mod?
     
    • Pathoschild

      Pathoschild Tiy's Beard

      @simdebster

      Short answer:

      Those mods change the game code, so they can cause errors, crashes, and compatibility issues. If you run into problems, you can usually just remove those mods and your save file will be okay. That's not guaranteed though — since they're changing the game code, there's a higher chance they'll break your save data. Make sure to keep save backups just in case.

      Long answer:
      Most mods run code alongside the game and make changes to the game state. For example, a mod might say "when the player activates this machine, remove these ingredients from their inventory and start the machine with this output". You can do a lot with that approach, but not everything.

      A few mods use a more advanced technique called 'runtime patching'. Patching means changing the game code itself to work differently, and runtime means this happens in memory (the actual game files aren't changed). For example, such a mod might say "change the game method GameLocation.isCollidingPosition so it does X instead of Y". This can be used to do things which otherwise aren't possible, but it comes with important caveats. Since patches bypass normal C# protections, it's very easy to cause errors (including serious issues that may crash your game or corrupt your save). Troubleshooting and crossplatform compatibility can also be more difficult, and mods which use patching may conflict with each other. Patches may also have unpredictable effects on other mods, since they change the game itself.

      To be clear: runtime patching isn't bad, it's just more fragile. Some things just aren't possible without it. Feel free to use mods which use patching, but if you run into problems then try removing those mods first. If the problem only happens with a mod which uses patching installed, report it to that mod's author (even if the issue seems unrelated to their mod).
       
      • simdebster

        simdebster Scruffy Nerf-Herder

        Thanks so much for your explanation. It helps a lot.

         
        • Truthkeeper

          Truthkeeper Big Damn Hero

          Given that it happened right after a game update, I feel safe in assuming that the answer here is "The update broke SMAPI, wait until the next SMAPI update", but posting about it just in case. Immediate crash on starting, before anything loads at all.

          https://log.smapi.io/4C0wTuJi
           
          • Reput

            Reput Space Hobo

            Every time i open it is a crash
            pls help

            i dont have any mode in and is a crash every time
             
            • Iris Blanche

              Iris Blanche Pudding Paradox Forum Moderator

              Please avoid doubleposting in such a short time. Use the edit function instead when making additions to your previous post.
              I merged your posts.
               
              • Mizzion

                Mizzion Phantasmal Quasar

                It would help if you gave more details. At the very least, you should go to https://log.smapi.io and follow the directions to upload your error log. Then share the link with us.
                 
                • Pathoschild

                  Pathoschild Tiy's Beard

                • Truthkeeper

                  Truthkeeper Big Damn Hero

                  Welp, glad I decided to post about it then. As the troubleshooting guide suggests, rebooting solved the issue entirely.
                   
                  • Nurmie

                    Nurmie Void-Bound Voyager

                  • Pathoschild

                    Pathoschild Tiy's Beard

                    @Nurmie Advanced Location Loader is causing an immediate game exit due to one of your custom maps. Removing either the affected custom map or Advanced Location Loader should fix it.
                     
                      Nurmie likes this.
                    • Nurmie

                      Nurmie Void-Bound Voyager

                      That did fix my problem. Thank you. :)
                       
                      • Snarkypie

                        Snarkypie Scruffy Nerf-Herder

                        [QUOTE="Pathoschild, post: 3288800, Do the crashes still happen if you temporarily remove Advanced Location Loader, Animal Husbandry, Custom Farming Redux, Custom Furniture, Custom Furniture Anywhere, PyTK, SpaceCore, and Stack Everything?
                        View attachment 203279

                        If I take all of that out, the game just loops me from choosing my save game back to the Chucklefish flash, rinse repeat.
                         
                        • 13akoors

                          13akoors Scruffy Nerf-Herder

                          Can you either report that error to the ALL mod in question, or let me know which ALL mod is causing that error. You're now the second person having that issue, and it'd be helpful to ALL and the other mod's dev to make sure this error is fixed
                           
                            Last edited: Jun 17, 2018
                          • Pathoschild

                            Pathoschild Tiy's Beard

                          • skyraven

                            skyraven Big Damn Hero

                          • Pathoschild

                            Pathoschild Tiy's Beard

                          • putaytoe

                            putaytoe Void-Bound Voyager

                            I'm guessing they just pushed a new beta update, because I checked the smapi compatibility entry and I'm using the most recent versions of the following mods that are giving me errors in smapi (Automate, CJB Cheats Menu, Console Commands)
                            Here's my log: https://log.smapi.io/Txpn8epT
                             
                            • Pathoschild

                              Pathoschild Tiy's Beard

                              Yep, several mods broke in today's Stardew Valley 1.3.20 beta update. The mod authors will need to release updates to fix compatibility. Keep an eye on the SMAPI console for update alerts, or watch the compatibility list. :)
                               
                                putaytoe and Kuriiyo like this.
                              • DrakeIceheart

                                DrakeIceheart Space Hobo

                                Ok, so from what im reading im not the only person getting the issue stating the Console Commands is out of date and stuff. ok i feel better now and am not freaking out. i hope this gets fixed soon my friend and i were planning to play, but i fully understand these things take time.
                                 
                                Thread Status:
                                Not open for further replies.

                                Share This Page