[CODE][RELEASE] dg-script add-in package

From: Mark A. Heilpern (heilpern@MINDSPRING.COM)
Date: 01/01/98


Ok,

I've reached a decent release point for those that would like to get
started with
dg-scripts early. I've posted my work to a web page (url at the bottom of
this mail)
and I've included the readme from the tar.gz here, to help you decide if
you want to
do the download.





readme:
-----------------------------------------------------



You are here because you would like to use DG Scripts in your mud, or at
least wish to experiment with them. If this does not describe you, please
stand in the back of the room so a more interested party can gather
information.

What is this?
  There's been talk about how much better the DG scripts are than
mobprogs. After reading the DG script docs
(http://www.imaxx.net/~thrytis/scripts) it is obvious that there is no
debate here. However, until now, implementing this script system had been
defficult because it was not available as a patch - the only code
available was a complete mud that included them. Making matters worse, the
mud that originally had them was converted to C++, and only a few
CircleMUD implementors seem to also be using C++. So, this tar.gz you've
downloaded is the scripting package removed from the Death's Gate mud.

How do I install it?
  For those of you that just insist upon having a patch, sorry. I didnt
make one. I spent about 15 to 20 hours making things work to what I (for
the moment) call a satisfactory level, and along the way I kept notes
about what I did.  DG_INSTALL is those notes, and with luck I didn't leave
anything out. On the probability that I did, you can email me at
heilpern@mindspring.com to ask me why my directions suck. And if you're
nice about it, and include all the information I would reasonably need to
figure out whats going on, I'll probably help you.


What's different from the docs on that web page mentioned above?
  I think I did a reasonable job of adhering to most of the docs, even
implementing a feature the docs discussed but the original code left out,
in a few places. However, there are some differences. First, I made two
commands that I felt were needed: tlist (to list triggers) and tstat (to
stat a trigger by vnum). Try them, they're simple to understand. Second, I
changed the zone file format slightly. In the trg file, the docs specify
the 3rd line of a trigger as    <type> <number arg>.  This version sets
the 3rd line as   <attach type> <type> <number arg>  where <attach type>
is either 0, 1, or 2, to indicate the trigger is intended to be part of a
mobile, object, or room script, respectively. This is used in stating,
since the codes for <type> are different for the different attachment
types. Finally, rather then even look at how triggers are attached from
the zone files to a mobile/obj/room, I made my own simple mechanism. In
the appropriate zone file, part of the definition allows for (multiple)
lines of the form "T <vnum>" to add the trigger <vnum> to your
mobile/object/room. If you are already using T for something, the way I've
implemented it, this might still work unmodified. (I was already using T
in room definitions, for teleporting rooms.) One caveat, the T entries is
not consistant with their placement. (On hind sight, I see that object-T's
you already have in place will conflict. Sorry -- if you went through the
trouble to add T entries to your objects then you are capable of changing
this.)

So, how do I add these "T <vnum>" things to my world files?
    For mob files, add them after the single "E" which terminates the
    enhanded block.

    For wld files, add them right after the single "S" which terminates
    the room definition.

    For obj files, placing the T-lines before your E-descs worked for me,
    other locations should work with no problem but I havent tested them.



What's next for DG-scripts?
  This release is lacking one thing that will make it useful to the
masses: olc support. I plan to make olc available for this in the very
near future. Olc will take on two issues - first, a tedit command for
making and editing triggers (I', renaming my existing tedit command which
edits text files to fedit), and second, giving OasisOLC's
medit/oedit/redit commands the ability to add triggers to a script (with
an S menu item in each).

What is the impact of not having olc support?
  One large gotcha: if you add T-lines to your existing mob/obj/room
files, and then save that file from Oasis/Obuild/your own editor, you will

lose the T-line information. This is because the save_to_disk() rouotines
are not trigger-aware. It's a fairly simple addition to put this in the
code but I decided to wait until olc was fully supported, and to make this
available as a pre-release.




The non-olc version of dg-scripts can be found at:
http://equoria.com/~mud/code/dg_scripts-noolc.tar.gz


If you use this code and find errors or omissions, please email
heilpern@mindspring.com with what you had to do to make things work.


Mark A. Heilpern (Sammy of eQuoria.com:4000, a soon-to-be-open mud)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST