FANDOM


Object Entry FormatEdit

Here is the format of an entry in the area-base object file (.obj):

#<virtual number>

<alias list>~

<short description>~

<long description>~

<action description>~

<type flag> <extra (effects) bitvector> <wear bitvector>

<value 0> <value 1> <value 2> <value 3>

<weight> <cost> <rent per day>

{Zero or more Extra Descriptions and/or Affect Fields}


There can be an unlimited number of Extra Descriptions and up to six (6) Affect Fields.

Virtual NumberEdit

This number is critical; it is the identity of the object within the game. It is the number that will be used to reference the object from zone files and is the number used to ``load objects from within the game. The virtual numbers must appear in increasing order in the object file.

Alias ListEdit

The list of keywords, separated by spaces, that can be used by players to identify the object. The object can only be identified using the keywords that appear in its alias list; it cannot be identified by a word that appears only in its name. Great care should be taken to ensure that the spellings of names and aliases match. Fill words such as ``the, ``a, and ``an should not appear in the Alias List.

Short DescriptionEdit

The description of the object used by the MUD when the object is used. For example, a short description of ``a long, green stick would result in messages such as ``The Beastly Fido picks up the long, green stick. The Short Description should never end with a punctuation mark because it will be inserted into the middle of sentences.

Long DescriptionEdit

The description displayed when the object is seen lying on the ground, for example, ``A furled umbrella is lying here. Unlike the Short Description, the Long Description should end with appropriate punctuation.

Action DescriptionEdit

Action Descriptions are primarily used for magical objects (staves, wands, scrolls, and potions) to specify what message displayed to the room when the magical item is used. The Action Description should be given in the act format specified in act.doc. If no Action Description is present, a default message will be used:

Staves: Rasmussen taps <object> three times on the ground.


Wands: Rasmussen points <object> at Onivel.


Scrolls: Rasmussen recites <object>.


Potions: Rasmussen quaffs <object>.


For objects which are readable papers, the Action Description contains the text on the paper.


Object Value DefinitionsEdit

The meaning of an object's four values (value 0 through value 3) vary depending on the Type Flag of the object.

In the table below, ``unused means that the server ignores the value; it can be set to any number (but 0 is always a safe bet). ``unimplemented indicates a Type Flag currently not recognized by the server.

An index of spell numbers for use with magical objects can be found in the Appendix Spell Numbers.


LIGHT (Type Flag 1)Edit

     value 0: unused

     value 1: unused

     value 2: Capacity of light in hours.

                0: Burned out light.

               -1: Eternal light source.

     value 3: unused

SCROLL (Type Flag 2)Edit

     value 0: Level at which scroll's spells are cast.

     value 1: Spell number 1

     value 2: Spell number 2

     value 3: Spell number 3

          If less than 3 spells are desired, set unused values to -1.

WAND (Type Flag 3)Edit

     value 0: Level at which wand's spell is cast.

     value 1: Charge capacity of wand (>= 1)

     value 2: Current number of charges remaining

     value 3: Spell number

STAFF (Type Flag 4)Edit

     value 0: Level at which staff's spell is cast.

     value 1: Charge capacity of staff (>= 1)

     value 2: Current number of charges remaining

     value 3: Spell number

WEAPON (Type Flag 5)Edit

     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

FIREWEAPON (Type Flag 6)Edit

unimplemented (do not use)


MISSILE (Type Flag 7)Edit

unimplemented (do not use)


TREASURE (Type Flag 8)Edit

     value 0: unused

     value 1: unused

     value 2: unused

     value 3: unused

ARMOR (Type Flag 9)Edit

     value 0: AC-apply of the armor.  Note that the effective change

               to AC is this value times a multiplier based on where

               the armor is worn.  Values >0 enhance the armor class;

               values <0 damage the armor class (cursed armor, for

               example).

     value 1: unused

     value 2: unused

     value 3: unused

POTION (Type Flag 10)Edit

     value 0: Level at which the potion's spells are cast.

     value 1: Spell number 1

     value 2: Spell number 2

     value 3: Spell number 3

          If less than 3 spells are desired, set unused values to -1.

WORN (Type Flag 11)Edit

value 1: ears

     value 1: face

     value 2: off-hand wield

     value 3: unused

OTHER (Type Flag 12)Edit

      value 0: unused

     value 1: unused

     value 2: unused

     value 3: unused

TRASH (Type Flag 13)Edit

      value 0: unused

     value 1: unused

     value 2: unused

     value 3: unused

TRAP (Type Flag 14)Edit

unimplemented (do not use)


CONTAINER (Type Flag 15)Edit

     value 0: Capacity (max containable weight) of container

     value 1: Container flag bitvector (MUST be a numeric bitvector)

          1    CLOSEABLE      Container can be closed and locked.

          2    PICKPROOF      Lock on container can't be picked.

          4    CLOSED         Container is closed when created.

          8    LOCKED         Container is locked when created.

     value 2: The vnum of the key object that opens this container.

               -1 if it has no key.

     value 3: Reserved for internal use -- always set as 0.

NOTE (Type Flag 16)Edit

     value 0: Language of writing (unimplemented).

     value 1: unused

     value 2: unused

     value 3: unused

DRINKCON (Type Flag 17)Edit

value 0: Capacity of container

     value 1: Current quantity in container

     value 2: see below

     value 3: Non-zero if the drink poisoned, 0 otherwise.


Value 2 is a number which defines the type of liquid in the drink container, from the following table:

          Type           nr.         Effect of Liquid On:

                               Drunkness   Fullness   Thirst

         LIQ_WATER      0      0           1           10

         LIQ_BEER       1      3           2           5

         LIQ_WINE       2      5           2           5

         LIQ_ALE        3      2           2           5

         LIQ_DARKALE    4      1           2           5

         LIQ_WHISKY     5      6           1           4

         LIQ_LEMONADE   6      0           1           8

         LIQ_FIREBRT    7      10          0           0

         LIQ_LOCALSPC   8      3           3           3

         LIQ_SLIME      9      0           4           -8

         LIQ_MILK       10     0           3           6

         LIQ_TEA        11     0           1           6

         LIQ_COFFE      12     0           1           6

         LIQ_BLOOD      13     0           2           -1

         LIQ_SALTWATER  14     0           1           -2

         LIQ_CLEARWATER 15     0           0           13


KEY (Type Flag 18)Edit

   value 0: unused

   value 1: unused

   value 2: unused

   value 3: unused


FOOD (Type Flag 19)Edit

   value 0: The number of hours of hunger satisfied by this food.

   value 1: unused

   value 2: unused

   value 3: Non-zero if the food is poisoned, 0 otherwise.


MONEY (Type Flag 20)Edit

   value 0: The number of gold coins in the pile.

   value 1: unused

   value 2: unused

   value 3: unused


PEN (Type Flag 21)Edit

   value 0: unused

   value 1: unused

   value 2: unused

   value 3: unused


BOAT (Type Flag 22)Edit

   value 0: unused

   value 1: unused

   value 2: unused

   value 3: unused


FOUNTAIN (Type Flag 23)Edit

See Values for Drink Containers.