Tool Stardew Modding API

Discussion in 'Mods' started by Zoryn4163, Feb 28, 2016.

  1. Zoryn4163

    Zoryn4163 Big Damn Hero

    Accepted
    Edit: I don't actually know how to merge pulls on github, so I just moved the calls in my code since it was easy.

    It is an exe that is ran instead of stardew. It will load all DLLs in the mods folder, but those DLLs must be created with a reference to the API in Visual Studios as a Class Library Project. I don't bother with XNBs. I hate XNBs.
     
      Last edited: Mar 1, 2016
    • Thank You Bomb

      Thank You Bomb Void-Bound Voyager

      Great! thank you very much!
       
      • WatcherCCG

        WatcherCCG Giant Laser Beams

        Does running the game with the API instead of the normal EXE screw with things like Steam achievements or the overlay?
         
        • Zoryn4163

          Zoryn4163 Big Damn Hero

          No problem!

          AFAIK you can't run the game with the steam overlay, or even in steam mode. The game will run as if it's the gog version I believe, but you are more than welcome to try and get steam to work with it.
          Support for steam will probably be added at a later time.
           
          • IcyPhoenix

            IcyPhoenix Subatomic Cosmonaut

            if you use an injector method you could do this.
             
            • Handsome Matt

              Handsome Matt Aquatic Astronaut

              it's a flaw with the game not using steamworks correctly, if you run the game exe without Steam it'll fail to load steamworks correctly too - if ConcernedApe fixes it it'll fix for this too. I might look at what the exact problem is and try to patch it if possible.

              That was easy, the game is missing steam_appid.txt with the contents 413150 if you put that in the same directory as Stardew Valley.exe Steam will work. Will ping ConcernedApe on twitter to ship this file with the game. (But like I said, you can manually create the file and steam will work with the game just fine then :))
               
                Last edited: Mar 1, 2016
              • WatcherCCG

                WatcherCCG Giant Laser Beams

                Well, that's just another reason to create a standalone trainer once the API is mostly complete. It would save you the trouble of trying to trick Steam.
                 
                • Zoryn4163

                  Zoryn4163 Big Damn Hero

                  SMAPI literally runs the Game1 class from the SDV exe.

                  I don't think that having the trainer features standalone would make a difference. The trainer features use the API to register commands. The API is always listening for user input, and it needs to run in order to load mods into memory.
                   
                  • Handsome Matt

                    Handsome Matt Aquatic Astronaut

                    Seems we got a modding section, awesome. I made another pull request to include steam_appid.txt with builds so Steam will work. And another that fixes remote sources stuff. I also think we should move away from including the trainer in the API as quickly as possible and make it it's own mod to avoid some spaghetti code.
                     
                      Last edited: Mar 1, 2016
                    • Zoryn4163

                      Zoryn4163 Big Damn Hero

                      Okay I'll take a look when I get home. I'll export the trainer code as a dll and just include it in the release as an example mod I guess?
                       
                      • Handsome Matt

                        Handsome Matt Aquatic Astronaut

                        Sounds good.
                         
                        • XNivekkX

                          XNivekkX Space Hobo

                          So I've placed some mods and put in the moddingAPI at the right place but i'm getting this error i've checked a multiple places to see where i could fix this but i have no idea at all on how to fix this. I haven't seen a post either about a problem like this (i might have read over it if there was a post about it :L)
                          [​IMG]
                          This is kinda complex for me to understand what to do to fix it. Thanks in advance
                           
                          • Handsome Matt

                            Handsome Matt Aquatic Astronaut

                            You need to unblock the file, right click the DLL -> Properties -> Unblock - this will be fixed in the next version of SMAPI, but for now this fixes it.
                             
                            • eefge

                              eefge Pangalactic Porcupine

                              i just started this exe en in load game says no save games found

                              but in the normal stardew valley exe my saves are there
                               
                              • XNivekkX

                                XNivekkX Space Hobo

                                Oh dang that simple. Thanks alot Matt
                                 
                                • eefge

                                  eefge Pangalactic Porcupine

                                  how does this work?? can anyone tell me
                                   
                                  • Alkarl

                                    Alkarl Void-Bound Voyager

                                    Don't know if you're aware of this or not, SMAPI is crashing when I mouse over an iridium band/glow ring that I added using player_additem. Can you think of a reason this would be happening?
                                     
                                    • emirinsama

                                      emirinsama Scruffy Nerf-Herder

                                      So when I start up SMAPI I get this message:
                                      [​IMG]

                                      What am I doing wrong? D: (sorry, I'm dumb) Where exactly are all the files supposed to go?
                                       
                                      • cantorsdust

                                        cantorsdust Existential Complex

                                        Brought this up to Zoryn on IRC, turns out it's due to it being a ring and not a regular item. The game can't find its graphics, despite rings and other items sharing the same spritesheet.

                                        (6:47:30 PM) Zoryn: yes, the error doesn't occur with the spritesheet it seems - it's from the index (ie the spritesheet index doesn't match the content descritpion index)
                                        (6:48:09 PM) Zoryn: i have to implement a addring method
                                        (6:48:15 PM) Zoryn: ring is a different class >.>

                                        Issue is on github now, thanks.
                                         
                                        • Alkarl

                                          Alkarl Void-Bound Voyager

                                          Cool, thanks for the heads up.

                                          Also like emirinsama I'm also getting the same issue with the 0.31 release.
                                           

                                          Share This Page