Tool SMAPI: Stardew Modding API

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

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

    xayasan Aquatic Astronaut

    Hi! My game crashes whenever I start Stardew Valley while SMAPI is installed, no matter which version and if I have mods installed or not. I have Stardew Valley Version 1.2.30.
     
    • Pathoschild

      Pathoschild Tiy's Beard

      Hi @xayasan. Can you post a screenshot of the error?
       
      • xayasan

        xayasan Aquatic Astronaut

        1 is with mods, 2 without and 3 is the folder where the error log is supposed to be, but it seems like it's missing.
        123.png

        EDIT: I was able to find the ErrorLog. The last few lines just keep on repeating.
        errorlog.PNG
         
          Last edited: May 26, 2017
        • Feybourne

          Feybourne Void-Bound Voyager

          I just updated to the current versions of all my mods, including SMAPI, but now when SMAPI is launched it says this message and the mods will not work cooperatively.
           

            Attached Files:

          • Pathoschild

            Pathoschild Tiy's Beard

            @Feybourne: None of those messages are anything to worry about, but you don't have any mods installed. SMAPI is looking for your mods in C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods; did you put them somewhere else?
             
            • Pathoschild

              Pathoschild Tiy's Beard

              @xayasan I fixed a rare error similar to that one in the upcoming SMAPI 1.14. If you ping me in the #modding channel on Discord, I can give you a preview version to see if it fixes your issue too.
               
              • YAFDD

                YAFDD Orbital Explorer

                I installed SMAPI and I tried to open it and an ERROR appeared : "
                Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'StardewValley, Version=1.0.6124.26600, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
                at StardewModdingAPI.Program.Main(String[] args)" what do I do to fix it ?
                 
                • Pathoschild

                  Pathoschild Tiy's Beard

                • snowparrot

                  snowparrot Space Hobo

                  Hello Im using SMAPI on Ubuntu 16.04 but it doesnt work.
                  Basically the window opens aand there is the following error:



                  22:25:18 DEBUG SMAPI] Mods go here: /home/snowparrot/GOG Games/Stardew Valley/game/Mods
                  [22:25:18 DEBUG SMAPI] Preparing SMAPI...
                  [22:25:18 DEBUG SMAPI] Starting game...
                  [22:25:23 ERROR SMAPI] The game failed unexpectedly: System.TypeInitializationException: The type initializer for 'StardewValley.SaveGame' threw an exception. ---> System.MissingMethodException: Attempted to access a missing method.
                  at (wrapper managed-to-native) System.ComponentModel.Win32Exception:W32ErrorMessage (int)
                  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0024e] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0008b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at System.Diagnostics.Process.Start () [0x0001b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
                  at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0015b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at Mono.CSharp.CSharpCodeCompiler.CompileFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x0009a] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00011] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00014] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
                  at System.Xml.Serialization.Compiler.Compile (System.Reflection.Assembly parent, System.String ns, System.Xml.Serialization.XmlSerializerCompilerParameters xmlParameters, System.Security.Policy.Evidence evidence) [0x0015c] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.TempAssembly.GenerateAssembly (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.Security.Policy.Evidence evidence, System.Xml.Serialization.XmlSerializerCompilerParameters parameters, System.Reflection.Assembly assembly, System.Collections.Hashtable assemblies) [0x00524] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.TempAssembly..ctor (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00087] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly (System.Xml.Serialization.XmlMapping xmlMapping, System.Type type, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00000] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0007d] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <93d6495639eb43819fb809eace12c5f7>:0
                  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <93d6495639eb43819fb809eace12c5f7>:0
                  at StardewValley.SaveGame..cctor () [0x001c1] in <496bc932fafd4634af42141c197f141c>:0
                  --- End of inner exception stack trace ---
                  at StardewModdingAPI.Framework.SGame.Update (Microsoft.Xna.Framework.GameTime gameTime) [0x00034] in <f81747be20524a79a00d7257f84984eb>:0
                  at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x0001c] in <84ea18c226e44e38b992143224d10a1f>:0
                  at Microsoft.Xna.Framework.Game.Tick () [0x000ff] in <84ea18c226e44e38b992143224d10a1f>:0
                  at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x0001c] in <84ea18c226e44e38b992143224d10a1f>:0
                  at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x0008a] in <84ea18c226e44e38b992143224d10a1f>:0
                  at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <84ea18c226e44e38b992143224d10a1f>:0
                  at StardewModdingAPI.Program.RunInteractively () [0x00232] in <f81747be20524a79a00d7257f84984eb>:0
                  [22:25:23 INFO SMAPI] Game has ended. Press any key to exit.
                  aAL lib: (EE) alc_cleanup: 1 device not closed


                  I purchased via gog.com

                  Thanks for help!
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    Hi @snowparrot. The error seems to be in the game code, not SMAPI. Can you check whether the error happens if you uninstall SMAPI and run the game directly?
                     
                    • snowparrot

                      snowparrot Space Hobo

                      The game works without problems.
                      I just use the Multiplayer Mod.
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        @snowparrot Does the error happen if you remove the Makeshift Multiplayer mod temporarily?
                         
                        • MeiSanniang

                          MeiSanniang Aquatic Astronaut

                          Hi Pathoschild,

                          First off, I'd like to thank you (and the other developers/programmers) a million times over for your hard work and dedication. Honestly, you've increased the replay value of this game (for me anyway) and made it tons, tons more fun.

                          Secondly, I'm throwing the towel in on figuring out this Portraiture (with DC-burger's portraits) mod problem. I read a page or two back, and I saw that you may be working on a fix in 1.14. But I'm trying my luck to see if this can be helped.

                          Here's my issue: I can't change the portraits as instructed when pushing the "P" key. I changed the key to "Z" and even "K". Then, I read my error log and saw this - -
                          Code:
                          [00:47:14 INFO  SMAPI] SMAPI 1.13.1 with Stardew Valley 1.2.30 on Unix 16.6.0.0
                          
                          [00:47:14 DEBUG SMAPI] Mods go here: /Users/julia/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/Mods
                          
                          [00:47:14 DEBUG SMAPI] Preparing SMAPI...
                          
                          [00:47:15 DEBUG SMAPI] Starting game...
                          
                          Setting breakpad minidump AppID = 413150
                          
                          Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198041109048 [API loaded no]
                          
                          [[00:47:29 DEBUG SMAPI] Detecting common issues...
                          
                          [00:47:29 DEBUG SMAPI] Loading mod metadata...
                          
                          [00:47:29 DEBUG SMAPI] Loading mods...
                          
                          [00:47:29 INFO  SMAPI] Loaded Portraiture by Platonymous, v1.2 | Helper Mod for Portraits.
                          
                          [00:47:29 INFO  SMAPI] Loaded Trainer Mod by SMAPI, v1.9 | Adds SMAPI console commands that let you manipulate the game.
                          
                          [00:47:29 WARN  SMAPI] The Portraiture mod failed on entry initialisation. It will still be loaded, but may not function correctly.
                          
                          Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: “. Path 'changeKey', line 2, position 15.
                          
                            at Newtonsoft.Json.JsonTextReader.ParseValue () <0x161358ea0 + 0x00565> in <filename unknown>:0
                          
                            at Newtonsoft.Json.JsonTextReader.Read () <0x161358940 + 0x00058> in <filename unknown>:0
                          
                            at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, Boolean hasConverter) <0x1613586a0 + 0x0003b> in <filename unknown>:0
                          
                            at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) <0x16135d100 + 0x00a79> in <filename unknown>:0
                          
                          [00:47:29 DEBUG SMAPI] Loaded 2 mods.
                          
                          [00:47:29 DEBUG SMAPI] Starting console...
                          
                          [00:47:29 INFO  SMAPI] Type 'help' for help, or 'help <cmd>' for a command's usage
                          
                          Please help! >_< And thank you in advance!
                           
                            Pathoschild likes this.
                          • Pathoschild

                            Pathoschild Tiy's Beard

                            Hi @MeiSanniang. The fix in SMAPI 1.14 is for a different issue, but your error should be easy to fix. In Portraiture's config.json file, make sure you don't use curly or 'smart' quotes since those aren't valid JSON. Try deleting the file to regenerate it, then make sure your editor doesn't change the quote characters when you edit it.
                             
                            • snowparrot

                              snowparrot Space Hobo

                            • snowparrot

                              snowparrot Space Hobo

                              @Pathoschild

                              Error occures if I remove MP mod. I can use a logging tool for better understanding!
                               
                              • MeiSanniang

                                MeiSanniang Aquatic Astronaut

                                I REALLY FREAKING LOVE YOU. THANK YOU SO MUCH! IT WORKED! :D
                                 
                                • Pathoschild

                                  Pathoschild Tiy's Beard

                                • Jenga42o

                                  Jenga42o Space Hobo

                                  Hi there!

                                  Hope someone can help me...

                                  I use Steam on a Mac computer for the game and love SMAPI, but the game won't even open for me anymore. I'm assuming there were some changes due to the update. Can anyone help me out? When I uninstall and reinstall the game it works fine. So, clearly there is something wrong with my current SMAPI.

                                  Please point me in the right direction! I just really want to use these two mods below:
                                   
                                  • Pathoschild

                                    Pathoschild Tiy's Beard

                                    For reference, we helped @Jenga42o on Discord. Their problem is caused by an unknown Steam issue — launching SMAPI directly works fine, but it doesn't work when launched through Steam. For now the fix is to just launch SMAPI directly. If anyone else has (or fixed) a similar issue, let me know. :)
                                     
                                    Thread Status:
                                    Not open for further replies.

                                    Share This Page