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

From: Fizal (
Date: 02/01/99

---<> wrote:

>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.

Hmm... not really sure what you meant by "whole bunch more item
types". Do you mean, instead of ITEM_WEAPON, you want ITEM_SWORD,
ITEM_DAGGER? The way Circle does it, and most mud codebase that I've
seen, is to have only 1 ITEM_WEAPON, and classify the weapon into the
type of damage that it does (eg: slashing, piercing, etc).

WEAPON (Type Flag 5) -- taken from building.txt

value 0: unused
value 1: Number of damage dice
value 2: Size of damage dice
value 3: Weapon type for damage messages, one of:
         0    hit/hits
         1    sting/stings
         2    whip/whips
         3    slash/slashes
         4    bite/bites
         5    bludgeon/bludgeons
         6    crush/crushes
         7    pound/pounds
         8    claw/claws
         9    maul/mauls
         10   thrash/thrashes
         11   pierce/pierces
         12   blast/blasts
         13   punch/punches
         14   stab/stabs

I do believe you know this already, just to confirm....

>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 don't remember how ROM does it, but if I'm not mistaken, they still
uses the damage type to classify their weapons. Then, they associate
each damage type to a skill (eg: long blades for slashing, short
blades for piercing, bludgeons for pounding/crushing, etc). There are
a few docs on how to add in new skills but if you want me to cover it
for you, just tell me. Once the skills are set, you might want to do a
check whenever they want to wield a weapon to see if they have the
appropriate skill for that type of weapon. Another thing that you can
do is to do a check against their skill at every tick to see if they
will continue to wield the weapon, or fumble and drop it. If you want
to be really evil, when they fumble, let them drop it into the room!
The players will definitely grumble everytime they fumble and lose
their weapon in the midst of a fight... :P

Hope this'll help....

Afizal Mustapa
Petaling Jaya, Malaysia

Get your free address at

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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