Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Splitting up my plugin

Splitting up my plugin

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Gore   (207 posts)  Bio
Date Mon 21 Nov 2005 02:08 PM (UTC)
Message
Yeah so, my healing plugin for my mud is around 9500 lines of code and is wicked hard to sort through when doing updates.

Is there anyway to split it up into different files, i.e. queue.vbs then load those files into my main plugin?

So I could have

mainplugin.xml

which incorporates

queue.vbs
queuetriggers.xml
plants.vbs
planttriggers.xml

etc?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 21 Nov 2005 07:45 PM (UTC)
Message
Sure you can. The plugin wizard normally generates one for you, namely this line:


<include name="constants.vbs"/>


This is how you include other files.

Have a look inside that file for the general format of included files. It will be something like:


<?xml version="1.0" encoding="UTF-8"?>

<!-- Some comment here -->

<!DOCTYPE script>
<script>
<![CDATA[

' your scripts here

]]>            
 </script>



Triggers and aliases would be similar except you don't need the CDATA stuff, so it might be:


<?xml version="1.0" encoding="UTF-8"?>

<!-- Some comment here -->

<!DOCTYPE triggers>
<triggers>

<!-- Some triggers here -->

 </triggers>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Gore   (207 posts)  Bio
Date Reply #2 on Tue 22 Nov 2005 12:58 AM (UTC)
Message
You are a life saver. Thank you :D
Top

Posted by Gore   (207 posts)  Bio
Date Reply #3 on Tue 22 Nov 2005 11:14 AM (UTC)
Message
I'm assuming I can include xml files and the like, right?
Top

Posted by Gore   (207 posts)  Bio
Date Reply #4 on Tue 22 Nov 2005 12:54 PM (UTC)
Message
sweet nevermind that.

To put aliases and triggers in one of my include files, do I need to do DOCTYPE Triggers, then Aliases? I'm pretty ignorant when it comes to XML. Or would I be like, DOCTYPE Triggers and Aliases?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 26 Nov 2005 05:45 AM (UTC)
Message
I don't think the doctype matters much.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,326 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.