I know this has been a suggestion / question before, but i would like to bring this up once more. Sometimes a dependency system, that would just ask you inside the repo if you want to download the required mod / also maybe tell you that the dependency is outdated / not there anymore would be awesome. I do have the feeling that this isnt too difficult, since mods already have their unique ID and are managed in the Repo anyway. This would enable making core mods easier, where people can easily create a plugin and everything doesn't need to be duplicated and cluttered. What are your guys thoughts about this?
This has already been asked before and answered by the devs here: https://www.beamng.com/threads/dependency-management.75964/
I was developing such a system, it is 1 of the modules in my unreleased SUU "toolkit" called "requireMod" https://www.beamng.com/threads/superusefulutilities-mod.93859/ This module does exactly what you described - if a mod requires a dependency (check under modID) it downloads that dependency. --- Post updated --- Unfortunately, I ran into a problem - a mod from a dependency that we are trying to find by modID(tagid) can, for example, be unpacked in "mods/unpacked". Or it can be user installed in the root of the game, in the content folder Or it can be, for example, unpacked into the user folder directly (not in mods/unpacked). It can even be unpacked into the root of the game. and there are a lot of other variants to consider. --- Post updated --- And this can not be ignored, if without thinking just not having found the required mod in the folder "mods" download it again (while the mod is already installed somewhere) it can break the user game In addition, it should be remembered that mods from version to version can differ dramatically, and by good should also check the version, but again, how to do this in the case if the mod for example unpacked in the root of the game? --- Post updated --- I started doing it, even drew a schematic for myself in paint(It's in Russian, lazy to translate, I just want to show its size): (This is the scheme for the "autoUpdate" module, but it will be almost exactly the same for "requireMod".) v1 v2 (Slightly "optimized")I've implemented some of the logic that deals with finding mods in cases if: The mod is not unpacked in userFolder/mods/* Mod is unpacked in userFolder/mods/unpacked/* Mod is not unpacked in gameRoot/mods/* Mod unpacked in gameRoot/mods/unpacked/* (Left branch) But with the right branch, which should solve problems when the mod by tagid was not found, I alas did not cope. --- Post updated --- The main reason - unfortunately there is no way to get at least a list of mod files, without downloading it. I've asked modders, asked developers, but, in general, there is no way to get a list of mod files. And to download every time a mod to check if it is not installed... bad. Very bad. Okay if the mod weighs a couple of MB, okay, no big deal. But if it's 500mb? And if, like for example, maps by gigabyte? Well, that's bad, that's really bad And, well, but at this point, I just gave up on SUU. Is it possible for modders to make a dependency system? Yes, it is possible, but difficult. Is it possible to make an IDEAL dependency system? I think not. But I could be wrong
Thanks for your answer, some awesome work you did! I think an improvement for this would maybe be that the Dependency doesn't automatically download the required mod, but more so give the user a pop up that tells them what mod is required and then prompts if they want to download. If they already have it and they know that they can press no and the mod doesn't get downloaded. Fixing the part where people install a mod directly to the files really isn't an issue IMO, because that is really recommended by the devs not to do anyways. I do however get the installing in the unpacked folder problem. The thing about all of this is that the devs could probably implement stuff that we as modders really cant, (for example seeing what files there are in a mod), and im sure there could be a solution to all of this.