Modeling spells/skills as collections of affects

S001GMU at nova.wright.edu S001GMU at nova.wright.edu
Wed Sep 3 09:47:28 CEST 1997


I've been mulling over this idea of making spells more than just a special
block of code that does whatever you want it to.  We are using a Relational
DB and it occurred to me that most (if not all) spells would only be
modifying values in the DB.  All spells could be seen as a query/modify
statement, which then has some associated cost to the caster (mana drain,
stun/physical damage as per the Shadowrun system, or whatever).  Spell
construction would consist of building the query (would definately want some
interface here so that ppl don't have to learn SQL to create spells on the 
MUD!), and calculating the cost.  Once that is done, the query and cost are 
stored in the DB under the spell name.  There would, of course, have to be a 
record somewhere of how much it costs to modify which values by however much.
Truely powerful spells could modify other ppls spells or the table of cost
values... (they're part of the DB too!).

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.

Just some random thoughts.  :)

-Greg



More information about the mud-dev-archive mailing list