I've been working on creating Plugins for my mod to support something like map integrations for the different map mods out there, which makes it hard to keep track and maintain all the plugins you have for all the different things. (by plugins I mean mods, which require my mod and the other mod via requiredAddons[] in the config.cpp to extend my mod)
A while ago many Modders started to add #defines to their mods making it easier to add mod support right in the main mod, but it depends on loadorder, which sometimes cannot be altered correctly, because of how the loading of PBOs works. A workaround which seems to work pretty well is to do this in the config.cpp:
class CfgPatches { class MyMod { units[]={}; weapons[]={}; requiredVersion=0.1; requiredAddons[]={ "DZ_Scripts", #ifdef PVEZ "PVEZ", #endif "RPC_Scripts" }; }; };
This seems to work for most of the people, but is far from optimal and also does not work reliably.
So my suggestion would be to add optionalAddons to the CfgPatches in addition to requiredAddons which loads the Addon first if it was found and the continue with the current Addon. It would make extending mods depending on which other mods are loaded much easier