Is it possible to ensure that one plugin is loaded before another? I have an ATCP plugin that begins ATCP negotiation with the server upon connecting, and I have other plugins that might require a certain ATCP module. However, I need to notify the ATCP plugin of these modules -before- connecting, otherwise I can't enable them at all.
I considered having the dependent plugins notify the ATCP plugin during the plugin installation, but there's no way I know of to be sure that the ATCP plugin has loaded by the time the dependent plugin's OnPluginInstall function runs.
This wouldn't really be a problem, I believe, if the plugins were all loaded before any OnPluginInstall routines were run. In that case, the functions, variables, et cetera would have already been loaded into memory, even if the on-install handler hadn't been run yet. However, I did a quick test by adding Note()s into the plugin scripts, one in the global space and one in the install handler. I ctrl-clicked the two plugins in the plugin list, and ReInstalled them. When one plugin was loaded, its on-install handler was called, and only then did it move to the next plugin.
So, I guess my request is: how can I guarentee that a plugin has been loaded before another? I don't really want to deal with LoadPlugin(), because it's somewhat vague and requires a filename (which can vary in this case, because the plugins could be anywhere and it would be a pain for people who use the plugin to fix).
I considered having the dependent plugins notify the ATCP plugin during the plugin installation, but there's no way I know of to be sure that the ATCP plugin has loaded by the time the dependent plugin's OnPluginInstall function runs.
This wouldn't really be a problem, I believe, if the plugins were all loaded before any OnPluginInstall routines were run. In that case, the functions, variables, et cetera would have already been loaded into memory, even if the on-install handler hadn't been run yet. However, I did a quick test by adding Note()s into the plugin scripts, one in the global space and one in the install handler. I ctrl-clicked the two plugins in the plugin list, and ReInstalled them. When one plugin was loaded, its on-install handler was called, and only then did it move to the next plugin.
So, I guess my request is: how can I guarentee that a plugin has been loaded before another? I don't really want to deal with LoadPlugin(), because it's somewhat vague and requires a filename (which can vary in this case, because the plugins could be anywhere and it would be a pain for people who use the plugin to fix).