WIP SDV API - A mod compatibility Platform

Discussion in 'Mods' started by HyperCrusher, Oct 20, 2016.

?

Are Other Modders Interested in a framework like this?

  1. Yes

    10 vote(s)
    90.9%
  2. No

    1 vote(s)
    9.1%
  1. HyperCrusher

    HyperCrusher Gotta Catch 'em All! Mk.2

    SDV API

    Let Me know

    SDV API is a small concept I started on for myself and decided to expand for the modding community for stardew valley, I however don't know how many modders are interested in the tool like this, and the purpose of this WIP is to provide a summary of its planned features to get community review. I will likely finish it to some degree, but would like to see how many people are interested in it before I commit to the large undertaking it represents.
    Overview
    Stardew Valley API is a mod and future modding API. The goal of SDV API is to remove mod conflicts and to expand on mod functionality in a way that is easy and intuitive. SDV APIs most notable feature to date is the ability to add XNB tilesheets and tiles to a map without modding the games original files, making mods that dont require re-installing every update.

    This is a WIP Any feature or subsection listed below following by a -* is upstarted or untested and may be removed or modified in the future with what was found to be possible through smapi

    Improved Mod Loader
    SDV API has it's own Mod Folder for finding and loading mods, it does this to expand on the abilities of the Manifest File, these improvements include:

    • Dependency - If your mod has a dependency, it looks for the mod needed before attempting to load yours
    • Known Conflicts - If your mod has a known conflict, it warns the user of these conflicts
    • Help - All mods are given a /help function by default, the prompts and explanations are provided for inside the manifest, making changes to dialogue choices quick and small updates
    • Update URL - If you host your updates on github, SDV will prompt the user to update, and if selected will download and preform the update for them

    Custom NPCS and Heart Events
    SDV API will make adding custom NPCs and Heart Events easier to do and manage, as well as come with some side developer tools for making the schedules and dialogue of these characters easy to do and use in a Mod.


    XNB Mods
    XNB Mods are given a new face with SDV API, Instead of having users replace their XNB Folders you can now create XNB Files containing only the edits you made, and SDV API makes it simple and easy to apply edits with a custom tilesheet to maps without replacing the original files, making and endless amount of mods compatible, users will now long have to choose between one map or another, they can instead find mods for the map they are using and as long as they don't both edit the same tile, use them without any weird, or conflicting behavior.

    Achievements
    While achievements are not a huge part of Stardew Valley Achievements are easy to setup and rewarding for the user, its requires 2 lines of code to setup and a single line of code to create any achievements followed by a single line of code to reward the player with these
    achievements


    Items, Animals, Machines, Buildings, and Seeds -*
    Currently there is no safe way of adding these things without potentially conflicting with another mod, My plans is to simplify the addition of these resources, while providing a registration system that allows you to register the addition without having to worry about conflicts while SDV worries about the ID's and linking the needed items to a saved file to prevent a new mod from over-writing a registered item.

    Researching...
    Below is a small list of changes and places I am still researching into SMAPI's ability to modify and edit before I make a dedicated feature to them. If SMAPI does not possess the ability the next stage is to implement a way to modify or do it myself, but the goal is to not have to replace SMAPI, but to enhance its abilities. At some point I may push some changes to SMAPI but currently I am more interested in making my own version of SMAPI than I am building upon it in its current state.


    Custom Locations
    Custom Events
    Custom Random Events
    Custom Monsters
    Custom Animations
    Custom Modular Clothing
    Custom Mini-Games
     
      Last edited: Oct 20, 2016
    • Coolwyngs

      Coolwyngs Giant Laser Beams

      This is a wonderful idea! I hope it comes together.
       
      • HyperCrusher

        HyperCrusher Gotta Catch 'em All! Mk.2

        The XNB Mod framework and achievements are all thats done at the moment, when I finish a side-tool that makes XNB Mods for SDV even easier to make I plan to release an alpha so that the community can hopefully start to get a feel for it and take advantage of it
         
          Coolwyngs and randomAnon123 like this.
        • HyperCrusher

          HyperCrusher Gotta Catch 'em All! Mk.2

          Update:
          Added Custom ModLoader
          Began Work on custom NPC Modules
           
            Coolwyngs and randomAnon123 like this.
          • Kithio

            Kithio Void-Bound Voyager

            There is another API in being developed that will replace SMAPI once released...

            Stardew Farmhand (Google it and you'll find the repo easily - not sure what the rules are for posting links on this forums yet.)
             
            • HyperCrusher

              HyperCrusher Gotta Catch 'em All! Mk.2

              I'm aware, the API I would make would serve as an update to SMAPI until farmhand is released, I myself don't know the current stage farmhand is out, but SMAPI is lacking a few things (Documentation being one) that based on my research wouldn't be hard to add. Though I dislike a bit of SMAPI's interface so I'd be redoing a lot of the work it has put into it, though SMAPI is a pretty simple program to be honest.

              Depending on how Farmhand does things I may or may not develop my API regardless, My APIs main goal would me modular behavior, I don't think new versions of the game should impact the functionality of the API you use, currently thats the biggest problem with SMAPI, that and missing a framework to allow easy compatibility.

              BUT
              Before we get ahead of ourselves, as it is currently I have not run into any issues using SMAPI to further develop tools that make modding easier. Im half way done with a NPC system, and then I'll NPC Creation tool for making and viewing heart events before you put them into a mod. So it seems like SDV API will be able to coexist as a mod rather than a replacement
               
                randomAnon123 likes this.
              • Kithio

                Kithio Void-Bound Voyager

                That part was filled by Entoarox's Framework when it comes to SMAPI
                 
                • HyperCrusher

                  HyperCrusher Gotta Catch 'em All! Mk.2

                  That framework from what I was able to find falls short of being a compatibility framework there also seems to be a severe lack of documentation.

                  Take for example adding items. Events, achievements and almost anything else, they require unique IDs these ids can cause mod conflicts you could theoretically craft an item and end up with another mods seed instead for example.

                  This framework is designed to simplify complicated tasks into basic easy to use, understand, expand upon, and modify functions with complete documentation while allowing the framework to worry about giving out unique IDs to prevent mod conflicts, with the added benefit of allowing xnb to exist outside of modifying the game files in a non hacky way that is native to xtile
                   
                  • Entoarox

                    Entoarox Oxygen Tank

                    Adding custom items should not be done while we are still on SMAPI, simply because the second someone puts a custom item into a chest the game will crash.
                    FarmHand is, from the general standpoint, SMAPI+Abstraction
                    It will give us all the freedom of SMAPI, but the ability to abstract using its API functions.

                    You should be spending your time aiding us in getting FarmHand finished rather then building a API onto SMAPI that, seeing as you obviously do not even know how FarmHand works, will just end up breaking once FarmHand is out.
                    (EntoaroxFramework is specifically designed with forward compatibility to farmhand as a priority while backporting critical functionality to SMAPI)

                    Further, nearly all the features of your API? FarmHand already has them implemented or we are trying our hardest to implement them in a intuitive way.
                    Also, of course SMAPI doesnt have documentation, it doesnt DO anything! It is nothing more then a basic modloader and event framework, adding documentation to it wouldnt let anything more happen.
                    Finally, EntoaroxFramework DOES have documentation, and since so far nobody has needed to ask me questions, I can only assume that the people who are considering developing mods using it have no problem with the framework as it stands.
                     
                    • HyperCrusher

                      HyperCrusher Gotta Catch 'em All! Mk.2

                      Im aware farmhand does a lot of things smapi does not, this isn't meant to persist through farmhand, its simply meant to assist current mod compatibility in lue of farmhand. You're correct in stating that I do not know how farmhand works, I do not have the time to delve into a project that changes every day at the moment. I'v forked it and have slowly been going over it but until I have time to look at it thoroughly, I have no contributions to make, If I see a need for my API to persist through and into farmhand I would of course do the needed changes to make them compatible.

                      I myself disagree with the notion that SMAPI doesn't need documentation, I personally believe that documentation would be nice, I'm making no claim that more documentation would mean more mods or that smapi is super complicated to figure out, I do however feel that it should have been documented.

                      I apologize I could not find the documentation to EntoaroxFramework, I attempted to emphasize my uncertainty with "seems". I have no problems with your framework, and have no doubt that it does what its intended. I was simply adding the documentation as a sub argument to documentation being one of my primary goals.
                       
                        Last edited: Oct 21, 2016
                      • Entoarox

                        Entoarox Oxygen Tank

                        And that there is all the reason not to bother using it, because just as you stated, your API is not compatible, so any mods that use your API would have to be rewritten the moment FarmHand comes out because you do not plan to continue your API then.
                        You also did not respond to my primary warning that items should not be inserted into the game using SMAPI, a major concern that WILL crash the game once the dictionary serializers fail to serialize the custom items inside of chests.

                        While additions are being made to the Abstraction functions of FarmHand daily, little to no changes are made to the core mechanics as things stand, thus your claim that the project changes every day is based upon a wrong assumption.

                        As to documentation, what (little) is needed is embedded into SMAPI's source, exactly in the place where anyone familiar with source-based documentation would know to expect them, and since nearly every programming language has some form of documentation tool these days, not expecting to find it there simply shows inexperience with code, that, due to the programmatic maze we modders need to weave through, means that you are nowhere near ready to do a quarter of the things SMAPI mods do.

                        I can not speak for other modders, but your approach and the absence of so much as a link to in-dev code means that I personally feel more wary of the very idea of this API then interested, and I am a person who was willing to look into what all modders in general believed to be a impossible project simply because the owner was willing (and it turned out despite all belief, able) to back up the claim.
                         
                        • HyperCrusher

                          HyperCrusher Gotta Catch 'em All! Mk.2

                          All I stated was that, currently I have little time to go through the source to help on the project. I'm full well able to have a discussion but if your going to ignore half of what I post and comment on the other half I'm going to request you leave the discussion for people willing to have it.

                          I can rebuttal and continue with the rest of your concerns when I'm off work. I am not inexperienced with code. I did not use your framework I merely looked for an external documentation, if your simply going to be posting rude undertones only because you dont like the project then, again please cease to reply.

                          There's two ways to have this discussion and I'm not really into your approach
                           
                          • Entoarox

                            Entoarox Oxygen Tank

                            I have this time explicitly replied to the pertinent paragraph's in bold above, so you cannot claim again that I am ignoring things.

                            You believe myself to be rude, but the truth is that as things stand, you have talked a lot about, what from all appearances, is a mythical API apparently capable of things that are factually known to simply be impossible within the imposed limits of SMAPI, and not only do you not provide at least a partial source to show your works, you also claim to not have the time to learn about the actual successor to SMAPI at all while apparently still having the time to develop this API.

                            If you despite all this cannot see why I am clearly on the edge of calling bullshit on it, then I sir, have a bridge for sale!
                             
                            • VIspReaderUS

                              VIspReaderUS Void-Bound Voyager

                              found it. phooey...
                              ignore this, its a placeholder
                               

                              Share This Page