Re: wear possitions

From: Del Minturn (caminturn@EARTHLINK.NET)
Date: 09/26/98


Here is most of the doc's I came up with to add wear positions.
Have fun.. I am not 100% sure I finished this document, so PLEASE
if you add a wear position by using this doc, let me know if
it is complete and works ok. So I know if I made this right.

---- based on bpl12 -----
I found no difficulty adapting this to bpl14+(cvs)

Where the defines for WEAR_XXXX  are, add in the appropriate wear item
(I will use FACE) and dont forget to adjust the remainder of the defines
NOTE: if be careful as to where you place the   ITEM_WEAR_XXX  as it will
change ALL items in the game if not added to the end of that list.
Also, the capitalized FACE in constansts.c has to match same order as
ITEM_WEAR_XXXX

I did not make a patch as I am using severely patched/modified bpl12.
I this worked for me and shows the positions as I wish when
doing an eq list. If you see any problems in this let me know.
I also added in EAR wear so my numbers are different than stock!
All standard disclaimer rules apply.
I am not true coder, so please do not ask me for solutions to errors
that
may arrise. I am still learning and hopefully one day I will be able to
answer questions to such. Have fun and remember, its a game and a hobby!

"Del"
caminturn@earthlink.net

---------------
structs.h


 #define WEAR_HEAD       8
+#define WEAR_FACE       9
 #define WEAR_LEGS      10      <-- dont forget to change the remaining
#'s

--

 #define ITEM_WEAR_HOLD         (1 << 15)
+#define ITEM_WEAR_FACE         (1 << 16)  <-- read note below


NOTE: If you add in the middle of the list, ALL items in the game will
have to
be edited to match the new wear positions. A BIG headache!!!!
so add it to the end of the list!!!!
NOTE: You can add the other things below as shown, not to the end of the
list.
---------
constants.c

  "<worn on head>       ",
+ "<worn on face>       ",
  "<worn on legs>       ",

--

  "Worn on head",
+ "Worn on face",
  "Worn on legs",

--

  "HOLD",
+ "FACE",
  "\n",

-----------------
objsave.c


    case WEAR_HEAD:
      if (!CAN_WEAR(obj,ITEM_WEAR_HEAD))
      locate = 0;
      break;
+   case WEAR_FACE:
+     if (!CAN_WEAR(obj,ITEM_WEAR_FACE))
+     locate = 0;
+     break;
    case WEAR_LEGS:

------------------
act.item.c

    {"$n wears $p on $s head.",
    "You wear $p on your head."},

    {"$n wears $p on $s face.",
    "You wear $p on your face."},

    {"$n puts $p on $s legs.",
    "You put $p on your legs."},

--

  int wear_bitvectors[] = {
    ITEM_WEAR_TAKE, ITEM_WEAR_FINGER, ITEM_WEAR_FINGER, ITEM_WEAR_NECK,
-   ITEM_WEAR_NECK, ITEM_WEAR_BODY, ITEM_WEAR_HEAD, ITEM_WEAR_LEGS,
+   ITEM_WEAR_NECK, ITEM_WEAR_BODY, ITEM_WEAR_HEAD, ITEM_WEAR_FACE,
ITEM_WEAR_LEGS,
    ITEM_WEAR_FEET, ITEM_WEAR_HANDS, ITEM_WEAR_ARMS, ITEM_WEAR_SHIELD,
    ITEM_WEAR_ABOUT, ITEM_WEAR_WAIST, ITEM_WEAR_WRIST, ITEM_WEAR_WRIST,
    ITEM_WEAR_WIELD, ITEM_WEAR_TAKE };

--

    "You're already wearing something on your head.\r\n",
+   "You're already wearing something on your face.\r\n",
    "You're already wearing something on your legs.\r\n",

--

If you have multiple positions like finger, copy the section near bottom
and apply
it for the positions your adding. (below this section)
  /* for neck, finger, and wrist, try pos 2 if pos 1 is already full */

--
int find_eq_pos(struct char_data * ch, struct obj_data * obj, char *arg)

    "head",
+   "face",
    "legs",

--

    if (CAN_WEAR(obj, ITEM_WEAR_HEAD))        where = WEAR_HEAD;
    if (CAN_WEAR(obj, ITEM_WEAR_FACE))        where = WEAR_FACE;
    if (CAN_WEAR(obj, ITEM_WEAR_LEGS))        where = WEAR_LEGS;

---------

If your using any of the OLC's you will have to configure them to see
the new positions!
like in olc.h

#define NUM_ITEM_WEARS          17  <-- highest ITEM_WEAR_XXX (1 << XX) + 1

There may be more misc things that need changing, but I have not found
any more at this
time.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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