Hi there,
I am writing a mod that keeps track of plugin dependencies and reloads mods according to their dependencies.
It occurs to me that this really shouldn't be a mod but part of Oxide itself.
If I have a ton of dependencies set up, I have to let the server load every mod completely, then reiterate over them to ensure it was loaded in the correct order. This is an unnecessarily complicated and messy process.
This problem could be solved in two ways, both by providing a configurable plugin load order. Either I give my dependency manager mod priority which forces it to always load first (therein allowing me to check dependencies as the server boots), or I let the dependency manager build the entire Load Order which therefore removes the need for a run-time dependency manager et all.
So, like other popular modding frameworks, would it be possible to get a configurable load order (perhaps stored as a JSON file like the user data)?
[DOUBLEPOST=1438113475,1438104764][/DOUBLEPOST]Load order is referenced at server start and when using "oxide.reload *"/ReloadAll
We don't need to be able to check plugin dependencies on an individual plugin Reload. Simply using the Load Order as an initialization/ReloadAll vector would suffice. A mod could handle all runtime dependencies using the hooks you have already added.
Request Configurable plugin load order
Discussion in 'Feature Suggestions' started by Calytic, Jul 28, 2015.
-
Calytic Community Admin Community Mod
-
C# Plugins already support plugin dependencies as far as I know. Overall though I would say plugins should be able to handle if their dependencies are not loaded yet. I don't see the benefit from adding it into core. Oxide is open source so feel free to submit a pr with the changes needed to add plugin dependencies: https://github.com/OxideMod/Oxide
C# Magic comment requires.
//Requires: PluginName
//Requires: PluginName -
Wulf Community Admin
Plugin dependencies would be better than a user-configured load order, and as Hatemail mentioned, you can already add dependencies in C# plugins.
-
Calytic Community Admin Community Mod
Alright cool! Is the dependency magic on the roadmap in the non-C# modules? I assume the answer to that question is yes.
Thanks. -
Wulf Community Admin
-
HI!
Would there be a way to interact with oxide to define a plugin load order ? -
Wulf Community Admin
-
My plugins are not loaded from A to Z, i don"t know why. I need to some of them load it in a certain order
-
Wulf Community Admin
-
-
But would be a nice feature, to handle plugins using duplicate commands. Would be easier than editing the plugin code.
I assume the last plugin get the hook ?
Or maybe use a new plugin naming format like :
Code:0-plugin1 0-plugin2 0-plugin3 1-plugin4 1-plugin5 1-plugin6 2-plugin7 3-plugin8 etc.
But would need the cooperation of all plugin devs. -
Wulf Community Admin
Changing the load order is not a solution for duplicate commands. The plugin devs should either not be using commands that are that generate, server owners shouldn't be using plugins that handle the same things, or plugins devs should offer an option in the config to change commands. It's the responsibility of the server owner to know what commands the plugins they are using provide and change or request changes as needed. -
Changing the plugins filename resolved this for me so thanks for that, but it would be nice if they did allow a user to specify a plugin order because there are case scenarios where it's not a dependency issue . For instance i'm working on a stats plugins and because of load order, another plugin that modified gather amounts was loading after my plugin and therefore my plugin stats were incorrect.