Wear Location System
Jon A. Lambert
jlsysinc at ix.netcom.com
Wed Jul 2 10:06:44 CEST 1997
---Since there were 5 requests for this. Here it be. I have edited out
---some of the noise. Those familiar with ROM object flags should recognize
---much of this. :)
Subject: Specifications for Wear Location System
There is no player "inventory". That is, all objects are either worn or carried
within containers worn on a character. There are no limits with regard to the
numbers of items any character may carry, however there is an effective weight
limit. All objects have a weight and a volume. The weight is a real weight measure
in pounds (could be kilograms if you prefer). The weight a character can carry
with no penalties is based on their strength and size. A character may carry more than
than this with a greater penalties on the effectiveness in combat and other
actions. Object volume is an abstract number (I happen to use inches). It used
primarily to determine whether an object can fit into the mouth of a container.
Thus a container's volume determines what size objects may be placed inside.
A container has its own intrinsic empty weight and also has a maximum weight
capacity which determines how many objects may be contained within it before
it is full. All equipment objects and treasures have a weight including coinage.
Of course magically enspelled equipment might have significantly altered weights
and volumes.
There are 112 theoretical wear positions. Gasp! I know that you're thinking
unplayable but bear with me. There are actually 28 wear positions in 4 layers.
The 28 wear positions are:
head, face, l. ear, r. ear, l. eye, r. eye, nose, neck,
l. shoulder, r. shoulder, back, chest, l. arm, r. arm,
l. wrist, r. wrist, l. hand, r.hand, l. finger, r. finger,
l. waist, r. waist, l. thigh, r. thigh, l. shin, r. shin,
l. foot and r. foot.
The 4 layers consist of:
Layer 0 - A layer where an unlimited number of objects can be placed.
These objects are not equipment objects nor directly accessed
by the player. More on this later.
Layer 1 - The clothing/jewelry layer.
Layer 2 - The armor layer.
Layer 3 - The accessory layer.
Why only 28? I could think of several more and perhaps some amusing ones. Well
I made some compromises as to implementation and realism. I left out the
obvious extra fingers for some game balance and playability concerns as opposed
to reality. I decided to limit myself to 32-bits because of my compilers bit
field limitations. I also wanted my code to look simple and elegant rather than
complex and kludgy. (grin)
Technically this works as follows. There is some extra thought and effort required
from the
designers of objects. A prototype of an object contains 6 32-bit masking flags.
These contain the possible wear locations of an object. Why 6? Completely arbitrary.
I may reduce it. I am finding myself rarely using them all. The flags are checked
in order (1-6) and flag 1 being the preferred location. Many objects such as
clothing and armor when worn cover multiple locations. An actual object
in play contains a single flag, which is its current location. A null mask would
indicate the object is currently not worn. A character or NPC has 3 wear masks which
correspond to layers 1-3. The wear command checks the object-prototype masks in
preferred order and attempts to find the appropriate open wear positions. Currently
objects are automatically replaced at the same level but wearing is blocked by objects
worn at a higher level. The command 'wear shirt' for instance will automatically
remove all objects occupying the matching layer 1 positions and display what was removed
to the player in order to wear the shirt. However it would be blocked if the player
was wearing arm greaves at layer 2 along with the message you must remove your
greaves first. Lower level layers are hidden from view, this allows some measure
of equipment hiding but is also useful for some RP aspects. Gloves would cover
rings and will not be visible, for instance. If an object is successfully worn, the
mask is applied to the appropriate character layer and the real objects mask
is replaced. Enough technical details, suffice it to say all this is extremely
efficient (bit operations) and the number of lines coded for wear/remove is quite small.
Some object examples:
A chainmail shirt -
Flag 1 - chest, back, right arm, left arm and layer 2 bits.
Flag 2 - left hand, right hand and layer 3 bits.
Flags 3 - 6 are null
A longbow -
Flag 1 - l. shoulder and layer 3
Flag 2 - r. shoulder and layer 3
Flag 3 - back and layer 3
Flag 4 - l. hand and layer 3
Flag 5 - R. hand and layer 3
The player interface is not much more complicated than current ones. A player's
"inventory" consists of the items worn and occupying carried containers. There
is no virtual inventory. I'm thinking of adding a command to allow players to set
their own search preferences regarding which containers are searched. I implement
a 'wear all' command which wears objects at lower level layers before those of a higher
layer. I also implement 'wear object location' where location can be specified any
number of ways. Prefixing with left|right or postfixing with inside|outside for
those objects that can be worn at different layers. Some jewelry for instance.
In addition, I allow many alternative synonyms for locations (inner|inside or
side|waist|abdomen). I also allow shortest possible spelling parsing for those of
you familiar with the ROM interface.
There are some situational limits on the wear command during normal combat.
No more disrobing in front of your opponent. I require a wield/unweild command for
weapons. This is similar to some LP mudlibs. A sword in hand is not necessarily
readied for combat. This has some RP basis in my character descriptions also.
Weight and container limits prevent stuffing 3 halberds in a backpack or other
unrealistic combinations.
In most cases the wear object command will place the object in its correct
location without any player override. Also much of the layer 1 equipment is considered
clothing and generally isn't removed. Well I have heard of this occurring during some
very private mud activities (grin). The only possible problems I see are from player
irritation at having to remove certain objects in order to wear lower layered ones.
As far as combat useful items, this should be minimal.
While all this complexity underneath? Why all these useless locations
like ears and nose? Some of this involves the use of the level 0 layer which I
haven't explained yet. The level zero layer contains objects such as wounds, tattoos,
old scars, facial expressions, disguise applications and some other stuff I haven't even
begun to conceive. The character object does contain a level 0 mask which I call
a wounds mask. Any location severely wounded enough to not allow wearing of an
object is marked here. My combat system implements an enhanced critical hit system
which implements hit location and wound severity. These are implemented in the
form of objects which are indirectly accessed through the healing system. A wound
object has a timer and may disappear normally. A lost limb wound object would of
course not have a timer and would cause equipment wearing problems. When a wound
object is removed there is a chance that a scar object might take its place.
Depending on the initial wounds severity this scar object may be timed to disappear
or be permanent. Tattoos, body piercings and other such niceties can purchased
and applied to this layer. A player has the option of choosing hair color,
eye color when creating their character. These are all implemented as layer 0 objects.
Expressions are something lifted from the MUSH world and are an enhancement to
socials/emotes. These are applied to the face location and consist of things like
smiling, scowling, pouting, angry, etc. Disguise applications are most useful
for those of the thief/assassin bent, though not wholly their province. I know
many mudders who would like to enhance their character's appearance through the use
of hair dyes, well-placed moles, the latest in mud hair-styles. All of which
can be readily purchased at an appropriate shop. Some of this cool stuff is essential
fluff for fans of Cyberpunk, Vampyre and similar RPing games. For those of you with
a decidedly hack-n-slash bent, a well-placed scar with a story behind it might lend
some credence to your boasting, although you might want to keep the one fido gave you
as a newbie covered up.
The power of this layering comes into play in character descriptions.
Player descriptions are given from the top layer down hiding all items underneath.
Player names are only displayed if the character is recognizable as such. Brief
descriptions could range from "a cowled and cloaked figure is here" to "a scowling
faced male elf is here". Look/examine descriptions are much richer and detailed of
course. This is something still in progress and I won't be happy with until the
textual flow feels right. Disguise and other appearance changing objects
are placed and removed at layer 0. Thus a character with a good disguise skill might
be perceived as they intend while a player with no talent for disguise may appear
as they are ("You see Bob wearing make-up, a wig and dress"). Characters can become
quite unique and memorable.
JL
More information about the mud-dev-archive
mailing list