Welcome to the Builder Academy

Question A Problem Adding AFF_flags

More
12 Jul 2012 21:10 #351 by Papaya Pete
Here is a problem that I am noticing when I add on new AFF flags. I'm putting in some flags for giving protection versus fire, water, earth, and air. So I went into structs.h and put them in like so...
Code:
[code]/* Affect bits: used in char_data.char_specials.saved.affected_by */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ #define AFF_DONTUSE 0 /**< DON'T USE! */ #define AFF_BLIND 1 /**< (R) Char is blind */ #define AFF_INVISIBLE 2 /**< Char is invisible */ #define AFF_DETECT_ALIGN 3 /**< Char is sensitive to align */ #define AFF_DETECT_INVIS 4 /**< Char can see invis chars */ #define AFF_DETECT_MAGIC 5 /**< Char is sensitive to magic */ #define AFF_SENSE_LIFE 6 /**< Char can sense hidden life */ #define AFF_WATERWALK 7 /**< Char can walk on water */ #define AFF_SANCTUARY 8 /**< Char protected by sanct */ #define AFF_GROUP 9 /**< (R) Char is grouped */ #define AFF_CURSE 10 /**< Char is cursed */ #define AFF_INFRAVISION 11 /**< Char can see in dark */ #define AFF_POISON 12 /**< (R) Char is poisoned */ #define AFF_PROTECT_EVIL 13 /**< Char protected from evil */ #define AFF_PROTECT_GOOD 14 /**< Char protected from good */ #define AFF_SLEEP 15 /**< (R) Char magically asleep */ #define AFF_NOTRACK 16 /**< Char can't be tracked */ #define AFF_FLYING 17 /**< Char is flying */ #define AFF_SCUBA 18 /**< Room for future expansion */ #define AFF_SNEAK 19 /**< Char can move quietly */ #define AFF_HIDE 20 /**< Char is hidden */ #define AFF_FREE 21 /**< Room for future expansion */ #define AFF_CHARM 22 /**< Char is charmed */ #define AFF_WATER_PROT 23 /**< Protection from Cold & Water */ #define AFF_FIRE_PROT 24 /**< Protection from Fire */ #define AFF_EARTH_PROT 25 /**< Protection from Earth */ #define AFF_AIR_PROT 26 /**< Protection from Air and Lightning */ /** Total number of affect flags not including the don't use flag. */ #define NUM_AFF_FLAGS 27
[/code]

Now I found a way to use AFF_FIRE_PROT, having made a spell for that already. That works fine. However, let's say I want to add it onto a mob that is normally protected from fire. Here is what I see when going into the affects menu under medit.
Code:
1) BLIND 8) SANCT 15) SLEEP 22) CHARM 2) INVIS 9) GROUP 16) NO_TRACK 23) 3) DET-ALIGN 10) CURSE 17) FLY 24) Playing 4) DET-INVIS 11) INFRA 18) SCUBA 25) Disconnecting 5) DET-MAGIC 12) POISON 19) SNEAK 26) Get name 6) SENSE-LIFE 13) PROT-EVIL 20) HIDE 27) Confirm name 7) WATWALK 14) PROT-GOOD 21) UNUSED Current flags : INFRA Enter aff flags (0 to quit) :

Same kind of thing if I'm in oedit and want to put that on an object.
Code:
1) BLIND 2) INVIS 3) DET-ALIGN 4) DET-INVIS 5) DET-MAGIC 6) SENSE-LIFE 7) WATWALK 8) SANCT 9) GROUP 10) CURSE 11) INFRA 12) POISON 13) PROT-EVIL 14) PROT-GOOD 15) SLEEP 16) NO_TRACK 17) FLY 18) SCUBA 19) SNEAK 20) HIDE 21) UNUSED 22) CHARM 23) 24) Playing 25) Disconnecting 26) Get name Object permanent flags: NOBITS Enter object perm flag (0 to quit) :

I'm sure that there is just something that I haven't done. Any idea what the problem might be?

Please Log in or Create an account to join the conversation.

More
12 Jul 2012 21:22 - 12 Jul 2012 21:22 #353 by rudeboyrave
constants.c you might be missing your aff's in

const char *affected_bits

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.
Last edit: 12 Jul 2012 21:22 by rudeboyrave.

Please Log in or Create an account to join the conversation.

More
13 Jul 2012 07:11 #354 by Papaya Pete
Yeah, that sure was the problem. I figured it was something simple I had missed! Thanks for the help! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.186 seconds