Before you start making plugins, be sure to read this documentation to understand what is required of your plugin in order for it to work properly.
Failure to follow what this doc says can cause your plugin to fail to load, or not work at all!
Plugins can be found inside the \Ashita\Plugins\ folder. Inside here you will find the various .dll files which are plugins. Each plugin should consist of at least 1 .dll file.
Plugins must be uniquely named and compiled against the latest Ashita SDK (known as the ADK) in order for it to be properly loaded.
Failure to compile against the latest ADK will result in your plugin being rejected from loading.
Plugins should consist of a single word name or compressed into a word without spaces or special characters. Users should be able to load them with ease so names with spaces, special characters, etc are not recommended at all.
To get started, you can find an example plugin here: http://delvl.ffevo.net/atom0s/ExamplePlugin
This repository contains a fully implemented example plugin demonstrating and explaining how to use each part of the main plugin base class.
In order for Ashita to interact with a plugin, there must be a few functions exported from a plugin. Those functions are:
The exports have the following purpose:
GetInterfaceVersion
__declspec(dllexport) double __stdcall GetInterfaceVersion(void);
Exported function used to get the interface version the plugin was compiled with.
CreatePluginData
__declspec(dllexport) void __stdcall CreatePluginData(PluginData* lpBuffer);
Exported function used to obtain general information of the plugin.
CreatePlugin
__declspec(dllexport) IPlugin* __stdcall CreatePlugin(char* pszReserved);
Exported function used to create an instance of the plugins main class. (This main class must inherit the IPlugin structure.)
The PluginBase structure is a base class that Plugins must inherit and expose via the CreatePlugin function. PluginBase implements the IPlugin interface so you do not need to worry about casting back to the original interface.
Plugins are required to implement at least the Initialize method in order to load properly. The other functions that can be overridden are not required for a plugin to function properly.
Here is a quick run down of what each function is used for: