Re: Level Restrictions on equipment

From: Daniel W. Burke (
Date: 06/24/96

On Mon, 24 Jun 1996, Iggy wrote:
> You must edit these files:
> act.informative.c - (+) after items' name which you can't use.

I didn't change anything here.

> act.obj.c         - Lots of changes.
act.item.c in bpl11.
But I didn't change anything in here either.

> act.wizard.c      - Level in stat and vstat commands.
do_stat_object should have what the min_level is

> structs.h         - New data in obj_flag_data, called: level.
I just increased values[] one more.

db.c              - New object reader (New format in .obj files!). Put 
the >                     minlevel after wear bitvector. So the line is
>                     (see in building.doc, 5.1): <type flag> <extra
>                     (effects) bitvector> <wear bitvector> <min. level>
Of you just treat it as 1 more value, and before values are loaded, set 
the 5th value to 0, then if that value isn't there it will stay zero (at 
least it always has for me, I never went through all the object files and 
added the field as 0 and havn't have any problems)

> spells.c          - Change the identify spell. It must show the minlevel of
>                     objects.
Good idea ;)

> utils.h           - GET_OBJ_LEVEL macro and dunno what else...
that should be fine...
#define GET_OBJ_MIN_LEVEL(obj)  (GET_OBJ_VAL(obj, 4))

and a simple check in handler.c in equip_char() for level:

   if (GET_LEVEL(ch) < GET_OBJ_VAL(obj, 4)) {
      act("You are not experienced enough to use $p.",
          FALSE, ch, obj, 0, TO_CHAR);
      obj_to_char(obj, ch);

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