[_NOT_ Newbie] Assigning Spec procs to generated objects.

From: Patrick Dughi (dughi@imaxx.net)
Date: 02/01/99


        In a nutshell, I'm trying to think of a good system to adopt so
that I can assign specprocs to generated items - like corpses, mail, etc.

Currently, they're assigned in the following way;
  obj_index[real_object(obj)].func = fname

        However, when real_object(obj) is performed on a unique object, we
get -1, which of course, won't work.  With my current incarnation of
xap_objs, I ran into this problem, and avoided some crashes, i'm sure,
which would have been quite wonderful, had I actually started to assign
spec_procs to these objects.

        I wanted to include an oasis olc addon and I know that some people
(including me) have the ability in their olc to assign specprocs, and
since the individual object editor mimics the normal oediter, it should be
an option.... That brings up a related point -

        Say I take and instead of making an object unique from 'scratch',
I make it off a prototype.  So, we have oh.. i don't know.. a waybread.
The vnum is 10.  Now, when I iedit (that is, use an individual object
editor) that object, I can change all its stats, and its saved exactly
like that on that instance on that object. If I include the ability to set
a spec proc on it though - now to make that work, I have to alter the
global table - suddenly all waybreads (and altered instances of waybreads
- anything with the same rnum) exhibit the property of that specproc.

        This wouldn't be the intended behavior of the action - I just want
that instance to have the proc...

        Possibly it would be better to remove the spec_procs from each
global index, and have their own list (well, three of them to make life
easy, I suppose).....

        This might be easier then, because you'd have an index of
spec_procs you can use, and upon loading your mob, you set the current mob
to point at a spec_proc.  It would make the process of assigning spec
procs online a bit easier, since all you have to do is point at an index.

                Or, any other ideas?
                                                PjD


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



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