CREATING ITEMS IN MAJIK 'Item' stands for any non-living object that appears in the game. This document covers creating any item excluding weapons and armour which are (hopefully :) described in corresponding help file. For demonstration purposes, I use a fishing pole as an example. *-*-*-*- fishpole.c -*-*-*-* void create_item() { set_name("pole"); set_short("A fishing pole."); set_long("This is a wooden fishing pole suitable for fishing.\n" + "It surely has seen better days.\n"); set_taste("The fishing pole tastes just like any other fishing pole.\n"); set_smell("As you smell the fishing pole you notice a faint odor of\n" + "rotten fish.\n"); set_listen("As you might expect, fishing poles don't speak very much.\n"); set_dimensions(2, 2, 300); /* 300 cm long, 2 cm thick */ set_weight(500); /* weighs 500 grams */ set_hp(4); set_maxhp(10); set_material("wood"); set_properties("skill fishing", 10); } *-*-*-*-*-*- (functions with :** are mandatory!) :** set_name(), set_short(), set_long() These functions define the visual attributes of an item just like in every other object in majik so they should be quite self-explanatory. : set_taste(), set_smell(), set_listen() To get some more 'realism' into game (and to frustrate area coders :) it's possible to assign taste, smell and sounds to items, which can be seen with corresponding commands (taste, smell, listen). :** set_dimensions(x, y, z) With set_dimensions() you can describe the physical size of item by defining a 'bounding box', in other words size of the smallest box that covers the item. Order of x, y and z components is not meaningful. Components are measured in centimeters. :** set_weight(weight) Weight must be set in order to allow characters to carry (or not carry) the item. For safety reasons items with unitialized or zero weight cannot be taken, but you shouldn't use it for creating non-gettable items (see: gettable()). Weight is measured in grams. : set_hp(), set_maxhp() These define the toughness of item or how much damage must be done in order to damage it into useless condition. If you don't define these, item has only one hp which stands for very fragile objects (glass for example). :** set_material("material") or set_material(([ "material1" : 5, "material2" : 95 ])) Material must be set to allow item to be repaired and identified correctly. You can define multiple materials by using a mapping defining percents of current material as values. For more detailed information, see /doc/misc/materials.txt. : set_property("" ,) To achieve special properties for item, you must use set_property(). These properties include for example bonuses to skills or spells and bonuses to character stats. , which defines the property type consist of two parts. First part defines the type of property and second the exact property. Available types are "skill", "spell", "stat", "regen" and "func". Second part is the real property. Some examples: set_property("skill attack", 5); // +5% attack set_property("stat str", -2); // -2 str set_property("func damage_player", 1); // do 1 damage to player every hb . // provided that damage_player . // is in player object *-*-*-*- +) Dazzt