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

    Hi @chaosye. That error can be caused by...
    • using a mod like Get Dressed that adds new character customisation options, then removing it;
    • corrupt save data;
    • an outdated XNB mod or corrupt XNB file.
    It shouldn't be hard to fix, but it'll be difficult to troubleshoot over the forums. Can you come chat on Discord, and we'll walk you through fixing it?
     
    • chaosye

      chaosye Big Damn Hero


      okļ¼Œbut the problem is i'm outside now,and it will take about ten days...so...
       
      • Vixenese

        Vixenese Void-Bound Voyager

        Is this compatible with other mods?
         
        • Pathoschild

          Pathoschild Tiy's Beard

          Yep! SMAPI is required to run many mods, and you can use it alongside XNB mods just fine. See the modding introduction page for more info.
           
          • GoldenWulwa

            GoldenWulwa Space Hobo

            I've installed it per the instructions but can't run the game through the mod's .exe

            I'm normally not this dumb and can figure it out. But I have no idea what I'm doing wrong

            [​IMG]
             
            • Pathoschild

              Pathoschild Tiy's Beard

            • GoldenWulwa

              GoldenWulwa Space Hobo

            • Pathoschild

              Pathoschild Tiy's Beard

              Note: the current SMAPI beta should work fine with Stardew Valley 1.2.11 beta, no update needed.
               
              • Mupfelpuh

                Mupfelpuh Orbital Explorer

                Good morning,
                I just wanted to set the stamina back to 270, when the game suddenly quittet and smapi had an error. Maybe you could help me please.
                 

                  Attached Files:

                • Pathoschild

                  Pathoschild Tiy's Beard

                  @Mupfelpuh: That's already fixed in the next SMAPI release, sorry about that. :)
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    Note: SMAPI 1.9-beta.10 should work fine with the latest Stardew Valley 1.2.11 beta.
                     
                    • sallychan

                      sallychan Space Penguin Leader

                      Hi there! I've been Googling around, but I can't seem to find anything specific to what I'm trying to do

                      I saw that one can mod the NPC spawn coordinates with SMAPI, but I have no idea where to even start with that.
                      (That being, where they spawn at the beginning of each day is hardcoded.)
                      There's no walk-through I can find, but is there a certain code/string/something I should be looking to edit?

                      Help would be greatly appreciated!
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        @sallychan: Their initial spawn positions are hardcoded, but you can try moving them in SMAPI code:
                        Code:
                        // find Abigail
                        NPC abigail = Game1.locations.SelectMany(p => p.characters).First(p => p.name == "Abigail");
                        
                        // move her to the farm
                        abigail.currentLocation.characters.Remove(abigail);
                        Game1.getFarm().characters.Add(abigail);
                        abigail.setTilePosition(50, 17);
                        
                        I haven't tested it, so I'm not sure how the game handles the NPC being in an unexpected position. The NPC schedules (in Content\Characters\schedules) may also be relevant.
                         
                        • sallychan

                          sallychan Space Penguin Leader

                          Thank you so much!! This is a start, at least.

                          I'm sorry I'm such a newbie with this stuff--the "// find Abigail" is a description in the code, correct? Not a command?
                          And what would the code be to change her spawn to a different building? Or, I suppose... is there some kind of list of the buildings to reference from?
                          I have a new map I've made that I want to add her too, but I could figure it out from that...

                          And this method would work as a downloadable mod too? I've seen someone say you can edit your own gamefile to do this, but I'd want to include this in a mod. :)

                          Thanks again!
                           
                          • Pathoschild

                            Pathoschild Tiy's Beard

                            @sallychan: SMAPI mods are written in C# (which looks like that example); see creating a SMAPI mod for more information. If you haven't programmed before, there can be a steep learning curve but the modding Discord channel has a friendly community who can help answer your questions. :)
                             
                              sallychan likes this.
                            • sallychan

                              sallychan Space Penguin Leader

                              I've been reading over some of the walk-throughs, and I think I'm starting to get it! Thank you, I'll save that Discord in case I really need help :DD
                               
                              • Pathoschild

                                Pathoschild Tiy's Beard

                                SMAPI 1.9-beta.11 is now available for Linux, Mac, and Windows! (See attached.)

                                Release highlights:
                                • For players:
                                  • Updated for full compatibility with Stardew Valley 1.2.13.
                                  • Improved the TrainerMod's command handling & feedback.
                                  • Fixed the TrainerMod player_setstamina and world_downminelevel commands.
                                  • Fixed errors in custom console commands causing the game to crash.
                                • For modders:
                                  • Added a first prototype of the content events that will be part of SMAPI 2.0. This is only provided for feedback and testing only; it's marked experimental and may change at any time, so it shouldn't be used in released mods.
                                  • The SMAPI log now shows the friendly OS name on Windows instead of the internal version when possible.
                                  • Deprecated IConfigFile.
                                Caveats:
                                • This is for Stardew Valley 1.2.13+ beta only; it won't work with earlier versions.
                                • Some mods will still need an update, though SMAPI will automatically fix many of them.
                                This is a release candidate. If you see errors (not counting "Skipped <mod name> because it isn't compatible with the latest version of the game" errors), post your error log! :)

                                [Edit: download removed; see the latest version instead.]
                                 
                                  Last edited: Mar 4, 2017
                                • nirasa1957

                                  nirasa1957 Subatomic Cosmonaut

                                  LinuxMint 18
                                  Stardew Valley 1.2.13 beta via Steam
                                  SMAPI 1.9-beta.11
                                  Stardew Valley doesn't start (via Steam and via terminal). Error log isn't created.
                                   
                                  • ragnax

                                    ragnax Scruffy Nerf-Herder

                                    @Pathoschild could you left the old versions of de SMAPI? That's very useful as some cheats work with the old versions.
                                     
                                    • Pathoschild

                                      Pathoschild Tiy's Beard

                                      @nirasa1957: Can you try running ./StardewValley from a terminal, and show a screenshot of the result?

                                      @ragnax: All the official SMAPI releases are available on the download page, and each release mentions which Stardew Valley version it works with. Beta releases are temporary builds, so those aren't kept.
                                       
                                        ragnax and springacres like this.
                                      Thread Status:
                                      Not open for further replies.

                                      Share This Page