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

Travis Casey efindel at io.com
Mon Sep 1 19:53:24 CEST 1997


S001GMU at nova.wright.edu wrote:
> 

[idea of having spells be operations on the mud database -- query for 
informational spells, modify for spells that do things]

> This would work well for simple, straight forward spells, but I can see
the
> query getting quite complicated for spells that are dependant on a lot of
> conditions (like, the moon has to be in the first quarter, it has to be
> raining and there has to be a large mouse near by)...  a simple scripting
> language, or possibly chaining a few simple spells together could get
around
> that... (IE: create a 'detect large mouse nearby' spell, which is the
first
> part of casting the 'summon mouse demon' spell, or something).  I need to
> think about how to do more complicated spells some more.

Also, if you want to model the kind of magic systems that exist in 
fantasy literature, you need to be able to have triggers and 
conditionals -- for example:

  When a creature enters this room
    If that creature is an elf
      explode a fireball
      teleport remains to garden

Also, modifying the database seems to lack flair... why should a 
mage throw a lightning bolt at someone if they can just change their
damage status?  For that matter, how would you model something non-
permanent like a lightning bolt in this system?

I've had an idea for a magic system for a long time; it goes like 
this:

- Create a set of "magical commands" that mages can use.  These
  are simple instructions like "create", "move", "change", etc.
  Some of these may have multiple uses -- for example, "change"
  could have many subcommands along the lines of "change shape",
  "change volume", etc.

- Create a scripting language that mages can use to script the
  magical commands, including conditionals, loops, interrupts
  (WHEN or ON statements), etc.

Mages can then improvise magical effects using the commands, if
they don't know a spell that applies, and they can write spells
using the scripting language.  A fireball spell might look like:

Fireball $target $value
begin
  create fire at power 1 in hand named 'ball'
  move 'ball' to $target
  change 'ball' to power $value and size big
  destroy 'ball'
end

A warding spell might be:

Gargoyle Ward
begin
  loop
    on enter $thing
    if $thing is alive and not ($thing wears 'ring of dawain')
      make 'dawains gargoyle' attack $thing
  end loop
end

This could work in a couple of different ways... either the entire
spell could be given a chance of success (based on the mage's 
skills), or, in what could be a more fun variation, each statement
in the spell could be checked for success individually until either
the spell finishes or a statement fails, which would end the spell.
This allows for various types of "misfires" -- the fireball might
be created, but not get moved, or it could be moved, but might not
explode, etc.

Another fun idea based on this is to drain magic points or whatever
from the mage not when the spell is cast, but when it actually
executes.  Thus, a mage who leaves lots of magical traps around 
might find his power suddenly being used at the worst time!  This
could be used in combination with a concept from many paper RPGs --
that of "maintenance cost."  That is, if you leave a magical effect
sitting around, it continues to draw power from you.  That makes
the "destroy 'ball'" in the above spell a necessary part -- if the
ball weren't destroyed, it would continue to exist, and to draw
power from the mage!  (IMHO, if using such a system, destroying
one's *own* spells should be very easy to do, possibly always
succeeding -- that way, only mages who forget are punished.)

(This idea is drawn from a scene in John Ford's novel, _The Dragon
Waiting_.  A mage creates an energy barrier around himself to
protect him from attacks -- but forgets to give it a point to *stop*
protecting at, and is killed when the spell drains all his energy
to fuel itself, spells being fueled by life energy in that world.)

Also, the skill checks can be done as each part of the spell 
"executes" -- which allows for a ward which is placed, but fails
later.
--
       |\      _,,,---,,_        Travis S. Casey  <efindel at io.com>
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'        rec.games.design FAQ:  
     '---''(_/--'  `-'\_)      http://www.io.com/~efindel/design.html



More information about the mud-dev-archive mailing list