1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: let's call it a spellcraft -->
<!--X-From-R13: "dhmnu Mfbgsubzr]" <dhmnuNfbsgubzr.arg> -->
<!--X-Date: Wed, 23 Sep 1998 16:20:27 &#45;0700 -->
<!--X-Message-Id: 01bde749$4b1a8520$2e87ebcd@k6 -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: let's call it a spellcraft</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:quzah#softhome,net">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg01166.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01168.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01160.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01171.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01167">Author</A>
&nbsp;|&nbsp;<A HREF="#01167">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01167">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: let's call it a spellcraft</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] Re: let's call it a spellcraft</LI>
<LI><em>From</em>: "quzah [sotfhome]" &lt;<A HREF="mailto:quzah#softhome,net">quzah#softhome,net</A>&gt;</LI>
<LI><em>Date</em>: Wed, 23 Sep 1998 16:24:21 -0700</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
From: Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt; on Tuesday, September 22, 1998
at 8:39 PM
Subject: [MUD-Dev] Re: let's call it a spellcraft

[Since this is a reply to a two-in-one-reply, the quoting is a
 bit odd, but I think I've got it all worked out. -Q-]

In addition to the above, I replied to this in an odd order, (I
started at the bottom after I had read through the message, and
wrote my reply to something near the bottom first, so, hopefully
it makes sence. Heh.


&gt;OK, I want to create the 'Apocalypse' spell, destroying every player in
&gt;the area of effect, except myself.

&gt;
&gt;And at the same time I joined the game 5 minutes ago.
&gt;
&gt;How are you going to define the limitations on the spell being created?

[snip]

&gt;What about the side and cumulative effects of the variouse spell
&gt;components?
&gt;How about creating a complex spell by sequencing some simpler spells and
&gt;setting a proper timing for them (I guess, that was discussed here
&gt;before)?


You'd just have to write some sort of spell editor, and allow
the user to dump more and more effects into the spell. I would
do it so the order they are added (effects) decides the fireing-
order of the spells effects. Example:

   (1) define base magical realm for the spell (its power source)
       this could limit the things you could add to the spell.
       you could also allow for multiple power sources (ie: many
       components)
   (2) define triggering mechanism (spoken words, just thoughts,
       a full drawn out dance, whatever) Perhaps depending on the
       realm, you have to do X, or you cannot do X, or X gives it
       Y amount of additional power, or whatever. You [the game
       designer] would have to work that out ahead of time.
   (3) define any saving throws/checks needed (say, the more of
       a chance you give it to fail [more saving throws] then it
       would be easier on the caster or whatever. Again, GD's
       choice.
   (4) add effect [effect_type, effect_duration, effect_amount]
   (5) repeat step (4) until you have your spell made.
   (6) name it.

Shrug. Anyway, there's another way you could do it. Then, the
way I'd do it is that they would trigger (the effects) in the
order they were put onto the spell, however, depending on if
you had a delay on them or not (effect_delay) they would be
added to (in my case) the global effect list in their "time I
trigger" order. So... if I the spell I made had 100 things
that were its effects, they would be checked in the order they
were added to the spell, however they would "fire" in the order
they fell in the world's effect list. (Not necessarily in the
order the creator of the spell thought they would)


&gt;Like, I can feel the opponent going to cast a fireball on me, so I fire
&gt;the sequence of "magic mirror" on myself and "Dispel heat resistance" on
&gt;him?
&gt;

&gt;How would you define the necessity of some material component for the
&gt;spell? See, if you just say "I want this spell to require the feather"
&gt;and that's it, it's not fun, but if you say "This spell requires a
&gt;feather because...", it's completely different.


It was just a rough example. You would have to define an element table
of sorts, giving specific attributes to each element. Or perhaps, in
define a set of magical realms/bases/origins that have specific element
lists that they derive their power from. Then, to use X type of magical
element, you need to be sure to provide a source from which to grab the
magical power. (In this case, we used soap and a feather, so let's say
that they fall into the "fire_plane" element table.

How would people know what fell into what? Make them play around and
find out. Hide tomes, describing bits of arcane knowledge, there are
a multitude of things you could do. I was just tossing out a very basic
example.

And like I said, it would have to be something you worked into your
spell model/engine/physics.


&gt;[Vladimir Prelovac]
&gt;&gt; He would then give it a name, write it to his spellbook, and maybe teach it
&gt;&gt; to his friends. That way the new spell, carrying the name he gave it, would
&gt;&gt; be tought in the lands for generations after.
&gt;
&gt;Good idea, tough to implement, though ;-)


No, it should be really easy. I would save no "in game" spells. The
world would have no spells that it came with, were I doing it. Then,
players would just have the spells saved in their player file. Some
thing simple, like so:

SPELL
(name) (element) (componants) (magic words) (gestures/etc) (etc...)
END

Then, they'd just load with the player, and to teach someone the
spell, you'd just have to make a scribe skill, or some such thing.


&gt;Now, some afterthoughts.
&gt;
&gt;[Quzah]
&gt;&gt; I have in mind a much simpler effect list. Basically, there are
&gt;&gt; only a very very few things that a spell can do:
&gt;
&gt;&gt; Lower X
&gt;&gt; Raise X
&gt;&gt; Set X to Y
&gt;
&gt;I presume that X and Y are properties (for clarity sake, sometimes
&gt;they're called attibutes, or stats).


Nod. I am going to use the above for the entire game. I have
decided to try and rid the game of all pre-built commands and
what not. Basically, I am going to make a "cause and effect"
sort of "engine" if you will, add to that a terrain generator
and something to save/load/handle_connections, and call it a
day. Then, (ideally) I'll do the same thing as described with
the spells, and apply it to all of the things you would do in
a typical game day.

Naturally, you'll have to set up some constants in the game,
things like a "character sheet" or whatever, and some things
like element tables (which list properties of X_element) and
the like. Things from which you can grab bits of info that
you need to successfully execute a command.


&gt;Now, can you give me a real example when Y can be _set_ to X, unless
&gt;it's boolean? Also, let's consider this:


Sure, here are a few types real quickly:

spell_random_teleport:  SET( character-&gt;room_i_am_in, random_room );
spell_quicksand:        SET( room-&gt;floor_type,  FLOOR_QUICKSAND );
spell_evaporate:        SET( water_barrel-&gt;liquid_amount, ZERO );

Shrug. Just a few. Bascially, anything that is not a damage/heal
type of thing, is a "set_to" type of thing. If you are not just
altering it by a known amount, then you do specific "set_to" stuff.
At least that is how I see it, and I think it will work great.


&gt;1. You scratch your hand, have some temporary disability (can't put your
&gt;hand into boiling water), but it will heal off by itself.
&gt;2. You accidentally miscalculate your axe swing and chop off your hand.
&gt;You can't fix it unless you go to the surgeon with a lump sum and he
&gt;sews it back, or you use magic to grow a new hand.
&gt;
&gt;Here you have the example of the vanishing effect and permanent effect.
&gt;Unfortunately, the vanishing effect could be pretty
&gt;calculation-intensive (especially if you go into extremes like the
&gt;trajectories - say, it may be half-decay, or linear, or whatever else),
&gt;but I believe the abovesaid is a good _generic_ way to handle the
&gt;property changes and hopefully can be optimized (here's a callback to
&gt;the event handling discussion).
&gt;
&gt;[actually, all abovesaid is a simplified version of property handling in
&gt;Gradient MUD, dormant at the time]
&gt;
&gt;Also, there are effect dependencies, like - if you chop off your hand,
&gt;you start bleeding until you either fix it or die from the blood loss,
&gt;not counting the original effect ;-)
&gt;
&gt;Comments, anyone?


Sort of what I am thinking (from what I gather from the above) with
my someday_to_be_done cause and effect thing. I am thinking of just
keeping a large in-game list of effects, and they'll update whenever
it is their turn. Then, depending on their type, they will update in
a different way.

A wound effect would be added to the character, with a duration, and
then also added into the global update list. When its turn came around
it would deincrement. If its X got to zero, it would mean that it was
no longer an issue, and would be removed from the character and also
the global list. If it was not at zero, it would still be deincremented
but then it would be tossed back lower on the list, to wait its next
update turn.


&gt;[Quzah]
&gt;&gt; 1) area of effect needed
&gt;&gt; 2) range needed
&gt;&gt; 3) component list
&gt;&gt; 4) sylibus list
&gt;&gt; 5) spell trigger/action
&gt;
&gt;Actually, can it be generalized as
&gt;
&gt; "action results are a function of (action, actor, target, context)",


I am thinking when I define a CAE (cause and effect), it will have a
total of ten pieces. This is what currently looks like:

CAE: ((subject)(condition)(topic)) ((target) (result))

This is split into two pieces; the fist makes up the CAUSE,
the second group is target and result, which is the EFFECT.

CAUSE = {(subject)(subject_prop)} {{condition)(condition_prop)}
EFFECT= {(target)(target_prop)} {(reaction_type)(reaction_amount)}

IF (cause) THEN (effect)

Example:

if ( player-&gt;gold &lt; 300 ) then ( player-&gt;gold = 1 );

CAUSE
"player" == (subject)           /* player info */
"-&gt;gold" == (subject_property)  /* ie: a sub-piece of player info. */
" &lt; "    == (condition)         /* basic comparison */
         == (condition_property)/* there is none in this example. */
" 300 "  == (condition topic)   /* an amount here */
EFFECT
"player" == (target)            /* player info */
"-&gt;gold" == (target_property)   /* a sub-piece of player info. */
" = "    == (reaction_type)     /* what to do to the target */
" 1 "    == (reaction_ammount)  /* how much to do. */


This should work for anything I can think of; rooms, objects,
creatures, spell effects, anything else. I opted to do it this
way instead of a the simpler (less pieces to fill in) method,
so that I don't have to make a million things like:

#define PLAYER_ITSELF    0
#define PLAYER_GOLD      1
#define PLAYER_WEIGHT    2
....
#define ROOM_SOMEPART    342554356

This also should avoid an huge huge case statement or something
that I'd have to run through to find out every possible way to
handle every comparison and so on...

It is yet to be fully written, but I think I have a pretty nice
design, so I'll have to see how it finally turns out.


&gt;and every component may change properties through the action. For
&gt;example, if you try to cast a fireball in a small room, you definitely
&gt;get some ashes on the walls and ceiling, and expect some backfire, too
&gt;;-) and just prey that the ceiling doesn't collapse on you.



When the action of the fireball went off, it would run through the
stuff in its effect range, and, well, effect them. Then they will
run through the yet-to-be-finished physics model to see if they all
get broken or whatever. (physics model == CAE_checker, which will
handle the adding and subtracting of effects on the world)


&gt;And again, I'd propose to include the response actions along with the
&gt;property changes into the action results (touch that plant I don't know
&gt;the English name for (mimose?), and it squeezes its leaves).

I am sure I'll have to limit myself, none of this "butterfly flapping
in the wind causes a tornado 5000 years later" stuff. Dang ;)

&gt;&gt;         Vladimir.
&gt;Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;
-Q-



</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="01171" HREF="msg01171.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01166.html">[MUD-Dev] Re: META: What are you looking for in this list?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01168.html">[MUD-Dev] Re: Legend's speech system and moods</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01160.html">[MUD-Dev] Re: let's call it a spellcraft</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01171.html">[MUD-Dev] Re: let's call it a spellcraft</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01167"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01167"><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><A NAME="01139" HREF="msg01139.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Wed 23 Sep 1998, 15:46 GMT
<UL>
<LI><strong><A NAME="01151" HREF="msg01151.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 23 Sep 1998, 20:03 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="01153" HREF="msg01153.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
S. Patrick Gallaty <a href="mailto:choke#sirius,com">choke#sirius,com</a>, Wed 23 Sep 1998, 20:29 GMT
</LI>
<LI><strong><A NAME="01160" HREF="msg01160.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Wed 23 Sep 1998, 21:44 GMT
</LI>
<LI><strong><A NAME="01167" HREF="msg01167.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
quzah [sotfhome] <a href="mailto:quzah#softhome,net">quzah#softhome,net</a>, Wed 23 Sep 1998, 23:20 GMT
<UL>
<LI><strong><A NAME="01171" HREF="msg01171.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Thu 24 Sep 1998, 00:24 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01200" HREF="msg01200.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Michael.Willey <a href="mailto:Michael.Willey#abnamro,com">Michael.Willey#abnamro,com</a>, Thu 24 Sep 1998, 22:12 GMT
<UL>
<LI><strong><A NAME="01203" HREF="msg01203.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Fri 25 Sep 1998, 00:15 GMT
</LI>
<LI><strong><A NAME="01208" HREF="msg01208.html">[MUD-Dev] Re: let's call it a spellcraft</A></strong>, 
Brandon J. Rickman <a href="mailto:ashes#pc4,zennet.com">ashes#pc4,zennet.com</a>, Fri 25 Sep 1998, 03:29 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>