Tool SMAPI: Stardew Modding API

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

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

    Allayna Ketchup Robot

    Okay, so my "ladder" tilesheet is the issue... Do I need to name the png file 'ladder-object' or have the id of tilesheet in the tbin file x-ladder-object?
     
      Last edited: Jul 19, 2018
    • Pathoschild

      Pathoschild Tiy's Beard

      @Allayna It's only needed in the filename, not the tilesheet ID.
       
      • Allayna

        Allayna Ketchup Robot

        I have tried having the file named "ladderobject" and "ladder_object" and I'm still getting the same error
        Here's the current test mod

        Backwoods, Desert, Farm, Farm_combat, Forest, Forest-alt, Mountain, Railroad, Railroad-alt, and Town are the maps with the problem tilesheet.
         

          Attached Files:

        • Pathoschild

          Pathoschild Tiy's Beard

          @Allayna Can you try the attached version? I added explicit loads for the custom tilesheet, which is needed in Stardew Valley 1.2. (Also, feel free to ask in #modding on the Stardew Valley Discord where you can get quicker help from other modders.)
           

            Attached Files:

          • Allayna

            Allayna Ketchup Robot

            That version works! was the explicit load all you changed, or did i miss something else?
             
            • Pathoschild

              Pathoschild Tiy's Beard

              Yep, that was the only change. Content Patcher works around some limitations in Stardew Valley 1.2 by preloading PNGs, but it only does that for files it knows about via content.json. That's not needed with Stardew Valley 1.3 and SMAPI 2.6, which include many changes to make map modding much easier.
               
                Allayna likes this.
              • ghouly

                ghouly Tentacle Wrangler

                How can I make the following safe to execute
                Code:
                location.map = map;
                
                when I'm on the map in question? I know about ContentHelper and all but I'm trying to brute-force it.

                Even if I dodge the draw loop with a pre-render event I still get a load of
                Code:
                [23:13:22 ERROR SMAPI] An error occured in the overridden draw loop: System.Collections.Generic.KeyNotFoundException: A chave fornecida não estava presente no dicionário.
                   em System.Collections.Generic.Dictionary`2.get_Item(TKey key)
                   em xTile.Display.XnaDisplayDevice.DrawTile(Tile tile, Location location, Single layerDepth) na C:\Users\Barone_\Documents\Visual Studio 2010\Projects\tide-83511\TileMapEditor\xTile\Display\XnaDisplayDevice.cs:linha 156
                   em xTile.Layers.Layer.DrawNormal(IDisplayDevice displayDevice, Rectangle mapViewport, Location displayOffset, Int32 pixelZoom) na C:\Users\Barone_\Documents\Visual Studio 2010\Projects\tide-83511\TileMapEditor\xTile\Layers\Layer.cs:linha 445
                   em xTile.Layers.Layer.Draw(IDisplayDevice displayDevice, Rectangle mapViewport, Location displayOffset, Boolean wrapAround, Int32 pixelZoom) na C:\Users\Barone_\Documents\Visual Studio 2010\Projects\tide-83511\TileMapEditor\xTile\Layers\Layer.cs:linha 238
                   em StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime) na C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:linha 974
                   em StardewModdingAPI.Framework.SGame.Draw(GameTime gameTime) na C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:linha 723
                [23:13:22 TRACE SMAPI] Recovering sprite batch from error...
                
                which tells me I'm not disposing of some resources, but I'm not sure what or where.
                 
                • Pathoschild

                  Pathoschild Tiy's Beard

                  @ghouly I don't think anyone has tried replacing the map while the player is still on it before, and map modding isn't my forte. Let us know if you figure out how to do it though. :)
                   
                  • Agent2P

                    Agent2P Void-Bound Voyager

                    I'm playing the beta and my game has crashed multiple times, I think because it's leading up to my wedding event with Sam. Here's my crash log, if anyone could take a look at it that would be amazing.
                     

                      Attached Files:

                      Last edited: Jul 22, 2018
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      @Agent2P Can you remove Farmhouse Basement Mod and see if it still happens?
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        @Agent2P Can you also post a zip of your full Mods folder? I want to look into why that happens.
                         
                        • Stryder87

                          Stryder87 Giant Laser Beams

                          So I seem to have an odd SMAPI issue that's popped up for some reason in the last couple of days. The game freezes for 3-4 seconds every few minutes (maybe every 5 minutes).
                          I'm not running the SDV Beta, so it's still SMAPI version 2.5.5, on SDV v.1.2.33.
                          I checked the SMAPI dialogue box and this is what I see over and over:
                          SMAPI Error.jpg

                          All the mods are the same as I had before this started to happen, the latest up to the Beta release. I haven't installed any mod update for SDV v1.3, so they should all be working properly.
                          There's no action in the game that routinely triggers it, it just happens.
                           
                          • Pathoschild

                            Pathoschild Tiy's Beard

                          • Agent2P

                            Agent2P Void-Bound Voyager

                            I removed the Farmhouse Basement Mod and played two days, and then it let the marriage happen on the 8th (the Ice Fishing Festival day). Thank you! I had a suspicion it was that mod but forgot it was a CP mod and not an overwritten xnb like my shed and greenhouse. Guessing you don't need the mods folder anymore?

                            Edit: Also I tried putting the Farmhouse Basement file back in after the wedding day ended just to see if it would work after the fact and the game wouldn't load. Things to know! I guess that's what happens when you try to use an outdated mod.
                             
                              Last edited: Jul 22, 2018
                            • Pathoschild

                              Pathoschild Tiy's Beard

                              @Agent2P In theory that mod should still work, so I'd still like know why it's failing. Can you send me your full Mods folder (including that mod), and a zip of the affected save files?

                              (If the file is too big to attach here, you can upload it to a site like mixtape.moe and post the link here instead.)
                               
                              • Stryder87

                                Stryder87 Giant Laser Beams

                                Here's the link to the log: https://log.smapi.io/phSZqfJK
                                A different issue popped up today as well. When you look at the log and see the huge row of Debug Autogate, the SMAPI command box would usually pop up in front of the game while playing. I'd just have to click back in the game to continue.

                                Hope it helps.
                                 
                                • macaro0n

                                  macaro0n Void-Bound Voyager

                                  Please help, I earned 2 achievements in-game but they dont pop up on Steam. It worked at first until like four to five days ago. Im always using %command% and run the game from my Steam library instead of just short cut.
                                  if thats the case I wont be getting achievements anymore!

                                  if you can I would like to get my achievements I've already earned in-game on Steam not just solving for the future achievements, thanks in advance! :[

                                  Update :

                                  I tried to play it on different game, the achievement still wont pop up.
                                  I hope it'll be fixed so I can stop worrying about future's achievements...
                                  Update #2 :
                                  I tried this but Steam achievements still dont pop up.. argh! x[
                                  Update #3 :
                                  I had this problem before when SMAPI on Steam and Steam Overlay didnt work,
                                  I've fixed my Steam Overlay but now the achievements arent syncing.
                                  Update #4 :
                                  I ran my game from StardewModdingAPI.exe instead of Steam library, the achievements has popped up.
                                  But I cant use Steam Overlay aka I cant take Screenshot while I play.

                                  TL;DR
                                  Its either Achievements wont sync or I cant use Steam Overlay

                                  I do still wish this game will run smoothly as it suppose to do.

                                  Error Log : https://log.smapi.io/naLhxuyS
                                   
                                    Last edited: Jul 24, 2018
                                  • Pathoschild

                                    Pathoschild Tiy's Beard

                                    @Stryder87 Does it still happen if you temporarily remove all mods?

                                    @macaro0n Can you copy your Steam launch options and paste them here? Do the achievements trigger if you run Stardew Valley.exe directly?
                                     
                                    • macaro0n

                                      macaro0n Void-Bound Voyager

                                      @Pathoschild

                                      Thanks for your reply,
                                      My launch option is :
                                      "D : \SteamLibrary\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command%

                                      It is exactly whats on SMAPI's website

                                      And yes, first time I played without SMAPI the achievement did trigger and showed up on Steam; not just in-game just like now.
                                       
                                      • Stryder87

                                        Stryder87 Giant Laser Beams

                                        So I did some testing. When I take out all mods (leaving in the ConsoleCommands folder as I thought it was part of SMAPI), I would get the following when the game screen would come up:
                                        SMAPI PopUp 01.jpg
                                        I went through the day and the console only popped up over the game once. I quit the game, added MoodGuard, and it did the same thing:
                                        SMAPI PopUp 02.jpg
                                        I then put in a couple more mods (Automate & AutoGate). The console screen, again, popped up over the initial game screen when I started the game:
                                        SMAPI PopUp 03.jpg
                                        After a few minutes (hours in-game), the screen popped up over the game again with the usual AutoGate lines:
                                        Autogate 01.jpg
                                        It looks like it's just my 6 gates polling for activity over and over.
                                        However, after a few more in-game hours, Autogate did a bad:
                                        Autogate 02.jpg
                                        It looks like Autogate is an issue. Here's a link to the last log file: https://log.smapi.io/zv5T8dCN.

                                        I'm not going to spend a lot more time on this as I've been informed that the new 'Beta' is going to be released soon (Aug 1st?) as the official update, so that will force an update of SMAPI and all my mods. All these issues may just disappear, and new ones may arise. I know MoodGuard will no longer be needed, and it had shown up on the last log file a number of times, so maybe that will also help.

                                        I don't know if you want to spend much time on this either since the new patch will be going live soon, but this is what I came up with. It might be helpful for others who may hold off on updating.
                                         
                                        Thread Status:
                                        Not open for further replies.

                                        Share This Page