Some plugins are a lot easier to develop and maintain when they're broken up into multiple files, and I recently came up with a simple structuring paradigm to help achieve this. It's similar in concept to World of Warcraft's addons.
First, an example:
Under this structural paradigm, every plugin is contained within its own folder (which itself should be under plugins/). The main plugin XML is contained within plugin.xml, which you might relate to a .toc file in World of Warcraft. And the resources are contained in a further subfolder, named resources/ in this case.
The plugin's folder is suffixed with '.plugin' to differentiate it from normal folders. 'plugin.xml' is thusly named so that an automated tool could be told to "install Gauges", and it would look for Gauges.plugin and install its plugin.xml. 'resources' is an arbitrary name that simply explains its content decently, containing plugin-specific, non-script-file resources.
A plugin can access anything within its folder simply by using GetPluginInfo(GetPluginID(), 20), and concatenating the desired file/resource.
This isn't really a question nor a suggestion, but I like the structure this gives me, and I figured I may as well let everyone else know, in case they want to use it.
First, an example:
Gauges.plugin/
plugin.xml
resources/
endurance.bmp
exp.bmp
gauges.bmp
health.bmp
mana.bmp
willpower.bmpUnder this structural paradigm, every plugin is contained within its own folder (which itself should be under plugins/). The main plugin XML is contained within plugin.xml, which you might relate to a .toc file in World of Warcraft. And the resources are contained in a further subfolder, named resources/ in this case.
The plugin's folder is suffixed with '.plugin' to differentiate it from normal folders. 'plugin.xml' is thusly named so that an automated tool could be told to "install Gauges", and it would look for Gauges.plugin and install its plugin.xml. 'resources' is an arbitrary name that simply explains its content decently, containing plugin-specific, non-script-file resources.
A plugin can access anything within its folder simply by using GetPluginInfo(GetPluginID(), 20), and concatenating the desired file/resource.
This isn't really a question nor a suggestion, but I like the structure this gives me, and I figured I may as well let everyone else know, in case they want to use it.