There a Plugin How To site? If there isn't could you briefly describe "exactly" what to do for a basic plugin that includes Scripts, Aliases, and Triggers?
How-To?
Posted by PJ on Tue 21 Jan 2003 02:59 AM — 6 posts, 24,348 views.
There isn't much to it. Make and test your scripts, aliases and triggers using the normal GUI interface, and then when it is working use the Plugin Wizard to copy them into a plugin file. This removes them from your main world to avoid duplication.
You get to choose which triggers, aliases etc. are moved to the plugin, and can edit the script to remove stuff that isn't relevant to the plugin.
If you are using script calls that rely on the plugin being a plugin you might have to do most of it in the GUI and then tidy it up by editing the plugin file once it has been produced. However most simple plugins can be done that way.
If you aren't sure, try a simple one to start with, backing up your world file before you start, in case you want to redo it.
You get to choose which triggers, aliases etc. are moved to the plugin, and can edit the script to remove stuff that isn't relevant to the plugin.
If you are using script calls that rely on the plugin being a plugin you might have to do most of it in the GUI and then tidy it up by editing the plugin file once it has been produced. However most simple plugins can be done that way.
If you aren't sure, try a simple one to start with, backing up your world file before you start, in case you want to redo it.
I've wondered about the same thing, Monkey. Arrived at the same answer that Nick gave you already - not much to put on website.
Personally I prefer to write plugins from scratch (in a text file) and then just remove whatever I use from the world file. For some reason I feel much safer when doing it that way :)
If you want to learn how to write a plugin, then there's an easy way to learn how to do it.
1. Look through the sample plugin's text. It is included in the recent versions of MC. Check the syntaxt and marvel at its simplicity. Carefully read the instructions, especially the part about the 'id' attribute.
2. Start writing plugins. When you don't know the exact syntax for something (like a timer), check step 3...
3. Open a world file (.mcl) in a text editor. search for a component you want (e.g. a timer) and check the syntax.
That's how I do it and it has never failed me so far.
Disclaimer: My not using MC's Plugin Wizard has nothing to do with any functional specifics of the said Wizard - in fact I've never used it, so how would I know about any of its specifics? It is explained by my strange fear of anything that requires me to press buttons and results in textual output. For exactly the same reason I never use HTML editors :P
Personally I prefer to write plugins from scratch (in a text file) and then just remove whatever I use from the world file. For some reason I feel much safer when doing it that way :)
If you want to learn how to write a plugin, then there's an easy way to learn how to do it.
1. Look through the sample plugin's text. It is included in the recent versions of MC. Check the syntaxt and marvel at its simplicity. Carefully read the instructions, especially the part about the 'id' attribute.
2. Start writing plugins. When you don't know the exact syntax for something (like a timer), check step 3...
3. Open a world file (.mcl) in a text editor. search for a component you want (e.g. a timer) and check the syntax.
That's how I do it and it has never failed me so far.
Disclaimer: My not using MC's Plugin Wizard has nothing to do with any functional specifics of the said Wizard - in fact I've never used it, so how would I know about any of its specifics? It is explained by my strange fear of anything that requires me to press buttons and results in textual output. For exactly the same reason I never use HTML editors :P
That'd be why, I never searched through the menu bars enough to notice a plugin wizard.. Lol, thanks Nick, thanks Ked for alternative..
I tend to agree Ked. Punching buttons is good only when you can tell what it is doing. lol In my case I created a plugin to handle something I didn't want in my main script using the wizard and lost about 20 triggers that where auto-deleted when the plugin was generated. My main world handled the messaging, but the new plugin used the same triggers to handle generation of a custom generated status display. Was a major 'woops!'. lol Needless to say you have to be quite sure that you know what removing a trigger or alias from the main world is going to effect before doing it that way. Coding from scratch is safer and helps anyway, since you learn how to properly code one for when you end up needing to edit or add something to it. ;)
Actually, shadowfyr, that is VERY easily fixed, as you can paste the triggers you want from the plugin into mushclient by copying and hitting the "paste" button... just don't forget to add <triggers> and </triggers>