Re: Full Body Wear Positions

From: Alex (fletcher@DEMOCRACY.QUEENSU.CA)
Date: 06/13/98

> I want to implement full body armors and other item types that when
> worn, prevent eq from being worn in another location. For example, if a
> player wears a full suit of plate mail, the cannot then wear something
> on their legs and arms. I just wanted some suggestions on how people
> have done this in their code. I thought about an item flag, like
> FULL_BODY. and then in perform_wear or a related function, if the item
> is flagged , check the other positions (arms and legs) for eq being
> worn, and deny. Also the same scenario in reverse. But after further
> thought, this seemed limiting and required more and more code for each
> new flag. Has anyone come up with a more standarized method of doing
> something similiar to this?
On VieMud we've got a system like this, this is *briefly* how it works:

We have a 'Multi-Wear' flag that tells the mud that the object when worn
needs this place *AND* this other one *AND* etc...

This makes the first line of object stats look as follows:

<type> <obj flags> <wear> <wear> <wear> <etc>

To have a second 'wear' flag, MULTIWEAR must be set on the first wear
flag, to have a third, it must be set on the second.  Also, all wear
flags *must* have 'take' on them.  Don't remember quite why, but weird
stuff occurred when we didn't have it.  (=

This makes it pretty easy to parse in db.c

Now, on the side of actually showing where it is worn (and filling those
positions), we have an 'item' called FAKE_EQ, which really isn't an item,
but has an apparent vnum of -1.  This has a pointer to the equipment it
is associated with, and in the sequence where equipment is listed, the
list just looks for FAKE_EQ associated with the specific item that is
being shown, and shows them also.

If you want a looksee at the code in action, let me know, and I can show
you more or less how it works from the player's POV.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST