Modding Discussion [1.1] Cross-platform modding not here yet?

Discussion in 'Mods' started by mrboese, Sep 30, 2016.

  1. mrboese

    mrboese Phantasmal Quasar

    I was told to wait; I waited, now I'm here, again :)

    1.1 is around the corner as most of you have probably noticed. It's great and I'm really looking forward to play it :)
    It fixes many problems and adds a lot of things. But concerning modding there's still one issue: Stardew Valley makes it (still [1.1 Beta 30.09.16]) hard to create mods for multiple platforms. Currently (and with the current 1.1 beta) mods still depend on XNA Framework, which leads to either multiple code paths that no modder wants to maintain (understandable) or needed manual recompilation by the user (if the code is available).

    I really don't know how/if this should be solved. 1.1 is still in beta, but IMO there won't be any more significant changes besides bugfixes. I and probably many other users would like to use mods or create ones themselves :(
     
      bethany7 likes this.
    • Entoarox

      Entoarox Oxygen Tank

      It is on the docket, just not a priority while we are trying to get everything ready for 1.1 itself first, once that is done we might be able to look into ways of removing the platform dependency within mods.
       
      • mrboese

        mrboese Phantasmal Quasar

        Great! I actually know only one viable solution to this kind of situation so far (if SDV is not changed): Distributing mods as source and compilation of the mods by using a tool (mod manager etc.) with the right dependencies. Parkitect does it and it seems actually be working in most cases.
         
        • Entoarox

          Entoarox Oxygen Tank

          Yeah, while that might work, it would force people to publish their source, not something everyone will be happy with.
           
          • mrboese

            mrboese Phantasmal Quasar

            I can understand that some might not be happy with it, but IMO it's still the best approach. I don't know how to get some modders that might have concerns about publishing the source to change their mind, but we could try to argue:

            With .NET there's no actual "protection" from decompiling the code anyways. Everybody can just download a decompilation software. I even managed to restore a big project with GUI and more only from the executable. Code obfuscation is a possible solution to hide the code, but a little bit unfair as ConcernedApe isn't doing it and mods are building on his work.

            Also this promotes some sort of "community" - you take something and you give something back. New developers can build on existing mods (which mostly occurs only if the developers doesn't want to support it anymore) and can look for solutions to create their own mods. The Cities: Skylines modders always provide their source and the community managed to create great mods that built on existing ones, refining and expanding them. I myself learned a lot how things are done by looking at C:S mods that did some things I needed to do.
             
              Last edited: Oct 1, 2016
            • Entoarox

              Entoarox Oxygen Tank

              I am not saying that reverse-engineering the source is any harder, but from a legal standpoint, having your source out and open without clear licencing is going to cause trouble as the community grows.
               
              • mrboese

                mrboese Phantasmal Quasar

                Of course. So it would be the best if new modders would then be given advise which license should be chosen depending on what they want. From "you can do whatever you want" to "here's the source for you to see and compile. but don't use it somewhere else". And if a mod doesn't have a license, the community would point it out to the author who then fixes it.
                 
                • Entoarox

                  Entoarox Oxygen Tank

                  Yeah, it is unlikely to happen, simply because we already have trouble with thieves, at least as it stands reverse engineering mods takes more work then they seem capable of.
                   
                  • mrboese

                    mrboese Phantasmal Quasar

                    Thieves will always happen. More interesting would be if this community was able to find them and get rid of mods with stolen content (I witnessed it with Cities: Skylines. Those mods lasted ~1 day and were gone). Hosting on GitHub or other services with an appropriate license would additionally give the opportunity to file a DMCA takedown of repositories using code illegitimately if no other measures work. I can imagine that might be one of the reasons why Parkitect Nexus enforces GitHub.

                    You said that reverse-engineering of DLLs is enough of an obstacle for many thieves. This lack of understanding on the side of the thieves can be used to make it a little bit more difficult for them while keeping the source accessible:

                    • Enforce using Git (Or at least give the option) - Let modders host their stuff on GitHub or somewhere else. This allows DMCA takedowns and requires fiddling around with the hosting site to obtain the code
                    • Only provide the git:// link to a mod. If somebody is too stupid to find a decompiler for .NET, he likely might be overwhelmed by git:// links
                    • If thieves are expected to find out what git:// links do, rename the protocol to e.g. sdvmod:// and apply some other reversable changes that makes it difficult. Or even encrypt it with AES or weaker with a key that is in fact known, but makes it difficult for thieves. Like this: Download mod -> Contains *.sdvmod files with some metadata and encrypted git link. Mod creators can use a GUI to create those *.sdvmod files
                    • The client clones the repository, compiles the DLL and then deletes the code right away to be sure
                     
                    • ClxS

                      ClxS Pangalactic Porcupine

                      Yeah it's definitely an issue.
                      It's a little worsened by just how SMAPI is. SMAPI is a bit misleading of a name. It's less of a modding API and more of a mod-loading tool with additional features to make altering certain things easier.

                      It would be nice for modders to provide their source so that when the updates come, community favourites can still receive fixes even if the original creator is no longer around. If they're not willing to post their source, it'd be nice if they could at least officially say that they don't mind others modifying their mods to fix compatibility, given how easy decompiling .NET is.
                       
                      • mrboese

                        mrboese Phantasmal Quasar

                        This thread is a little bit old, but there's some new development. I sat down and made my own mod manager. It handles the compilation on the user's computer (although I only got my testlauncher to run and not SMAPI and STORM).

                        I think it solves the issues pointed out by Entoarox by giving the option to provide the source in an encrypted *.zip file. This source is then extracted when needed and deleted right afterwards. The resulting issues regarding the password is moderated by "encrypting"/scrambling the password itself. Only the mod-manager or someone who is able to read the manager's code (and therefore just decompiling the DLLs) can get the original password.

                        If modders would use the system, then also the problems pointed out by ClxS are solved: People who just want to steal the mods can't get them and other people who have good intentions and have enough knowledge to decompile the mods can get the original source. The manager includes a "license" entry in the configuration - it's then easily determined how/if mods can be modified/distributed.

                        Forum thread of the mod manager
                         
                          Last edited: Oct 11, 2016
                          foghorn likes this.

                        Share This Page