This is a document written for building armour with the Nightmare mudlib. Originally written by Descartes 20 october 1992 Rewritten by Descartes 25 june 1993 ------------------------------------------------------------------------- These are the things you MUST do in building armour: ::create(); Make sure you call this always first thing in the function create()! set_name("helmet"); This gives the helmet a name, how it will often be referred to in the game as far as messages to mortals are concened. set("id", ({ "helm", "helmet" }) ); This gives the helmet a means of being referred to. The basic difference between name and id is between output and input. The game makes references to objects using name, player reference objects using ids. set("short", "The helmet of love"); This is the short description of the helmet. set("long", "People who love wear this helmet."); This is what players see when they look at the item. set_type("helmet"); Armours have many different types. You will have to refer to the mud's document on armours to find out what the legal types are. set_ac(5); Sets the protection the limbs covered by the armour will get for wearing the armour. See the balance documents for limits. set_limbs( ({ "head" }) ); Sets the limbs which the armour item protects. The item can be set up to protect more than one limb, but there are guidelines for which limbs can be protected by which armour types. set_weight(167); Sets how much the armour weighs. set("value", 300); Sets the value of the item in gold. Conversion to other currencies is done by the objects that need to convert them. That is all you need to do to create a simple armour object. However, there many other neat functions for creating a more interesting item object. ******************************************************************************* Optional functions: ------------------- set_wear_string("You feel safer in the helmet of love.\n"); This changes the message a player gets when wearing an item from: You wear A helmet. to: You feel safer in the helmet of love. set_wear_func(this_object()); This tells the armour object that you have written a function called extra_worn() in the object that has this line. In other words, you wrote the extra_worn() function in the helmet if it this function if written in create() of the helmet, or you wrote extra_worn() in the room if you are simply customizing a generic armour object through cloning. The important thing is the argument to this function (this_object()) is the object in which the function you define can be found. The function must be called extra_worn, and it must be of type int, and it return a 1 if the player gets to wear the armour, or 0 if the player is not allowed to wear it. set_unwear_string("You do not feel like loving any more."); Similat to set_wear_string() except for when the thing is removed. set_unwear_func(this_object()); Similar to set_wear_func() except for removing. set("read", "\"May you love while you wear this helmet.\""); This makes it so that when a player types: read helmet OR read writings the player gets written back: "May you love while you wear this helmet." set_property("magic item", ({ "illuminate" }) ); Gives the armour the magic property of responding to the command illimunate by lighting the room for a bit. No clue that this property exists in the object should be given, since there are some magic users who will be able to magically sense this magic property in the armour. That is all of the special settings designed in armour.c :) **************************************************************************** Making an armour object magical: If you want to add a magical propert to an armour item, do the following set_property("magic item", ({ "command" }) ); This lets people who sense magical properties in objects sense that property. You must, of course, add the action and define the function yourself. :)