home » builders » builder's lessons » objects basic information

Objects - basic information

Below is a sample object, and then following that is an explanation of each field in the object.

#QQ00
ring pink ice~
{D0}a pink ice ring~
{D0}A pink ice ring is lying here.~
~
ITEM_TYPE_TREASURE
FLAG_GLOW|FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_FINGER
QUALITY_AVERAGE MATERIAL_GOLD CONDITION_PERFECT SIZE_MEDIUM
0 0 0 0 LAYER_ALL 0
E
pink ice ring~
{B0}It is golden ring with {D0}a pretty pink gem in it.
~
A APPLY_STR 1
>wear_prog 100~
mpechoat $n The ring feels cold on your finger
~
|

Lets look at the above item, a ring line by line. A note to builders who have been with us for a while. Some of the syntax for the flags have changed. The old syntax will still work, but the lessons have been updated to the new syntax. OLC will print out your area in the new syntax.

#QQ00 - This is the VNUM of the object. As with rooms and mobiles start at 00. You can only have as many objects in your area as you have vnums allocated. ie If you have a 100 room area then you will be limited to 100 objects.

ring pink ice~ - These are the keywords of the object. This is the word that is used in order to interact with the object. ie get ring or look pink or drop ice. Make sure you have adequete keywords from your short and long descriptions of the object. There is nothing more frustrating for a player who sees a pile of gold fabric on the ground which is a celestial robe when worn but you have neglected to add gold or fabric to the key words and they don't know what to pick up.

{D0}a pink ice ring~ - This is the short description that a players sees when they type inventory or they use the object. The first character should be lower case as it is often used in the middle of sentences. Make sure you use articles where applicable (ie a, then, an). Note that the short description is colourised. The {D0} makes the item pink in colour. All objects should be colourised. See the lesson on object colourisation for more information on our colourisation standards.

{D0}A pink ice ring is lying here.~ - This is the long description of the object. It is what the player sees when they enter the room and the object is visable. The long description of the object should always be colourised.

~ - This is the action description. It is not used by FKMud code so leave it blank and just put in the tilda ~.

ITEM_TYPE_TREASURE - This determines item type. See the list of item types for all possible types. You must give your objects appropriate types. For instance rings are treasure and not armour.

FLAG_GLOW|FLAG_MAGIC - This is for extra attributes of the object. You can define more than one flag by seperating them with a pipe |. If an item has any sort of magical apply or program that makes it act magical you MUST flag it FLAG_MAGIC. See here for a list of flags. Note to older builders, this is one of the fields that has had a syntax change. The ITEM part of the flag has been removed.

CAN_WEAR_TAKE|CAN_WEAR_FINGER - The CAN_WEAR_TAKE flag defines if the object can be picked up. Most objects in the game will need to have this flag. For items like fountains you wouldn't have this flag. The next defines the wear locations. You can have more than one location. However more than two locations is strongly discouraged except in special situations. If there is no wear location for an object just put a 0 in for field. For a list of wear locations look here. Note to old builder, the syntax of the wear flags has changed and the ITEM has been replaced with CAN.

QUALITY_AVERAGE MATERIAL_GOLD CONDITION_PERFECT SIZE_MEDIUM This line states the quality of the object, the material it is made from, its condition and its size. Refer to here and here for more information. Note to older builders, the QUALITY flag no longer has the word ITEM in it.

0 0 0 0 LAYER_ALL 0 - These are the values of the object. See the table here for more information. Each different object has different uses for those values. Many types leave them unused or some of the unused. Refer to the Layer Lesson for more about Layers. Each of the zeros has a field name, the first is VALUE0, the second VALUE1, and it continues to the last one being VALUE5. VALUE5 is not used by any of the objects. Builders are free to use it in object programs to check the status of an object.

E
pink ice ring~
It is golden ring with a pretty pink gem in it.
~

This is the extra description. The E denotes that there is an extra description. You can leave off all of these 4 lines if you wish to have no extra description. It is encouraged on Forgotten Kingdoms that you do have extra descriptions as there is nothing worse than typing look ring and seeing you see nothing special about a pink ice ring. The second line of the extra description is the key words. A player would type look keyword to see the extra description. The third line is the actual description. Place the tilda on the line below it as if you dont the description looks cramped on the game. An item can have more than one description with different key words. For instance you could refer to runes in the first description, and then have an extra description with the keyword of runes that would show more information to the player. An object can have more than one extra description. The keywords need to be different for each each description.

A APPLY_STR 1 This is where you can put special attributes of an item. This ring adds 1 strength. For a list of applies see here. Note that we ask you keep your applies to a minimum and do not apply damroll or hitroll to armour items. Damroll and hitroll are only for weapons. There is the rare exception to this. Any exception should be run by the builder admins. Magic items should not be very easy to get. They should involve an area or immortal driven quest to obtain.

>wear_prog 100~
mpechoat $n The ring feels cold on your finger.
~
|

This is where you would put in the mud program on the object. See the lesson on object programs for a listing of possible programs on objects.

Please note that builders do not set the weight, cost and level of the objects. These things are determined by the hard code looking at things like item type, material, condition and so on. If you want to change the weight and value of an item from what the hard code sets it to you will need to use applies. There must be good IC reason for to change these attributes of an object with applies.