Tool SMAPI: Stardew Modding API

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

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

    Pathoschild Tiy's Beard

    SMAPI 1.0 beta is now available for adventurous early adopters. :)

    Release highlights
    • SMAPI now runs on Linux and Mac too.
      (Note that most mods are still Windows-only until their authors update them. The next release will look into on making all mods crossplatform without an update.)
    • An automated installer lets you add or remove SMAPI in seconds.
    • You'll now see a message in the console when a new version.
    • The F2 debug mode has been removed to prevent accidental use. It's now available (and improved) as a separate mod.
    • The console log is now simpler and more user-friendly.

    Specific changes
    For players:
    • Added support for Linux and Mac.
    • Added installer to automate adding & removing SMAPI.
    • Added background update check on launch.
    • Fixed missing steam_appid.txt file.
    • Fixed some mod UIs disappearing at a non-default zoom level for some users.
    • Removed undocumented support for mods in the app data directory (breaking change).
      (The installer will automatically move any affected mods. If you use a mod manager, make sure to update to its latest version to avoid issues.)
    • Removed F2 debug mode.
    For mod developers:
    • Added deprecation warnings.
    • Added OS version to log.
    • Added zoom-adjusted mouse position to mouse-changed event arguments.
    • Added SMAPI code documentation.
    • Switched to semantic versioning.
    • Fixed mod versions not shown correctly in the log.
    • Fixed misspelled field in manifest.json schema.
    • Fixed some events getting wrong data.
    • Simplified log output.
    For SMAPI developers:
    • Simplified compiling from source.
    • Formalised release process and added automated build packaging.
    • Removed obsolete and unfinished code.
    • Internal cleanup & refactoring.

    Trying the beta
    See the beta release page if you'd like to try it out. Let me know how it goes! Ideally any issues that come up will be fixed before the final 1.0 release.
     
    • Thiagoh92

      Thiagoh92 Orbital Explorer

      Im getting this error:

      [12:44:16] Launching SMAPI 1.0-beta with Stardew Valley 1.11 on Microsoft Windows NT 6.2.9200.0
      [12:44:16] Initialising...
      [12:44:16] Preparing game...
      [12:44:16] Patching game...
      [12:44:16] Loading mods...
      [12:44:16] Loaded mod: Trainer Mod by Zoryn, v0.0 | Registers several commands to use. Most commands are trainer-like in that they offer forms of cheating.
      [12:44:16] Loaded 1 mods.
      [12:44:16] Tweaking game...
      [12:44:16] Trainer Mod used an old version of Mod.Entry, which is deprecated since SMAPI 1.0. It will work fine for now, but may be removed in a future version of SMAPI.
      [12:44:16] Starting Stardew Valley...
      [12:44:16] Starting console...
      [12:44:16] Type 'help' for help, or 'help <cmd>' for a command's usage
      [12:44:16] [ERROR] Game failed to start: System.ArgumentException: The screen device name must be a non-empty, non-null string.
      at Microsoft.Xna.Framework.WindowsGameWindow.ScreenFromDeviceName(String screenDeviceName)
      at Microsoft.Xna.Framework.WindowsGameForm.ResizeWindow(String screenDeviceName, Int32 clientWidth, Int32 clientHeight, Boolean center)
      at Microsoft.Xna.Framework.WindowsGameForm.EndScreenDeviceChange(String screenDeviceName, Int32 clientWidth, Int32 clientHeight)
      at Microsoft.Xna.Framework.WindowsGameWindow.EndScreenDeviceChange(String screenDeviceName, Int32 clientWidth, Int32 clientHeight)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.ChangeDevice(Boolean forceCreate)
      at Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice()
      at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
      at StardewModdingAPI.Program.StartGame() in D:\source\SMAPI\src\StardewModdingAPI\Program.cs:line 228
      [12:44:16] Game has ended. Press any key to continue...


      both 0.40.1.1 (4th Oct. 2016) and 1.0 beta gave me this error, could you help me?

      Using Laptop with Windows 10 Version v1607.
      I tried to reinstall but the problem persist.
       
      • foghorn

        foghorn Pangalactic Porcupine

      • Thiagoh92

        Thiagoh92 Orbital Explorer

        Pathoschild likes this.
      • diminee

        diminee Space Spelunker

        i have another problem.

        i have advanced location loader installed, in my mods folder, with location mods inside of it, but they won't load. i also have the 'Entoarox Framework' in my mods folder. i've also tried putting the extoarox files in both the mods folders and advanced location folders, to no avail.
         

          Attached Files:

        • masquerade908

          masquerade908 Scruffy Nerf-Herder


          [11:19:29] [ERROR] Couldn't load mod for manifest 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\!EntoaroxFramework\manifest.json': an error occurred while loading the target DLL.
          System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
          at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
          at System.Reflection.RuntimeAssembly.get_DefinedTypes()
          at StardewModdingAPI.Program.LoadMods() in D:\source\SMAPI\src\StardewModdingAPI\Program.cs:line 331
          [11:19:29] Advanced Location Loader used Manifest.Authour, which is deprecated since SMAPI 1.0. It will work fine for now, but may be removed in a future version of SMAPI.
          [11:19:29] [ERROR] Couldn't load mod for manifest 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\AdvancedLocationLoader\manifest.json': an error occurred while loading the target DLL.
          System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
          at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
          at System.Reflection.RuntimeAssembly.get_DefinedTypes()
          at StardewModdingAPI.Program.LoadMods() in D:\source\SMAPI\src\StardewModdingAPI\Program.cs:line 331

          Same issue as @diminee here with Entoarox Framework 1.5.0 and ALL 1.1.25. Already asked Ento and he said:
          Not receiving this error with SMAPI 0.40.0 1.1-3.
           

            Attached Files:

            Last edited: Nov 9, 2016
          • Pathoschild

            Pathoschild Tiy's Beard

            Hi @diminee and @masquerade908. Thanks for reporting the issue; I'll look into it and let you know when I've identified the issue. :)
             
            • nirasa1957

              nirasa1957 Subatomic Cosmonaut

              My Stardew Valley with SMAPI 1.0 beta don't run. Currently I have no mod. I open terminal and run manually file StardewValley.bin.x86_64 = it's OK. It's run. But without mods. If I run manually StardewModdingAPI.bin.x86_64 on terminal It reports that the file was not found.

              My configuration:
              OS: LinuxMint 18,
              Steam = Stardew Valley, beta

              Sorry for my english :-(
               
              • Pathoschild

                Pathoschild Tiy's Beard

                Hello @nirasa1957. Does it work if you open a terminal and run the StardewValley (no extension) file?
                 
                • nirasa1957

                  nirasa1957 Subatomic Cosmonaut

                  Hello Pathoschild
                  Yes - it's work
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    @nirasa1957: excellent. If you launch the game through Steam, does it load with mods too?
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                    • Davrial

                      Davrial Big Damn Hero

                      Wait. I've not been keeping up too much. @Pathoschild , when did you take over SMAPI development? Is @ClxS still working on FarmHand, or is that dead?
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        @Davrial: I'm maintaining SMAPI until Farmhand is ready, while @ClxS is focused on Farmhand.
                         
                          Ladysarajane and Davrial like this.
                        • Davrial

                          Davrial Big Damn Hero

                          Oh ok then, that makes sense. What's with the jump from version 0.40.1.1 all the way up to version 1.0, though? Awfully big numerical increase for a single update.
                           
                          • Pathoschild

                            Pathoschild Tiy's Beard

                            SMAPI uses semantic versioning, which formalises how the version numbers change. In particular, versions 0.x are development versions whose interfaces may change at any time. SMAPI 1.0 is the first stable version whose interfaces are guaranteed not to break without advance warning via deprecation.

                            Edit: it's also a big release. 27% of all SMAPI commits are for this version. :)
                             
                              Last edited: Nov 9, 2016
                              Davrial likes this.
                            • nirasa1957

                              nirasa1957 Subatomic Cosmonaut

                              @Pathoschild If it is installed SMAPI 1.0 beta, the game via Steam can not run. I launch the game through a terminal = I run manually file StardewValley.bin.86_64 = It's works, but without any mods. But I run manually file StardewModdingAPI.bin.x86_64 = It doesn't work.

                              My os = LinuxMint 18
                               
                              • Pathoschild

                                Pathoschild Tiy's Beard

                                @nirasa1957: I don't play through Steam, so I'll need your help to find the problem. :)
                                • When you run the game through Steam, does something appear on the screen or does nothing at all happen? If something appears, please send me a screenshot.
                                • Before you installed SMAPI, were you able to launch the game through Steam?
                                Next I'll need you to perform a test:
                                1. Go to this directory: ~/.config/StardewValley/ErrorLogs. (The .config/ directory is hidden by default; you can use Go » Go to Folder to go there.)
                                2. Delete all the files in that directory.
                                3. Try to launch the game through Steam. Don't do anything else with the game.
                                4. Did any files appear in the above directory? Please attach any files that appeared to your reply.
                                Thanks for your patience!
                                 
                                • nirasa1957

                                  nirasa1957 Subatomic Cosmonaut

                                  Screenshot is very hard, It takes just a mini second. Please look at the short video:
                                  https://dl.dropboxusercontent.com/u/528360/sv-chyba.mp4
                                  I launch the game through Steam before I installed SMAPI = yes.
                                  1. OK = I did it.
                                  2. OK = I did it.
                                  3. Look the video. It doesn't work.
                                  4. OK:
                                  MODDED_ErrorLog.Log_636143619774627550.txt:
                                  System.NullReferenceException: Object reference not set to an instance of an object
                                  at StardewModdingAPI.Command.CallCommand (System.String input) <0x4118e2f0 + 0x0003a> in <filename unknown>:0
                                  at StardewModdingAPI.Program.ConsoleInputLoop () <0x4118d670 + 0x00017> in <filename unknown>:0
                                  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x410a9d90 + 0x0008a> in <filename unknown>:0
                                  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x410a7950 + 0x001f5> in <filename unknown>:0
                                  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x410a7400 + 0x00023> in <filename unknown>:0
                                  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x410a7340 + 0x0005b> in <filename unknown>:0
                                  at System.Threading.ThreadHelper.ThreadStart () <0x410a7200 + 0x0002f> in <filename unknown>:0
                                  MODDED_ProgramLog.Log_LATEST.txt:
                                  [09:06:17] Launching SMAPI 1.0-beta with Stardew Valley 1.11 on Unix 4.4.0.21
                                  [09:06:17] Initialising...
                                  [09:06:17] Preparing game...
                                  [09:06:17] Patching game...
                                  [09:06:17] Loading mods...
                                  [09:06:17] Loaded mod: Trainer Mod by Zoryn, v0.0 | Registers several commands to use. Most commands are trainer-like in that they offer forms of cheating.
                                  [09:06:17] Loaded 1 mods.
                                  [09:06:17] Tweaking game...
                                  [09:06:17] Trainer Mod used an old version of Mod.Entry, which is deprecated since SMAPI 1.0. It will work fine for now, but may be removed in a future version of SMAPI.
                                  [09:06:17] Starting Stardew Valley...
                                  [09:06:17] Starting console...
                                  [09:06:17] Type 'help' for help, or 'help <cmd>' for a command's usage
                                  Sorry for my english :(
                                   
                                  • Pathoschild

                                    Pathoschild Tiy's Beard

                                    @nirasa1957: please try the attached version, which has a possible fix.

                                    If that doesn't work, please repeat the test with that version:
                                    [Edit: attachment removed; see latest download.]
                                     
                                      Last edited: Nov 10, 2016
                                    Thread Status:
                                    Not open for further replies.

                                    Share This Page