Splitting up my plugin

Posted by Gore on Mon 21 Nov 2005 02:08 PM — 6 posts, 23,964 views.

#0
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?
Australia Forum Administrator #1
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>

#2
You are a life saver. Thank you :D
#3
I'm assuming I can include xml files and the like, right?
#4
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?
Australia Forum Administrator #5
I don't think the doctype matters much.