[MUD-Dev] Re: let's call it a spellcraft

J C Lawrence claw at kanga.nu
Sun Sep 27 20:05:39 CEST 1998


On Sat, 26 Sep 1998 19:28:05 +1200 (NZST) 
Oliver Jowett<oliver at jowett.manawatu.planet.co.nz> wrote:

> On Fri, 25 Sep 1998, quzah [sotfhome] wrote:

> I'm currently messing around with a magical-energy-density system
> which is something like a finer grained version of this.

> Every area has some density of magical energy. All magical effects
> come from tapping movement of magical energy down a density
> gradient. The energy itself is not consumed. To move magical energy
> against the gradient requires external energy. Uncontrolled movement
> of magical energy happens whereever there is a gradient anyway,
> dependant on the size of the gradient and the type of materials it
> passes through, and produces essentially random production of
> magical effects as this happens.

My system is not too too alien to this, tho a number of the precepts
are different.  Most of the structure is described in:

  http://www.kanga.nu/~petidomo/lists/mud-dev/1998Q2/msg00863.html

but I'll expand on that.

  I run a particle based economy for *everything*.  This means that
every object not only consists of a known number of particles of
various types, but also consumes various particles of various types to
continue its existance (eg magical objects must constantly consume
mana particles to not decay).  If an object is not able to consume the
requisite particles it either decays or self destructs.  (This
explains the UggUgg's great Mana Fight).

  Particles come in a number of flavours and have sign.  The
relational rules are fairly simple and siscussed below for mana in
particular.  Particles may be changed (expensively) to different
types.  However the over-arching and never violated rule is that if
the entire world were summed, it will always equate to nothing.

  Translation: The negative (-ve) always precisely equals the positive
(+ve), and there are no neutrals.  Extension: You can never create
anything without also creating its opposite.

  For mana in particular I run what comes out to a faucet/drain
economy.  There are (semi-mobile) various spots in the world that emit
mana, and variou other spots that consume mana (as well as all the
other objects that also consume mana.  

  What I have at the moment are mana producers and some base mechanics
on mana motion.  So far its semi-working (ie I still don't like it).

  Mana producers produce mana at variant and unstable rates.  The
current formulaes are simple:  Pick a random time not too too far in
the future, pick a random mana production rate to be accomplished at
that time.  Then produce mana over time at a rate that progresses
linearly from the current rate to the target rate by X time.  Mana is
of course produced in equal qualtities of oppositely signed
particles.  Mana producers are made in pairs, one produces -ve mana,
the other +ve.  

  The clever bits come in with motion.  Mana is repelled by like
signed mana, and attracted by opposite signed mana inversely
proportional to the square of the distance between them.  However mana
is attracted to like sign mana proportionally to the square of their
relative velocities, and inversely proportional to the square of the
seperating distance.  The result is that mana tends to travel in
packs, blobs as it were, and to travel at speed.  Once a blob starts
to form, and once it starts to move, the mana attractive force quickly
escalates to a point where its affecting and attacting the mana over a
very large area, which mana, as it starts to move toward the blob,
causes the attraction wave to expand and grow exponentially.

  Just to kick things off, mana producers occassionally emit mana
particles with high random velocities.  The velocity of produced
particles maps against a curve which peaks at zero velocity, and
rapidly approaches zero as the velocity grows.  

  The goal is for a big puddle of slowly self-repellant mana to form
about each producer, for the puddle to tend to form streams and rivers
(see earlier discussion with Keegan about Ley Lines) that head toward
the opposite sign mana producers, and for the random high speed
emmissions to act rather like sun spots, ripping chunks out from the
puddles and plunging across the land much like an exponentially
growing tidal wave.  Tsunami!

  I'm considering making mana destruction (opposite signs meet)
attractive to all mana inversely proportional the the square of the
intervening distance.  This would encourage stream/river formation.

  Currently tuning is required.  The high speed particles/blobs are so
chaotic and powerful that they rip any nascent pattern that may have
started to form apart.  I also have problems deciding what happens
when a blob reaches the boundary of the coordinate global system --
currently I silently destroy it and immediately emit it as unbalanced
particles at appropriately signed producers.

Some samples of what I'm looking for:

  http://www.kanga.nu/~petidomo/lists/mud-dev/1998Q2/msg00587.html

(which also contains some other general desciption of my design)

-<cut>--

  > l
  Bubba stands on the ley line, waiting patiently.

  Godzilla, thirty stories tall and covered with teeth, claws, and
  the remnants of past munchies charges down the valley towards you.

  The air starts to feel sharp, almost charged, not electric but
  potential in some odd twisting way.  Electric orange sparks start
  to dance across Bubba's features; you feel your own hair rise and
  crackle.  Mana is coming, and lots of it.  WHOOSH!  The ground
  suddenly looks like burnt toast and rushes towards you like a
  bullet!  The mana is here!  Yow!

  Bubba twitches one finger.  A fireball the size of Manhattan engulfs
  Godzilla.  Sizzle!

  Godzilla is cooked.

  Lunch is served.

  Life is good.

Timing is everything.

-<cut>--

and of course UggUgg's famous mana fight:

  http://www.kanga.nu/~petidomo/lists/mud-dev/1998Q2/msg00479.html

(also contains good general design description)

--<cut>--
  UggUgg slashes at you with his Sword of Instant Beheading 
  and minor discomfort!
  > cast soakhole on uggugg
  You cast the dreaded mana eater soakhole on UggUgg!
  UggUgg sneezes and buries your in green snot!
  Your armour suddenly dissappears!  
  Your spell of magical summon protection fails!
  Your spell of magical sight fails!
  UggUgg's Nose Ring of Killer Snot dissappears!
  UggUgg's Belt of Gas Containment dissappears!  Phew!
  UggUgg's dagger of wart removal dissappears!
  > cast create mana
  You create 5,000 units of mana!
  Your mana stores are now empty.
  >cast $my_protections
  You are now magically potected from summons.
  You can now see all magically hidden objects.
  UggUgg thows a blade of painful castration at you!
  > jump!
  You leap mightily.
  The blade misses!  You are still a baritone.
  > attack uggugg with spear
  You ram UggUgg through with the spear of Icy Death!
  UggUgg now has the flu and looks a bit watery about the eyes.
  UggUgg picks up a rock.
  UggUgg bashs you with a rock!  Ouch!  That hurt!
  > throw TC at uggugg
  You throw the charmed trash collector at UggUgg.
  The TC englobes UggUgg!
  UggUgg gives you the Sword of Instant Beheading and minor
    discomfort.
  UggUgg gives you the Boots of Mighty Chilblains,
  UggUgg gives you the Goggles of Big Farts.
  UggUgg gives you Super Nose Hair Puller.
  The TC has eaten everything UggUgg was carrying!  Yech!
  UggUgg is naked!
  Your spell of magical summon protection fails!
  Your spell of magical sight fails!
  Your spell of magical tummy tuck fails!
  Your spell of power voice fails!
  Your spell of land control fails!
  Your spell of bowel control fails!  
  Your spell of toe cheese protection fails!
  > stat spells
  You have no spells.
  > stat mana
  There is no mana here.
  > strangle uggugg
  You wrap your hands about UggUgg's neck and begin to squeeze!
  UggUgg prays to the Great God GooGoo!
  GooGoo mana blesses the area!  
  There is a LOT of mana here!  You skin prickles!
  > i
  You have a mana shielding sack
  > l in sack
  There are 5,000,000 TC spores in the sack.
  >empty sack on UggUgg
  The spores eat all the mana!
  There are 5,000,000 TC's here!  Wow.
  All the mana is gone!  
  ...
--<cut>--

The magic system from the player/user perspective is almost a literal
implementation of Mage 2 Mage with all its nice scriptabilities etc.
The extensions to M2M are purely that of the particle consumption and
decay.

> How I hope to actually use it: your typical "mage" is someone who is
> good at:

> . gathering magical energy into himself against a gradient
> [concentration] . preventing the magical energy from seeping out
> again [insulation] . extracting useful effects from controlled
> releases of magic [control]

Ditto, except that I add the requirement for M2M knowledge.  The
expectation is that magic users will rapidly fragment into two
classes: M2M programmers, and users of pre-canned M2M scripts.  The
hope is that there will be a considerable business in M2M objects.

Note to self: Need to install some equivalent of sigitally signed
objects which can't be copied...

> The big problem I'm having is in getting magic to actually flow and
> dissipate across the world (from the points where I initially
> introduce it into the visible game-world - I have magic reservoir
> external to the game world that feeds these points) without bringing
> the machine to its knees.  The system seems to have a lot of
> parallels with fluids, and I'm sure there are ways of handling this
> already worked out, but I can't find references to them.

I have the same problem, however mostly due to the fact that the
number of particles I have to track rapidly becomes enourmous (my last
test run was tracking almost 12 million discrete man objects outside
of any other object types).  I'm part way thru a design where mana
objects are never actually instantiated except at the instant of
use. destruction, or transmutation.  All the rest of the time the mana
is logical and its presence or absence is computationally checked.

Its crude and nasty, but it looks like it might work.

--
J C Lawrence                               Internet: claw at null.net
----------(*)                              Internet: coder at ibm.net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...




More information about the mud-dev-archive mailing list