UnlimitedHugs / RimworldHugsLib

A lightweight shared library for Rimworld modding.
Other
245 stars 59 forks source link

Adding mod load order resolver #40

Closed PhOder closed 6 years ago

PhOder commented 6 years ago

I just thought it'd be possible for people to add information in ways of "load me after/before ". This would result in a dependency graph that could lead to an automatic resolvement for mod load order and hint the player for cyclic dependency problems.

Eventually this could even be solved by finding out what game elements each mod touches and make a dependency resolution graph from this. But implementing this would probably take a while.

If you like the idea but don't have the time to add a feature such as this I'd be willing to take a look at your code and maybe implement something like that myself.

UnlimitedHugs commented 6 years ago

While a neat feature, and something my own mods would benefit of, HugsLib might not be the best place to house it. The reason is that if HugsLib is not loaded or the load order is off, you would still want the rules enforced, and helpful messages to be displayed.

For my own mods, I include the HugsLibChecker assembly that verifies load order and version requirements. If you'd like a beefier and more versatile version of that, you could check out @scuba156 Dependency checker. The project is not finished/up to date, but it could be a good starting point for further work.

scuba156 commented 6 years ago

I've updated the repo for Dependency Checker and its counterpart Dependency File Creator. I'm not sure of the current state they are in.

I may continue it in the future, but your free to use it as you like.

PhOder commented 6 years ago

Almost thought that this wouldn't quite fit in HugsLib. I'll go and check @scuba156 's out. Thanks for hinting me there :+1: