[MUD-Dev] Modeling spells/skills as collections of affects

Shawn Halpenny malachai at iname.com
Tue Sep 9 17:06:10 CEST 1997


On Sat, 6 Sep 1997, Dan Shiovitz wrote:

[ affects, Affects, snoops & watchers with priorities ]

[ wearing always-hit shoes and miss-10% belt ]

> I'm not quite clear on why spoofs are a good idea, though. It seems like
> replacing the entire object just to modify its hitroll (or whatever) is a
> bit excessive; can't you just have a list of affects on the object and ask
> each of them if they modify its hitroll, and have queries about the
> object's hitroll receive a consolidation of all that information?

That's the somewhat like the I'm examining.  Affects are objects that
are attached to the object they modify.  When that object processes a
command, it pokes each modifier attached to it, allowing it to change
the attributes used by the command by some amount (and optionally
output a message and optionally do pretty much anything else it wants
to).  

I gather that it's very similar in that respect to a spoof.  Instead
of priorities, I'm considering using the time at which the modifier
was attached to the object.  Each modifier will be processed in order
of newest to oldest, implying that the newest modifiers are the
"strongest" since their effects have had less time to degrade.	Every
modifier gets called.  The drawback, of course, is that (using an
example above), you can affect how your attributes are modified
depending on which order you put your shoes and belt on.  I think
every modifier needs to be called (since it allows some interesting
and possibly useful effects--as below), but if you add priorities,
someone has to establish what those are (which means a set of
guidelines, or some base principles--ugh).

* The post a wee bit ago about tying a rope to an object could be done
something like this:

- Bubba tries to move a rock, but find he can't get a grip on it
  (let's say that the rock determines his dex must be 20 to move the
  rock) Bubba ties some rope to the rock (the rope creates an
  I-have-a-rope-tied-to-me modifier and attaches it to the rock. 
  There's also some virtual container or some such magic going on
  that associates the actual rope object with the rock as well so
  they move as one entity.)
- Bubba pulls the rope and the rock moves (the rock receives a
  message to be moved (probably came from the rope) and queries its
  list of modifiers.  Rock sees the rope modifier and calls a method
  on it that lowers the dex required by the action by 3 (and perhaps
  spews out a message fragment about being able to move the rock now
  that the rope is tied to it).  Execution returns to the move rock
  method and the action succeeds since Bubba's dex was 17.)

This lets you tie that rope to anything and pull it around.  The rope
doesn't have to know anything about what it's tied to as long as the
verbs on that object can pass the required attributes to the rope
modifier so they can be modified if necessary.

--
Shawn Halpenny

"You can't buy the necessities of life with cookies"
                                    - "Edward Scissorhands"




More information about the mud-dev-archive mailing list