Modding Discussion Mod Packaging Standards

Discussion in 'Mods' started by M0dScientist, Feb 8, 2017.

  1. M0dScientist

    M0dScientist Void-Bound Voyager

    Hey all, I'd like to start a conversation about Mod Standards. I'm one of the developers of new ModDrop mod manager. I'm trying to make the process for modding SDV as easy as possible, by using algorithms to automatically recognize where files go in the game directory.

    We have a pretty solid solution for simple .XMB content that involves matching files up against the game's content - and when duplicates exist, to use the mod packages file path to determine where the mod goes. In this fails, we simple ask the user which folder the mod belongs in, but limit it to the folders that actually include a matching .XMB file. We also handle "normal" SMAPI mods just fine.

    Where we're running into trouble is when a SMAPI mod includes .XMB files. Examples include:Get Dressed,Extended Cellar and Seasonal Victorian Buildings and Flowers. In order for us to write a robust algorithm to support these mods, we need there to be a predictable pattern. I'm new to these forums, so if a thread already exists for this, please point me in the right direction. If not, of if current standards aren't being followed, I suggest we start a conversation here to create one that we can all live with.
     
    • yuukiw

      yuukiw Scruffy Nerf-Herder

      The Patrern is already fairly recgonizable.
      Write a Function that checks in every sub folder for a DLL or a xnb File. If it finds DLL die move all files in that folder plus all sub folders.

      If it is only a xnb then compare it to all xnb files in sdv/content. If you find more then one or dont find it all let the User choose the location

      Gesendet von meinem SM-G925F mit Tapatalk
       
      • M0dScientist

        M0dScientist Void-Bound Voyager

        And that's basically what we are doing now. It's easy to determine where SMAPI belong.

        The challenge is that some mods rely on users reading the instructions on their mod's Nexus page or in a readme. Take the "Get Dressed" archive directory for example: Get Dressed 3.2-331-3-2.zip/Get Dressed/overrides/... We know mods that include an manifest.json file and / or .dll get put in the mod folder. No problem there. But without a the presence of a root folder like "/mods/" the .XMB files (located in the "overrides" folder) are a little less clear. For example, a mod developer might want the .XMB files installed into the content folder. It might be safe to assume the .XMB files would be in separate "content" folder, but I'm sure that we can be confident enough in that assumption that we can make a rule of it. After all, the mod archive directory didn't include a "mods" root folder.

        I'm looking through as many mods as I can find that use SMAPI *AND* include .XMB files to try and find a predictable pattern. If all of these mods package their mod the same way, or have a predictable pattern, then we can safely automate the installation. They don't need to follow the exact strategy, they just need to be similar enough to create an algorithm for.

        One outlier I've come across is "Seasonal Victorian Buildings and Flowers," which wants to be left as a .zip (unpacked). I'm assuming this is a "Feature" of the Seasonal Immersion Mod. It would be a nice feature if all mods worked this way, but they don't, which makes it hard to program for.
         
        • quirkyquark

          quirkyquark Astral Cartographer

          Note that all Seasonal Immersion Content Packs must currently be put as a ZIP inside the mod's subfolder. A future version will allow unpacked ContentPacks too. I think you'll just have to code case-by-case exceptions for such situations.
           
          • Androxilogin

            Androxilogin Giant Laser Beams

            A good algorithm for something such as Get Dressed would be to search for a manifest.json maybe [SMAPI mod] ('Mods' folder) [Ignore this first part, I was still typing when you commented]. Extended Cellar is an ALL mod which goes in 'Mods\AdvancedLocationLoader\locations\' which will soon have a package extension rather than a folder. Also, I hope you aren't setting your program to search for 'XMB's because you may come up with nothing but a headache. These files are .XNB and typically act as an override or addition. Maybe take all basic files into account and have your mod check against them?
             
            • M0dScientist

              M0dScientist Void-Bound Voyager

              This might be the only solution for some mods, but I'd like to avoid asking the user if at all possible. All too often the user chooses the wrong file path or gets confused and avoids using the mod altogether.
               
              • M0dScientist

                M0dScientist Void-Bound Voyager

                No, we use multiple factors when determining where files go. We created a confidence rating that judges files based on the file path, types of files included in the mod and whether a matching .xmb file exists in the game.
                 
                • Androxilogin

                  Androxilogin Giant Laser Beams

                  Can you search inside of a manifest, perhaps? If so, maybe have it search for "LoaderVersion" to determine if it's an ALL mod.
                   
                    M0dScientist likes this.
                  • M0dScientist

                    M0dScientist Void-Bound Voyager

                    Coding a case-by-case exception for such situations is something we are trying to avoid where possible because conditions are constantly changing we it's really challenging to keep up to date on the changes. That being said - it IS something we are willing to do if not other options exist, but it would be great if we could at least have a single destination that lists the current standards for different mods.
                     
                    • M0dScientist

                      M0dScientist Void-Bound Voyager

                      Good idea! I'm pinging my lead developer to see if that's something tried.
                       
                      • yuukiw

                        yuukiw Scruffy Nerf-Herder

                        The ideal case would be if the manifest of smapi did want a line that say if it's a smapi mod with xnb files or not.

                        While a general Struktur would be nice there will always be those who dont Apply to them.

                        Gesendet von meinem SM-G925F mit Tapatalk
                         
                        • yuukiw

                          yuukiw Scruffy Nerf-Herder

                          In case you wrote it partly cause of my answer, that's why i said To also check for presense of DLL File since then you have to go by that. And not the xnb itself in most cases

                          Gesendet von meinem SM-G925F mit Tapatalk
                           
                          • yuukiw

                            yuukiw Scruffy Nerf-Herder

                            You could also just list all path you found said files in this would lower the error Potential. But still would be far from optimal

                            Gesendet von meinem SM-G925F mit Tapatalk
                             
                              M0dScientist likes this.
                            • M0dScientist

                              M0dScientist Void-Bound Voyager

                              It looks mods designed to for ALL do have unique traits in the manifest file, so that should help a lot.
                               
                              • M0dScientist

                                M0dScientist Void-Bound Voyager

                                This might have to be our fallback when all else fails. Actually, the best case scenario would be to link mods through dependencies, but that would require the mods to be published on ModDrop.

                                btw, thanks for sharing your ideas Yuukiw. You know better than anyone what we're going through. I really appreciate it!
                                 
                                • M0dScientist

                                  M0dScientist Void-Bound Voyager

                                  Quick update on our progress...

                                  In the newest build that I've been testing out:

                                  - The exclamation point in !EntoaroxFramework is showing up in the folder correctly. Moving forward, all such characters will be retained.

                                  - We've also got a fix where .XMB files in the mods folder are being put in the correct place.

                                  - Finally, ModDrop is no longer skipping over .XMB' that don't match pre-existing files in the content folder. This means Advanced Location Loader mods should be working correctly now.

                                  We one additional feature hammered out before pushing out an update. This is a big one and took some reworking:

                                  - More options for dealing with "Rouge Files" (files that we don't know what to do with). We are working on adding the option to skip over these mods (not install them) and to select a folder in the directory manually.

                                  We expect to have the update ready to push live either late this evening or tomorrow.
                                   
                                    yuukiw and xangria like this.
                                  • yuukiw

                                    yuukiw Scruffy Nerf-Herder

                                    Good to hear that you found a solution that suits your needs.

                                    Gesendet von meinem SM-G925F mit Tapatalk
                                     

                                    Share This Page