Dependency Declaration [Suggestion]

  • At this moment all plugins are loaded alphabetically. That means that if one plugin depends on another one as a library or content source - it should have specific name to load after that plugin. That will cause problems if there will be several plugins that depends on each other, and it will cause issues in case of mod.io integration when user will be forced to manually fix appearing conflicts.


    My suggestion is to define a small addition into plugin.yml that specifies dependencies and optional dependencies. These lines will be optional (so compatibility with already created plugins will not broke), but if they are defined the game will load these plugins only after target plugins were loaded. If plugin defined in dependencies is missing the game should show user error message about that, if optional dependency is missing plugin should just load normally.


    Clearly specified dependencies should help a lot in plugin development, and that also removes any problems for user in plugin installation since the load order is defined by plugins themselves

  • Having a way to define dependencies would be indeed quite useful (especially being able to show an error to the user if a dependency is missing is very helpful) :) :thumbup: It's on our to-do list, but the next update will introduce at least an optional loadorder that can be defined in the plugin.yml: This way plugins can influence the order in which they're loaded. By default the load order is 0 (causing all plugins to be loaded alphabetically), but setting a negative value, for example, forces the game to load that plugin earlier (a positive value, on the other hand, forces the game to load the plugin later). So if a plugin serves as a library, for example, it could use a very low value for the load order (e.g. -1000000), while a plugin with many dependencies could use a high value as a precaution (to make sure it's loaded last).


    This is definitely not a replacement for proper dependencies, but it will still help in situations where the alphabetical order causes trouble ^^

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!