[MUD-Dev] [CODE] unique items

Lord Ashon ashon at wsunix.wsu.edu
Mon Mar 20 01:50:39 CET 2000


Having just written the way objects are handled in my mud I feel like
finally de-lurking.

I've spent a lot of time working with objects.  One of the things that I
wanted to accomplish with the way objects were made and used was to make it
easy for players to customize/make weapons while at the same time making it
possible for the elusive ur-object.

Our objects is just a 13 digit number.  We then parse it down to these sets:
11-2-333-44-55-66-7.  Once we have these sets we compare them to the
appropriate hash tables.  This then defines the long names, short names,
damage (it can sustain), damage (it can deal).
The sets:
1 - Material type
2 - Basic Tool Type
3 - Advanced Tool Type
4 - Preferred Wear Location
5 - Magic Affects
6 - Skill Affects
7 - Recognized.

Material Type:
  The material type designates the strength, weight, and endurance of the
object.  The tougher the material the more damage it sustains/deals.  The
material also limits the skill/magic affects that can be applied (number
of).

Basic Tool Type:
  There are four Basic tool classifications:  Weapons, Clothes(Armor),
Containers, and Accessories.  This inherits certain functions etc...

Advanced Tool Type:
  This includes the specific tool, sword, long sword.  or whatever

Preferred Wear Location:
  Unless noted by the Advanced tool type an object can be equipped anywhere.
A sword can only be equipped to hand, belt.  A hat can be worn feet, hands,
rings, or even wielded as a weapon.

Magic Affects:
  For those magic spells that can occur on items.

Skill Affects:
  This allows the players with certain skills to modify an item.  This
searches the hash table and applies the appropriate bonus/negatives.  It
also automatically switches the Recognized bit on.

Recognized:
  Unless an object is made by a player it is unrecognized.  If it is made
by/modified by a player it is automatically set to recognized.  It does not
take of the fact that at one date it wasn't an object but at a current date
it is scenario.

So now what we do is we simply save this string to the pfile.  And when a
player loads they load the weapon.  The mud on the other hand can generate
objects on the fly.  There is no need for the builder to create an object
unless it is a recoginized object.

Just my two cents worth.
(Guess this means I have to write an introduction huh?)
--Lord Ashon




_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list