Tool Stardew Modding API

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

  1. Zoryn4163

    Zoryn4163 Big Damn Hero

    I haven't gotten very far in the game, I don't actually know what that means lol.

    If I simply hid the method, when the game called <FarmerObject>.getMovementSpeed() it would return Farmer.getMovementSpeed() instead of CustomFarmer.getMovementSpeed()
     
    • animandan

      animandan Void-Bound Voyager

      Oh man, that's amazing. And I see you got that item to be place-able. Looks like custom furniture/decoration is already a possibility.

      What happens if you save and reload that game? Do you need to load in the mod again or should it be retained? Why happens if you remove images etc. from the folder after it's already in the game?
       
      • Zoryn4163

        Zoryn4163 Big Damn Hero

        I've yet to save any data with modded information. If it somehow breaks I'll rewrite how saving is done. Textures are loaded however the mod authour pleases. If they do it correctly, the worst that can happen is the texture will be invisible. If they don't do it correctly, it will throw an error (that should be caught on ModLoad, otherwise the game will crash) and you will need to correct it in order to use the mod properly. Do not that textures are currently downscaled to fit the 64x64 square in the inventory. This scaling will differ for environmental objects. I haven't actually gotten anything to be placed in the world yet, the game simply crashes, but it is being worked on.
         
        • animandan

          animandan Void-Bound Voyager

          Oh, it looked like something had been placed in one of your screenshots but I was mistaken.
           
          • Handsome Matt

            Handsome Matt Aquatic Astronaut

            [​IMG]

            neat, that was painless to setup, any preferred way of distributing mods yet?
             
              cantorsdust likes this.
            • Xren

              Xren Pangalactic Porcupine

              care to share the junimo deposit everywhere?
               
              • Zoryn4163

                Zoryn4163 Big Damn Hero

                Nope, but I figured out why it's crashing and I'm working on it now.

                Wow nice job. No, I have no preferred method of mod distribution. It seems that it didn't spout out that it found your DLL though in the hideous green text so I have to go look at that again.
                I guess you could upload it to dropbox or something. Possibly make your own thread to just list it and say it requires SMAPI? This thread is not designed as a hub for all mods to show up at.
                 
                • cantorsdust

                  cantorsdust Existential Complex

                • animandan

                  animandan Void-Bound Voyager

                  We should probably see if a moderator can set up a modding section before too long so we don't crowd the other areas with mod stuff.
                   
                  • Zoryn4163

                    Zoryn4163 Big Damn Hero

                    I agree, it would be wonderful to have a section dedicated to modding.
                     
                    • MSigma

                      MSigma Void-Bound Voyager

                      Oh, I tried the example fishing mod by the way, and apparently it only works the first time you fish if I'm not mistaken. It's very strange. I have no idea what the cause could be.

                      EDIT: Scratch that, it seems to have something to do with the motionType of the fish, I think.
                       
                      • Handsome Matt

                        Handsome Matt Aquatic Astronaut

                        plan to, just need to fix it not working on bundle change then I'll make a thread or something.
                         
                          Xren likes this.
                        • Handsome Matt

                          Handsome Matt Aquatic Astronaut

                          thanks, the api is painless to use, I like it a lot. OH and the DLL being in bright green is fine, my DLL was named LessFishingLoss.dll because I was too lazy to change the output name.
                           
                            Last edited: Mar 1, 2016
                          • animandan

                            animandan Void-Bound Voyager

                          • Zoryn4163

                            Zoryn4163 Big Damn Hero

                            I thought it did as well, but I wasn't sure. I can take a look at it again tomorrow, right now I really wanna get custom items into the game!
                             
                            • Xren

                              Xren Pangalactic Porcupine

                              thanks!
                               
                              • Thank You Bomb

                                Thank You Bomb Void-Bound Voyager

                                Would you be willing to put up a video of you making and inserting a custom item into the game, when you manage to be succesful? I really want to get into modding, but I'm afraid I don't know much about how to use your API or Microsoft Visual Studio, although I do have experience using C++
                                 
                                • Zoryn4163

                                  Zoryn4163 Big Damn Hero

                                  I don't see why not. It will be a bit away though, as implementing custom content is... not straightforward to say the least, which is why I wanted to create this API - so that it is straightforward.
                                   
                                  • Handsome Matt

                                    Handsome Matt Aquatic Astronaut

                                    Made a PR. If you could look at it when possible, need the changes to draw properly.
                                     
                                    • Thank You Bomb

                                      Thank You Bomb Void-Bound Voyager

                                      Can I just confirm something very quick? Sorry I'm new to this, but the API is just meant to be run instead of the standard EXE. It can do commands for right now, and when you run it, it will run all the DLLs in your mods folder, but you cannot create mods with it right? that has to be coded in MVS and exported as a DLL, or you can edit things directly using the xnbs. Am I correct, or am I way off?
                                       

                                      Share This Page