Tool SMAPI: Stardew Modding API

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

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

    Entoarox Oxygen Tank

    ... You do know that FarmHand is setup for 1.07 and not 1.1... It is how everything got prototyped in the first place.
    The sheer changes in 1.1 would require a big change to FarmHand anyhow, since a whole new multiplayer layer would have to be added to it, not even counting how many changes the switch to monogame might end up requiring.

    Edit: And just in case you wanna continue your "modders can compile it" argument, why would anyone bother to write code for FarmHand 1.07 if there isnt going to BE a FarmHand 1.07, since 1.1 is going to require rewriting everything to mono and multiplayer compatible code anyhow, why bother?
     
    • foghorn

      foghorn Pangalactic Porcupine

      Yes, of course.

      That's pretty much what I was saying.

      It's all null & void if Farmhand is released before 1.1, obviously.
       
      • Davrial

        Davrial Big Damn Hero

        That's the point though. For some reason you keep assuming CxlS is going to wait until 1.1 to release FarmHand, when there is no reason for you to be assuming so. He has never made any indication of waiting for 1.1. To assume that he would wait for an indeterminate point in the future to release something that is nearing completion is foolhardy. That's what I was trying to tell you.
         
        • ClxS

          ClxS Pangalactic Porcupine

          Yeah to clear something up about that: My slowness in doing any work on FH isn't due to me waiting for 1.1, but just due to being busy. That said, it's a good point. If a lot changes in 1.1, stuff like the GRM mechanism would still work but any mods using that would have to update if methods rely on change, and the entire API layer would need to be re-done if they decided to cleanup how it works.

          Sooooo, I'm tempted to build some versions for beta testing so modders can have a look and give any feedback/make changes, but hold off on a public release until then.
           
          • Entoarox

            Entoarox Oxygen Tank

            Everything is going to need a redo for 1.1 anyway, what with the whole multiplayer system and localisation, not to mention the move to monogame instead of using xna.
             
            • Davrial

              Davrial Big Damn Hero

              That's an understandable thought process, but we have no idea when 1.1 would be out, so postponing release may just needlessly keep FarmHand out of the public's hands for an unnecessarily long period of time. A warning with release that it will entirely break when 1.1 hits would not be amiss, but postponing release until then just seems like a waste of time.

              It's switching away from XNA? Why is that? Also, what is monogame? I have never heard of that before.
               
              • Entoarox

                Entoarox Oxygen Tank

                monogame is a open-source version of xna, but where microsoft dropped support for xna, monogame is still being developed.
                The xna framework is windows-only, so the mac and linux version are already using monogame.
                 
                • Davrial

                  Davrial Big Damn Hero

                  Huh. I knew Mac and Linux werent using XNA because it was Windows only, but I didnt know that Microsoft had dropped support for XNA. What kind of impact will the change over make, considering monogame is based on xna?
                   
                  • Entoarox

                    Entoarox Oxygen Tank

                    depends on if CA and CF are planning to keep the basics the same or not really..
                     
                    • ClxS

                      ClxS Pangalactic Porcupine

                      Microsoft stopped developing XNA in 2013. Monogame is largely the same as XNA, it even keeps a huge amount of the class names/interfaces the same so hopefully there wont be much of a difference there. The real issue comes from whether CF decides to clean-up bits of the code.
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        And we have to keep in mind that 1.1 is going to have multiplayer, so even if the code isnt cleaned up, it will be different simply because of all the multiplayer coding threaded through it.
                         
                        • Davrial

                          Davrial Big Damn Hero

                          Unless the multiplayer coding is tacked onto the end and just hooked in. Then you'd only need to account for the hook.
                          If im remembering right anyway.
                          (I know the gist and some basics of coding, but just enough to never be certain if i'm remembering something quite right or not =P )
                           
                          • Entoarox

                            Entoarox Oxygen Tank

                            Yeah, its not tacked on, stardew's code is far to convoluted to be able to just tack it on, it has to be weaved into it in quite a few places to keep things working properly. There is a good reason the multiplayer mod comes with a big "Expect it to break" warning, it is incredibly difficult to manage every change that can happen in the game >_<
                             
                            • Davrial

                              Davrial Big Damn Hero

                              That's what I was figuring but I didnt know exactly to what extent the multiplayer is actually going to function, so I wasnt certain to what extent it would impact the code, or if it COULD just be hooked in.
                              Also I am not surprised in the slightest that the code is convoluted. That's how it goes with indy games, one-man-team indies even more so.
                               
                              • Entoarox

                                Entoarox Oxygen Tank

                                Please ask that in the cheat menu topic, asking it here means the people most likely able to help aren't going to see it.
                                 
                                • Entoarox

                                  Entoarox Oxygen Tank

                                  The menu is NOT a simple front end.... and the fact that CJB's menu greys out the speed option makes it clear there is a REASON he does so, thus, asking in his topic about it is the way to go.
                                   
                                  • P3P3

                                    P3P3 Intergalactic Tourist

                                    I ran into a problem. Whenever I run SMAPI, right before launching the game, it crashes. It used to be something related to mouse control, I remember it ended in Can't initialise MouseX. Anyways I managed to turn that into what the attached file shows.
                                    Tried an older version, 3.6 I believe and it was solved but I couldn't load mods as they needed atleast 3.9 (which doesn't work either)
                                    If it makes a difference, I'm using the GOG version and I'd really like playing around with mods! Thanks a bunch in advance.
                                     

                                      Attached Files:

                                    • Entoarox

                                      Entoarox Oxygen Tank

                                      Update stardew valley.
                                       
                                      • mechthrasher

                                        mechthrasher Space Hobo

                                        For some reason the SMAPI cmd won't actually finish running. I thought it might be the XNA framework on my machine was broken or out of date. Not the case as when I had repaired the framework twice and fully uninstalled and reinstalled the SMAPI still wouldn't function. Log from the CMD prompt here.
                                        C:\Users\xxxx\AppData\Roaming\StardewValley\ErrorLogs\MODDED_ProgramLog.
                                        Log_LATEST.txt
                                        Created log instance
                                        [05:30:59.898 PM] SDV Version: 1.0
                                        [05:30:59.899 PM] Initializing SDV Assembly...
                                        [05:30:59.899 PM] Validating api paths...
                                        [05:30:59.898 PM] Injecting New SDV Version...
                                        [05:30:59.899 PM] Starting SDV...
                                        [05:30:59.899 PM] SMAPI Version: 0.40.0 Alpha
                                        [05:30:59.981 PM] Patching SDV Graphics Profile...
                                        [05:30:59.983 PM] LOADING MODS
                                        [05:30:59.983 PM] Found Manifest: C:\GOG Games\Stardew Valley\Mods\StardewValley
                                        MP\manifest.json
                                        [05:31:00.269 PM] Created psconfigs directory @C:\GOG Games\Stardew Valley\Mods\
                                        StardewValleyMP\psconfigs
                                        [05:31:00.272 PM] Loading Mod DLL...
                                        [05:31:00.273 PM] LOADED MOD: Makeshift Multiplayer by spacechase0 - Version Sta
                                        rdewModdingAPI.Version | Description: Multiplayer test (@ C:\GOG Games\Stardew V
                                        alley\Mods\StardewValleyMP\StardewValleyMP.dll)
                                        [05:31:00.275 PM] LOADED 1 MODS
                                        [05:31:00.276 PM] Initializing Console Input Thread...
                                        [05:31:00.277 PM] Registered command: help
                                        [05:31:00.276 PM] SDV Loaded Into Memory
                                        [05:31:00.277 PM] Applying Final SDV Tweaks...
                                        [05:31:00.421 PM] XNA Initialize
                                        [05:31:01.221 PM] XNA LoadContent
                                        [05:31:01.654 PM] Initializing Debug Assets...
                                        [05:31:01.659 PM] Game failed to start: System.MissingFieldException: Field not
                                        found: 'StardewValley.Game1.thumbstickMotionMargin'.
                                        at StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime)
                                        at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
                                        at Microsoft.Xna.Framework.Game.Run()
                                        at StardewModdingAPI.Program.RunGame()
                                        System.ComponentModel.InvalidAsynchronousStateException: An error occurred invok
                                        ing the method. The destination thread no longer exists.
                                        at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle)
                                        at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate meth
                                        od, Object[] args, Boolean synchronous)
                                        at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
                                        at System.Windows.Forms.Control.Invoke(Delegate method)
                                        at StardewModdingAPI.Program.StardewInvoke(Action a)
                                        at StardewModdingAPI.Program.ConfigureSDV()
                                        at StardewModdingAPI.Program.Main(String[] args)
                                        [05:31:02.283 PM] Critical error: System.ComponentModel.InvalidAsynchronousState
                                        Exception: An error occurred invoking the method. The destination thread no lon
                                        ger exists.
                                        at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle)
                                        at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate meth
                                        od, Object[] args, Boolean synchronous)
                                        at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
                                        at System.Windows.Forms.Control.Invoke(Delegate method)
                                        at StardewModdingAPI.Program.StardewInvoke(Action a)
                                        at StardewModdingAPI.Program.ConfigureSDV()
                                        at StardewModdingAPI.Program.Main(String[] args)
                                        [05:31:02.283 PM] The API will now terminate. Press any key to continue...
                                         
                                          weldsk likes this.
                                        • LakhesisGames

                                          LakhesisGames Space Hobo

                                          Edited AGAIN. Nevermind. I'm a bonehead. I tell my kids all the time to restart the computer before thinking something is broken. Apparently, I need to take my own advice :)
                                           
                                            Last edited: Sep 25, 2016
                                          Thread Status:
                                          Not open for further replies.

                                          Share This Page