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

Shawn Halpenny malachai at iname.com
Thu Sep 4 10:35:49 CEST 1997


Travis Casey wrote:

[ DB queries as spell functionality ]

> 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.

This is a bit like what I'm envisioning for a magic system.  There is
a predefined set of actions that are referenced by true game
commands.  A character must explicitly begin a spell and then any
game commands he types after that point cause the appropriate
referenced action to be added to the character's current-spell list. 
When the player releases the spell (an explicit action), his list of
commands is compared to the list of commands required to do a
particular spell.  The degree to which they match is passed as a
parameter to the spell to be used as the spell desires (i.e.  decide
to backfire, do some strange effect, succeed completely, etc.).  To
further complicate matters, every character has his own (potentially)
unique set of command sequences for every spell.  Coming across
certain objects under certain circumstances will result in the
character learning the actions for a new spell (every character to
come across this object will cause the object to randomize the set of
actions required for the spell*).  As well, you can learn a new spell
by observing someone else perform the complete set of actions for it.
This allows for a unique occurrence when, if two people learned a
spell reading it in a book, they each have a different set of actions
to perform to achieve the same magical effect.  However, if one
learns it by watching the other, they will both perform the same set
of actions to the same effect.  Those are the fundamentals, anyhow.

Although there is no scripting language of sorts involved in creating
spells, this could be extended easily enough to allow people to create
their own spells.

* If you were the first to come across that object, learn the spell, and
then destroy the object, the only way anyone else could learn that spell
was to catch you invoking it.

[ example elided ]

> 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.

Such is my thinking.  I leave it up to the code for the spell to decide
how much it costs, what the effects are, what conditions had to be met,
etc.

--
Shawn Halpenny

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



More information about the mud-dev-archive mailing list