Re: [Circle] Bitvector Explanation please

From: Burkhard Knopf (burkhard.knopf@informatik.tu-clausthal.de)
Date: 11/29/96


>>>>> "DJ" == DJ Pure <pure@ozramp.net.au> writes:

 DJ> G'Day All, i've read the docs, but i'm still unfamiliar with
 DJ> bitvectors and what they do. i know how to impleement them, but
 DJ> I'm not sure how to use them in the game. For example. I had this
 DJ> #define open 0
 DJ> #define closed 1
 DJ> #define locked 2
 DJ> #define pickproof 3
 DJ> #define secret_closed 4
 DJ> #define secret_locked 5
 DJ> #define secret_pickproof 6

When reading section 6.2 "Zone Commands" in building.doc you'll see
that those numbers are to be used in the zone files (like in the
original DIKU code there are no bitvectors here); they are transferred
into bitvectors during boot (in file db.c somewhere).

 DJ> and i was told i don't nned 5 and 6 cause 4 already 'encompasses'
 DJ> them. This is why I'm confussed, so can someone quickly explain
 DJ> them please *blush*

Bit positions for the door bitvectors (in structs.h):

#define EX_ISDOOR               (1 << 0)   /* Exit is a door          */
#define EX_CLOSED               (1 << 1)   /* The door is closed      */
#define EX_LOCKED               (1 << 2)   /* The door is locked      */
#define EX_PICKPROOF            (1 << 3)   /* Lock can't be picked    */


In order to have secret doors you'll have to add something like

#define EX_SECRET               (1 << 4)   /* Lock can't be picked    */

and -- in db.c -- the respective coding for the zone file numbers
secret_open (you should be able to set that too), secret_closed ...

There was some confusion in this mailing list about what secret doors
should look like and how they were to be used. I think they shouldn't
be detected just by moving towards their direction but only by using
the keywords (see docs about direction fields of rooms) which you
should put into the room description (or in some extra description)
somewhere.

Burkhard

-- 
burkhard.knopf@informatik.tu-clausthal.de
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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