View Full Version : How to write plugins?
S0mbre
10-22-2008, 11:34 PM
Hi everyone!
A question to the "seasoned" developers for AMS: How can one write a full action plugin for AMS, so that it is seen in the Project -> Plugins dialog and in the Actions wizard (its functions)?
I've noticed that a plugin is basically an .lmd file contained in the Plugins\Actions\[Plugin name] folder (together with a small text .lic file). How is that LMD file written? Is it a kind of lua-coded text file or what?
Thank you in advance.
HMMurdock
10-22-2008, 11:57 PM
The .lmd files are actually .dll files that are (someone correct me if I'm wrong) Compiled in C++
To learn more about creating plugins, search the forums for "Plugin Development Kit" and download the SDK.
RizlaUK
10-23-2008, 04:54 AM
yes, the c++ functions are mapped into the lua engine, c++ is not easy to learn even with the SDK, you need to know c++ and some lua API in order to write action plugins, i'll be honest, it still baffels me!
Centauri Soldier
10-23-2008, 11:26 AM
It would be really cool if someone who new who to write plugins could write a GUI (in AMS) that would offer certain options and then generate the C++ code needed to make the plugin and maybe even compile it...now that would be smooth.
S0mbre
10-23-2008, 11:25 PM
It would be really cool if someone who new who to write plugins could write a GUI (in AMS) that would offer certain options and then generate the C++ code needed to make the plugin and maybe even compile it...now that would be smooth.
That's what I was dreaming of... It wouldn't be that difficult to realize, once API and C++ functions can be translated into Lua. I do know some C++ (not much) and some Delphi, but, honestly, I'd be better off coding in Lua or Python or PHP, at least :)
Thank you, guys!
ShadowUK
10-24-2008, 12:19 AM
That's what I was dreaming of... It wouldn't be that difficult to realize, once API and C++ functions can be translated into Lua. I do know some C++ (not much) and some Delphi, but, honestly, I'd be better off coding in Lua or Python or PHP, at least :)
Thank you, guys!
You can write plugins in Lua format too. Just some people don't agree with me but a plugin is actually just an addon to add more functionality to software, Not a dll.
S0mbre
10-24-2008, 07:23 AM
I've downloaded IR's SDK and was confirmed that the lmd files are indeed DLLs. But jee! writing those DLLs! I think I'll give up the idea for now :) :) wouldn't mess with it, for one.
To ShadowUK: If it is possible to write a plugin in Lua, i'd like to find out how to do it. I think I've seen such a plugin (the Database plugin posted recently). What it does, it adds the Actions XML file to the Data\Actions folder and appends the functions to the Includes\_notification_messages.txt file. But what's wrong with this (indeed simple) way is that every time the application starts, it shows a dialog with the function elements...
To recap, I think, the way to develop AMS plugins is here, in the second mode. There should a way to make a simple GUI applet that would let users to simply write the familiar Lua code into specific fields, press buttons (like "Compile") -- and never worry about DLL mapping, calling conventions, PASCAL language, MFC, header files, helper functions, buffer size management, memory overflow - and the like things which can make even the seasoned coder go grey!
ShadowUK
10-24-2008, 08:10 AM
I've downloaded IR's SDK and was confirmed that the lmd files are indeed DLLs. But jee! writing those DLLs! I think I'll give up the idea for now :) :) wouldn't mess with it, for one.
To ShadowUK: If it is possible to write a plugin in Lua, i'd like to find out how to do it. I think I've seen such a plugin (the Database plugin posted recently). What it does, it adds the Actions XML file to the Data\Actions folder and appends the functions to the Includes\_notification_messages.txt file. But what's wrong with this (indeed simple) way is that every time the application starts, it shows a dialog with the function elements...
Delete the Dialog.Message at the end.
To recap, I think, the way to develop AMS plugins is here, in the second mode. There should a way to make a simple GUI applet that would let users to simply write the familiar Lua code into specific fields, press buttons (like "Compile") -- and never worry about DLL mapping, calling conventions, PASCAL language, MFC, header files, helper functions, buffer size management, memory overflow - and the like things which can make even the seasoned coder go grey!
Of course, But what are the chances.
Imagine Programming
10-24-2008, 09:03 AM
You can write plugins in Lua format too. Just some people don't agree with me but a plugin is actually just an addon to add more functionality to software, Not a dll.
agreed, but still, it would be nice to be able to write object plugins ^_^
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.