Loading and re-editing a plugin

Posted by Shwick on Mon 24 May 2010 09:51 PM — 3 posts, 16,165 views.

#0
I have a trigger that I exported as a plugin, but I want to edit the plugin some more. I deleted the trigger from my world, but it remains in the plugin.

I am having trouble loading the plugin to edit and getting the trigger to appear in the trigger window.

I tried saving the world with the trigger. If I delete the trigger and reload the world, the trigger won't appear in the triggers window.

Also tried importing the plugin using Import -> Load/View Plugins but that didn't work.

Trying to import the plugin's xml file using Import from File thew an error,
"Line 9: Plugin not expected here. Use File -> Plugins to load plugins (problem in this file)"

File -> plugins allowed me to enable the plugin, but didn't load the triggers into my current world for editing.
Amended on Mon 24 May 2010 10:07 PM by Shwick
Australia Forum Administrator #1
Once written, a plugin does not have a GUI interface for editing. However you can usually easily add triggers, aliases etc. by simply:

  • Create one in the normal GUI interface
  • Click on the "Copy" button
    Template:copying
    For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
  • Edit the plugin file in a normal text editor, like Notepad, Crimson Editor, the MUSHclient internal text editor, or another editor of your choice.
  • Paste the trigger (or alias/timer) clipboard into your plugin in the appropriate place. This is generally just before
    or after other triggers.
  • Save the plugin file, and do a "Reinstall" of the plugin inside MUSHclient to get it to be reprocessed.


Most plugins will look something like this:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Plugin_name"
   author="Plugin Author"
   id="d6830bca27e7b6b5089b530a"
   language="Lua"
   purpose="Plugin purpose"
   date_written="2008-10-15 07:35"
   requires="4.30"
   version="2.0"
   >
<description trim="y">
Some description here ...
</description>

</plugin>


<!--  Triggers  -->

<triggers>

... your triggers here ...


The comment line in bold ("<!-- Triggers -->") is a suitable place to paste more triggers, aliases and timers.

If you just need to make minor changes to a trigger you can generally just edit it in the plugin. The various fields (eg. match, send) are usually pretty self-explanatory.
Amended on Mon 24 May 2010 10:16 PM by Nick Gammon
#2
thanks for quick reply