Re: [NEWBIE][CODE][HELP]Basic Outline

From: Richard Glover (magik@thegrid.net)
Date: 01/31/99


Well, I wouldn't suggest expanding out the ITEM_WEAPON flags to several
different flags.  You might want to just categorize your weapons into things
like slashing, piercing, blunt, polearms, etc then according to building.txt
in your /doc directory value 0 of ITEM_WEAPON is unused.  So you can set up
a table for your builders to say that:

0 = slashing
1 = piercing
2 = blunt
...

The values are integers, so you can have quite a few of these.  Then you
just need to set up a macro for yourself in utils.h like:

#define WEAPON_TYPE(obj)   ((obj)->obj_flags.value[0])

Then you can do whatever you want with that value in the code that you need
to.  Set up a value in player_special_data_saved in structs.h for players to
have a chosen weapon type/specialization/proficient value then check if that
value matches the WEAPON_TYPE in fight.c to see if they get any special
benefits.

Have fun, looks like a neat little system.

Rick

-----Original Message-----
From: *Erekosė* <yyrkoon_@geocities.com>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Saturday, January 30, 1999 1:59 PM
Subject:  [NEWBIE][CODE][HELP]Basic Outline


>        I was just wondering if someone could give me a basic outline of
>how to go about adding some things to my MUD. I want to add in either as
>part of the Weapon item type or just make a whole bunch more item types
>differnt kinds of weapons. Like sword dagger spear whip. All that. And
>then add in skills for each one so that in order to use a certain kind
>of weapon you have to be skilled in it. Kind of like they do in ROM
>muds... I just can't figure out how to go about doing this. I'm a
>relatively new coder and not sure where to find everything in the circle
>code. If someone could help me out I'd be grateful.
>
>Thanks a bunch,
>                Erekose


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



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