Tool Storm Modding API

Discussion in 'Mods' started by Handsome Matt, Mar 7, 2016.

  1. Handsome Matt

    Handsome Matt Aquatic Astronaut

    Storm Modding API

    Currently in ALPHA | Not compatible with SMAPI (or its mods) | GitLab Source Code | #stardewvalley-mods on freenode for development discussion

    This is super alpha right now, things will break time and time again until we set a milestone. You can download it below however.
    We currently need help knowing what classes and events mod makers want exposed right now in order to make the best mods possible.

    • Dynamically modifies the game's executable at runtime to expose private data and provide callbacks.
    • Provides a layer of abstraction for a stable, maintainable modding environment.
    • We use Mono.Cecil for our MSIL injection, DynamicProxy for creating instances of any games classes, and Json.NET for serialization.
    • Because of the way Storm is built, game updates shouldn't break mods and at most would require an update to Storm only.
    • Place the contents of AppData in %appdata%/StardewValley. Place the contents of StardewValley into your game directory. (The one with Stardew Valley.exe in)
    • Launch StormLoader.exe to load the game.
    • Mods: Mods each have their own individual folder, and go in %appdata%/StardewValley/Mods/modname/modname.dll
    Example Mods:

    Video tutorial on how to install etc, thanks to NorthernMonkey


    If something isn't working, please post your storm_log.txt
      Last edited: Mar 13, 2016
      Gabaw, Vith, Davrial and 19 others like this.
    • Zoryn4163

      Zoryn4163 Big Damn Hero

      Woohoo Storm! Much preferred, it's a great API.
        Last edited: Mar 9, 2016
      • Afterscore

        Afterscore Weight of the Sky

        Looking forward to the release of this API, you're doing great things boys.
        • Acrimonia

          Acrimonia Subatomic Cosmonaut

          What I'm looking at doing are -
          • Decoupling advancement/marriage from heart progression.
          • Tying event scenes to multiple factors. I.E. A scene requires charatalk3x AND Clint's Heartrank =>3.
          • Removing or changing marriage mechanics for specific characters.
          • Having off-map locations that can be visited via the bus drop-down menu.
          • Other stuff I haven't thought of yet.
          What I'd like to see for events -
          • Multiple events per 'heart' if they cannot be decoupled from heart progression
          • Events for different seasons
          • For that matter, different sprites used for walking during different seasons though I might be too lazy to do this one...
          Not sure regarding classes. In regards to my thoughts, I've mostly been messing around with 'faking' the first two (Decoupling hearts/social progression) by referencing conversations, a lot.
          I haven't gotten very far yet so *ANYTHING* that makes this simpler, less tedious, and easier would be a huge boon.
          Really, ease-of-use is always good. WYSIWYG is always good. A set-editor that could call up ID's, map tiles etc while working would be golden, anything simplifying and prettifying that would be icing on the cake.
          (I'm all Python all the time, though, so my opinion is invalid, haha.)

          Interesting so far, looking forward to seeing how this goes. No way I'll be helping out as much as I'd like, but hopefully you'll keep in mind what I've said and find a way to put it to use somehow...
          Thank you all for your hard work.

          Edit: I'm assuming there's a parrallel event to IsDarkOutEvent called that checks for storm/wind/rain/snow..? Each of those should probably have a call, too.
            Last edited: Mar 7, 2016
            SgtPineapple1st likes this.
          • bdawson1993

            bdawson1993 Tentacle Wrangler

            I'm not bashing the work you've done, its fine work. However I see a problem with the modding in this game at the moment. Multiple APIs which can course confusion, and can often make life harder for the modders. What we a standardized api that all modders and mod users will use, much like Forge for minecraft.
            • Handsome Matt

              Handsome Matt Aquatic Astronaut

              The original creator of SMAPI deprecated it in favour of this, the plan was to move everyone over to this, but someone decided to keep maintaining SMAPI - this is infinite times better and allows for many more mods to be created. We're trying to push out as early as possible so there won't be a split in apis.
              • cantorsdust

                cantorsdust Existential Complex

                As someone who's written a moderately complex mod with SMAPI--what Storm is doing could have saved me hours of work by letting me just directly override a function instead of faffing about trying to get around it.
                  Link_of_Hyrule likes this.
                • yuukiw

                  yuukiw Scruffy Nerf-Herder

                  wow the modding community really is active here. I will try to add support in SDVMM if Storm itself isnt an Modmanager^^
                  Reading it makes it seem easy to support with SDVMM.
                  • bdawson1993

                    bdawson1993 Tentacle Wrangler

                    Ah, thanks for clearing that up. I'll have to download and get my mod ready for when you release it :)
                      Link_of_Hyrule likes this.
                    • Yunix

                      Yunix Big Damn Hero

                      So you worrie about have few API's then just one?
                      The SMAPI is working for now for the few mods thats out there. So that could stay where it is.
                      Why don't ask the "new guy" of it if he "freeze" is develop of the SMAPI and help too to get this
                      "better to mod API" up and running?
                      Becouse what i understand (and im stupid if u talk about programming and stuff) is that this
                      API would be way better for Modder and User, right? So...
                      The SMAPI would die soon or later then anyway if this here is realy better. Haha.
                      Just a idear.
                      • Afterscore

                        Afterscore Weight of the Sky

                        That's pretty much what's going on. There is someone keeping SMAPI alive at the moment to cover mods that were already released and being released but the main effort is going into building this new API which should render SMAPI obsolete. Mod makers will need to convert their current SMAPI mods over to Storm or leave them as is, but with how robust this new API is sounding I imagine it will become very popular and attract more attention from potential mod makers meaning it will be the preferable choice over SMAPI.
                        • Edge!

                          Edge! Subatomic Cosmonaut

                          Looks good, not having game updates break the mods is really interesting.
                          Best of luck with this project!
                          • Hobbit9797

                            Hobbit9797 Poptop Tamer

                            Some input events for keyboard, mouse and gamepad would be nice. That way, modders won't have to access the update loop for input. Events that can detect a completed load of a savegame would be great aswell to not let stuff fire on the main menu.
                            • ghillielead

                              ghillielead Intergalactic Tourist

                              Let me start off by saying this looks pretty sweet. Before I would start using Storm though I am curious what some of its limitations are. What is it unable to give me access to or allow me to do? I see I can be notified of various events, but can I cancel the event and prevent the action from happening? Are some of the files (like the JSON or accessors) generated? They're huge! While mods themselves may not break it seems like maintaining Storm itself could be quite a task.
                                Last edited: Mar 7, 2016
                              • ClxS

                                ClxS Pangalactic Porcupine

                                ^ Pretty much.
                                I took over keeping SMAPI updated because I was planning to get it to the point where it'll be able to create the mod I'm planning on working on. That's how I came across SMAPI and then this forum.
                                Major content mods such as additional areas, and gameplay changes are what I hoping for eventually. SMAPI isn't at the point where it can do that, and wont be for around a month at least. (Code all day at work - can only usually bring myself to do an hour more after)

                                This mod might do that for me so on release I'll be happy to let SMAPI die if enough take up Storm and it's maintainable.
                                  Last edited: Mar 7, 2016
                                  Yunix likes this.
                                • Acrimonia

                                  Acrimonia Subatomic Cosmonaut

                                  Apologies, but I do feel this needs to be said.
                                  There's a lot of hard work and effort in here, and I can see a lot of advantages that Storm seems set to have.
                                  Similarly, there's a lot of admiration for your work going on, here. Rightfully so, perhaps, but all the same...
                                  End users don't care how many times-infinity more powerful an API is, and that's not the best way to explain your work, anyhow. They care about usability, ease of access, etc.
                                  Modders creating art, dialogue, etc care about what it lets them do, and specifics. If it takes too much time away from their work, they'll likely stick to simpler options even if the end result is ugly code-wise.
                                  The team cares about making the most efficient and powerful API it can. This does not always benefit the first two users, although I feel strongly it will in the long run.

                                  Now, Storm already has an advantage to SMAPI in that it shouldn't require a compatch every time it's updated!
                                  But it might do well to remember that if Storm isn't also kept accessible and promoted, it won't overtake SMAPI, and SMAPI won't go anywhere. It has the advantage of both time and relative simplicity.
                                  In other words, SMAPI'll just remain the dominant API and most people will stick to using XBN editing.
                                  I could be wrong, but I believe the majority of mods so far are XNB content edit and creation, so make of that what you will.

                                  People generally would prefer comfortable or familiar tedium to new, or poorly explained sleekness in many respects.
                                  Sorry for being an old fart, but I've seen a lot of really good projects bite it and then get confused and angry as to the reasons why.
                                  It's important to temper enthusiasm with caution, and though I'm looking forward to working with Storm, I feel obligated to be the odd one out, here.

                                  Moving on from that, and hopefully having said my piece without coming across as crass - Looking at what you have so far, some other things I've noted.
                                  MidCropHarvest or something would be handy, possibly allowing for plants to be harvested earlier for different yields or goods (white tea versus green tea comes to mind).
                                  EndOfDay events to load into dialogue/cinematics/etc before the daily tally would be cool.
                                  AfterFarmerPlaceObject to have reactive furniture/items would be useful. Maybe placed 'stairs' or similar that allow special floors of the mines to be accessed.
                                  • Handsome Matt

                                    Handsome Matt Aquatic Astronaut

                                    Yeah I can add those things in later today. :)

                                    Most of the accessors are auto generated, but events are done by hand (you choose the method you want to hook and write an event) - the advantage of it is that if a game breaks a certain event or field, all the mods won't break and we can potentially just patch it in Storm itself.
                                    • Yunix

                                      Yunix Big Damn Hero

                                      Well it would not be for forever. As far i know the Game Dev said that he will add mod-"help" (how ever u call it) to the
                                      Game at some point so the API's would not be needed for to long i guess. Depends on the Dev i would say.
                                      • Acrimonia

                                        Acrimonia Subatomic Cosmonaut

                                        That is another worry to consider, yes. The tools in question might not possess all the features a proper API would, however.
                                        I imagine Storm will fill the niche of more complex mechanical mods, but I would like to see it get some exposure before attention is drawn to a generic mod utility, or whatever CA has planned.
                                        • Afterscore

                                          Afterscore Weight of the Sky

                                          I think one of the bigger advantages is that with the current API there are limitations that are difficult to overcome which is why when you look at the mod sub-forum a vast majority of the current "mods" are simply texture replacers or content that was previously in the game and just edited. Storm should allow for entirely new pieces of content to be created, and added, to the game (if I'm reading this quote from Cantorsdust correctly) much more easily than it currently is.

                                          With that simple fact alone I can see SMAPI being outpaced very quickly. Yes, people tend to prefer comfortable environments and SMAPI has given them that but I can foresee that rapidly changing as more unique and in-depth content is released for Storm that simply cannot be replicated on SMAPI. This is all speculation of course and my understanding of API work is below that of a novice so I'm working out from what I've been reading how this will work (feel free to make corrections, I gladly welcome it).

                                          And as Yunix and yourself have noted we are hoping to receive official modding support from CA which will change the game once again. The only thing is we don't know if that modding support will be here next week or next month or in several months. In the meantime it makes sense to start working on things that can be done to improve the game now.
                                            Last edited: Mar 7, 2016

                                          Share This Page