<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] Modeling spells/skills as collections of affects --> <!--X-From-R13: pynjerapNphc.uc.pbz --> <!--X-Date: Thu, 04 Sep 1997 23:50:44 +0000 --> <!--X-Message-Id: 199709042348.QAA04028#xsvr3,cup.hp.com --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199708312324.3515400#bedford,net --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] Modeling spells/skills as collections of affect</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:clawrenc#cup,hp.com"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg01100.html">Previous</a> | <a href="msg01102.html">Next</a> ] Thread: [ <a href="msg00931.html">Previous</a> | <a href="msg01116.html">Next</a> ] Index: [ <A HREF="author.html#01101">Author</A> | <A HREF="#01101">Date</A> | <A HREF="thread.html#01101">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] Modeling spells/skills as collections of affects</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] Modeling spells/skills as collections of affects</LI> <LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI> <LI><em>Date</em>: Thu, 04 Sep 97 16:12:07 -0700</LI> <LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> In <<A HREF="msg00927.html">199708312324.3515400#bedford,net</A>>, on 08/31/97 at 06:41 PM, "Brian Price" <blprice#bedford,net> said: >In the codebases I've seen thus far, spells and skills are largely >hardcoded. I would like to implement a system where they were >instead parameterized and stored in the mud's database. I don't recall if you joined before the thread on Bartle's Waving Hands magic system. Its worth looking at. >One approach >to this would be to describe spells and skills as a collection of >event-dependant affects. To implement this, the definition of >affects would need to be expanded a bit, for example, a mud object's >location would be an affectable state. Also, there would need to be >a system of events which would trigger the various affects. This is slightly ambigious. On the one hand are event driven or reactionary systems as suggested by your referencing to "triggering" of affects, and is that of some form of standarised and flexible model for applying temporary or layered macro-modifications to an object. The two areas are fairly tightly coupled, but remain distinct. To date the model side has gotten the most interest/traffic. Handling the layering concerns, as mentioned below, ended up wandering off into the bushes and diesing. The model topic was debated and discussed heavily in this list in the early parts of last year (AlexO, Wout, ChrisG, and myself as I recall). Several competing models were proposed and championed, variously named "affects", "Affects", and "spoofs and watchers". The following is what I recall of the definitions. If there's sufficient interest I'll dig up the original messages and correct as needed as I'm a little sloppy on the affect vs Affect bit: affect -- Wout's proposal taken from Merc? A named set of attribute weightings applied to a player object. An affect simply added its attribute values to the matching attribute values of the original object. As such an affect might increase a players max_strength by 5 while costing them 20hps for the pleasure. Affect -- AlexO's contribution? A named set of attribute weightings and full function bodies (weak OO model) which could be applied to a player or other object. An Affect added its attribute weightings to the matching attribute values on the object. Functions opaquely overlaid any prior methods of that name. A later extension had Affects functions instead creating little function lists as they were applied. Thus prior versions of the function could be called from a given Affect's version of the function. Spoofs and Watchers -- My contribution. A spoof is an object that replaces another object (assumes the other object's ObjectID), while retaining a copy of the original object under a different (temporary) ObjectID. The intent of a spoof is that all messages sent to the original object would instead be intercepted by the spoof object. The spoof object could then process the messages however it wished, passing them on as necessary, edited or not, to the original object. Mechanically a spoof object is indistinguishable from the original object it is replacing, in this manner a spoof essentially acts as a hidden filter between the message sender and the original object, where the filter intercepts all messages and may kill, rewrite, divert, or otherwise edit them. Watchers on the other hand are a two part affair consisting of a "Watch" and a "Watcher". A Watch is an entry made against an object (and stored with the object) that notes that upon any state changes to that object an I_HAVE_CHANGED message is to be sent to a specified second object known as the Watcher. Thus there is one object that changes, and another object (the Watcher) which watches the first object and reacts to its changes. A point to note is the model difference in their concept of a ctor and dtor. affects are trivially simplistic, merely adding the values on ction, and subtracting them on dtion. Affects actually "popped" off their objects, much like a stack machine. Spoofs generally have simplistic ctors and dtors which merely restore the original ObjectID to the spoofed object. A weakness which impacts all these models is the concept of implicit ordering and detection of side-effects between multiple applied affects/Affects/spoofs (can he be a near FireGod _and_ a water sprite _and_ terribly sleepy?). I do not recall that any decent solution was arrived at. My current partial solution is to use priority values for spoofs. Spoofs then attempt to order themselves via insertion at install time on an object in priority order such that any message to the object goes to the lowest priority object first, then the next highest etc until the true original object is reached. >Has such a system been implemented elsewhere? If not, any thoughts >on how such a system could/should be implemented? In the general case, just the above. I'd recommend digging up the original threads surrounding the Great God GooGoo/Castle Krak/Elven Forest scenario which is what I used to benchtest and excercise my spoof model. If requested I can repost key bits here. I recall (? dream?) that AlexO used to maintain slightly threaded archives during that period of the list. He might also be a useful resource. -- J C Lawrence Internet: claw#null,net (Contractor) Internet: coder#ibm,net ---------------(*) Internet: clawrenc#cup,hp.com ...Honorary Member Clan McFUD -- Teamer's Avenging Monolith... </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="01116" HREF="msg01116.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong> <ul compact><li><em>From:</em> Dan Shiovitz <scythe#u,washington.edu></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00927" HREF="msg00927.html">Modeling spells/skills as collections of affects</A></STRONG> <UL><LI><EM>From:</EM> "Brian Price" <blprice#bedford,net></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg01100.html">Re: [MUD-Dev] MUD universe</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg01102.html">Re: [MUD-Dev] Alignment</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00931.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg01116.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#01101"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#01101"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: [MUD-Dev] Modeling spells/skills as collections of affects</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <LI><strong><A NAME="01229" HREF="msg01229.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 16 Sep 1997, 20:39 GMT </LI> </ul> </ul> </LI> <LI><strong><A NAME="00927" HREF="msg00927.html">Modeling spells/skills as collections of affects</A></strong>, Brian Price <a href="mailto:blprice#bedford,net">blprice#bedford,net</a>, Mon 01 Sep 1997, 01:41 GMT <UL> <LI><strong><A NAME="00928" HREF="msg00928.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Mon 01 Sep 1997, 02:21 GMT </LI> <LI><strong><A NAME="00931" HREF="msg00931.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Mon 01 Sep 1997, 03:17 GMT </LI> <LI><strong><A NAME="01101" HREF="msg01101.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 04 Sep 1997, 23:50 GMT <UL> <LI><strong><A NAME="01116" HREF="msg01116.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Dan Shiovitz <a href="mailto:scythe#u,washington.edu">scythe#u,washington.edu</a>, Fri 05 Sep 1997, 23:49 GMT <UL> <LI><strong><A NAME="01131" HREF="msg01131.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 06 Sep 1997, 16:25 GMT </LI> <LI><strong><A NAME="01170" HREF="msg01170.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Tue 09 Sep 1997, 21:06 GMT <UL> <LI><strong><A NAME="01194" HREF="msg01194.html">Re: [MUD-Dev] Modeling spells/skills as collections of affects</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Fri 12 Sep 1997, 19:12 GMT </LI> </UL> </LI> </UL> </LI> </UL> </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>