The Builder's Handbook (version 2.2) By Builder_5 And Updated By Matrix (of the Curious Area Workshop) TABLE OF CONTENTS 1. Overview 2. Terminology 3. Basics 4. The .wld file 5. The .mob file 6. The .obj file 7. The .shp file 8. The .zon file 9. Putting it all together 10. Credits 1. Overview This document is meant to be a basic tutorial to building areas for DikuMuds. Readers of this Handbook should have at least have some experience with Dikus, and will understand the basic Diku concepts of armour, levels, and the et cetera. Nowadays, many mud-admins express the wish to have an entirely unique world. Unfortunately, building is time consuming and requires no mean amount of skill, with the added 'bonus' of being hard to learn; the standard Diku-docs that get bandied about are somewhat vague on certain subjects, and were originally intended as a reference guide rather than a learning document. I hope to make this Handbook a 'cookbook' of sorts -- an explanation of the 'how's and 'what's of building a Diku based area for the non-coding inclined. This document is a tutorial for building in the standard 'gamma' release DikuMud. Most muds have changed or added to the information, but still follow the basic format. Reading this document should prepare you for most DikuMuds you will encounter out there. The Curious Area Workshops highly recommends that every builder understand the nuts and bolts of building, even if they have access to one of the Diku-area editors available out there. Being able to build with an editor is nice, but the knowledge of how the nuts and bolts of building actually works is extremely valuble when things go wrong. We cannot emphasize this enough, but we will attempt to refrain from preaching it in the rest of this document. 2. Terminology Here are some common terms used in builing, and this handbook: Desc: Short for 'description'. Db: Database. The files that make up the 'world' of a DikuMud. Flag: A bit-vector that tells the mud that a particular monster, object, or room has a certain quality. (i.e. 'Dark', 'Magic', 'Aggressive') See FLAGS in section 3 -- Basics. Mob: Mobile. A monster. Ob/Obj: Object. Tilde: This is a tilde: ~ . It signifies the end of a line or a field in some of the database files. Vnum: An object, monster, or room's unique identification number. Stands for 'Virtual Number'. Zone: Used synonimously with 'area'. 3. Basics For all examples, the area under creation will be known as 'Handbook' or 'example area'. It is assumed that the builder has access to some standard type of text editor and knows how to use it. (We recommend emacs for Unix platforms, and WordPerfect for Dos platforms. Note that all files created in WordPerfect MUST be exported into ascii format before they can be used). *** FILES For each area, five files must be created for inclusion into the DikuMud's db: Handbook.wld -- The file that contains all the information on the rooms of an area. Handbook.mob -- This file contains all mob information. Handbook.obj -- This file contains all obj information. Handbook.shp -- Information on shops. Handbook.zon -- A 'meta-file' that tells the mud which mob/obj goes where, who gets what, how often the area resets, etc. *** FLAGS Simply put, a flag tells the mud that there is something 'special' about a mob, room, or object. In the sections below, lists of flags will be given with a number, a bitvector, next to it. For example, here is the list of room flags that will appear below in the .wld section: 1 Dark 2 Death 4 No_mob 8 Indoors 16 * Lawful - not implemented in standard Diku 32 * Neutral - not implemented in standard Diku 64 * Chaotic - not implemented in standard Diku 128 * No_magic - not implemented in standard Diku 256 * Tunnel - not implemented in standard Diku 512 Private Now, for example, you are building a room. Deciding that this room is a small section of tunnel, you would choose the flags 'Dark' (1), and 'Indoors' (8) (Tunnel is not implemented in standard Diku). These numbers are the important part. When the mud looks at the .wld file, it looks for _one_ number in a certain particular spot for each room's flags. Therefore, to give one room _two_ flags, you ADD the bitvectors together and place that number in the flags spot of that room's data. Thus for this example, Indoors + Dark = 9. How does this work, though? The bitvectors are in binary... the number you arrived at when you added can only be reached by one combination of adding those numbers together (you're not allowed to use a flag or number more than once). Thus, if your number was 522, you would know that it was 'Private' (the highest number that will go into 522) 'Indoors' (522-512=10. Indoors (8) is the next highest number that will go into that), and 'Death' (10-8=2, 2-2=0 -- no more flags). *** Zone Number Each area must have its own unique number. Usually, the imp of your particular mud will assign this to you. This number is used the .zon file and appears as part of all your area's virtual numbers (see below). *** Virtual Numbers Every Mob, Obj, Room, and Shop must have its own Virtual Number for the mud to identify it with. Each number must be unique among its own type. For example, If I made the Sword of Cheezy Destruction, I may decide to make it item number 2200 of my zone. The first two digits are the zone number (above) of my area, the second two identify which item it is in that area. However, I can have a mobile with number 2200 as well. A room #2200 too. The number must be unique among all others of its type (rooms, obj's, mobs), but does not need to be unique in regards to other types of db's. Note that the mud doesn't really care if your objects start with your zone number; this is a convention to keep builders from stepping on each other's toes and is highly recommended, if not mandatory at most muds. 4. The .wld file The .wld file contains all the information necessary for the mud to make all the rooms of your area, link the exits together, and all the other little things concerned with the 'where's of an area. The file simply consists of all the rooms in sequential order by their virtual number. Here is a sample room for this section's example: ---example follows this line--- #2200 The First Room~ You are standing in the first room of this area. Many rooms are sure to follow, soon to be chock-filled with adventure, danger, romance, and Giant Green Photosynthetic Death Gerbils from Morovia. There is a sign hanging from the east wall here, and a large steel grate bars the way to the north. ~ 22 8 0 D0 You spot the Second Room to the north, behind a large steel grate. ~ grate steel~ 1 2200 2201 E sign~ The sign says: WELCOME TO THE FIRST ROOM! ~ S ---example precedes this line--- Now to explain what each part means, line by line: #2200 The virtual number of this room. Totally unique; no other room in the db will have this number. The First Room~ Short description: the 'title' of the room. This is typically not more than 5-6 words long. Note the tilde marking the end of this field. You are standing... ~ The long description of the room. This is what a player sees if he or she types 'look' in that room. What is in this section is up to your own, personal taste. More about the various description types can be found below. Note that a tilde follows on a line by itself. This is important, so that the mobs and obj in the room won't be jumbled all into one line. 22 8 0 The first number is the zone number of this room; what zone should the mud consider this room to be in for game purposes. Please see 'zone numbers' in section 3 of this handbook. The second number is the room flag value. Please see 'flags' in section 3 of this handbook, and Room Flags below. The Third number is sector type. Please see 'sector types' below. D0 An exit to direction 0. The section on 'Exits' below will shed more light on this subject. You spot the Second Room... ~ Direction description; what a player would see if he/she typed 'look north'. Note the tilde on its own line afterwards. grate steel~ What words can be used to manipulate the door. These two words can be used in conjunction with open, close, pick, and look commands, etc. 1 2200 2201 The first number is the door value, 1 being open/close/pick/lock and unlockable. This and the other numbers will be explained more fully under 'Exits' below. The second number is the key number... the virtual number of the object that can be used to lock or unlock this door. The third number is the vnum of what room this exit leads to. E Tells the mud there is an extra description coming. sign~ The words that can be used to look at the extra description. (i.e. 'look sign') Note the tilde ending the field. The sign says:... ~ The text of the extra description. Again, note the placement of the tilde on its own line. S End-of-Room character. Now, for more explanations... *** DESCRIPTIONS Descriptions are fairly self explanatory. However, the placement of tildes are very important. * Short Desc's: The short desc is placed at the top of the room description, and can often be seen even if the player is in 'brief' mode. Simply put, this is the title of the room. Short Desc's should be kept to one line minimum... the shorter the better, in fact -- it should just be the shortest possible description of this room: 'A Dark Tunnel', 'The Bakery', 'Ms. Celande's Office'. A Short desc follows this format: Title of Room~ * Long Desc's: The long desc is the full description of the room, which a player will typically see when entering or by typing 'look'. When creating a long desc, please keep in mind to keep each line under 75 characters, and put the ending tilde on a line by itself. * Extra Desc's: An extra desc (of which there can be many for each room), is something else specific to look at, not normally seen just by typing look, or entering the room. An extra desc is started by an E (a seperate E for each extra desc in the room), followed by the keywords that can be used to look at this description on the next line, each separated by a space, followed by a tilde. Then, the description itself, followed by a tilde on its own line: E keywords~ You spot the keywords. They look important! ~ *** ROOM FLAGS Please consult the section on flags in section 3 for how bitvectors are added and used. Briefly, add each flag's corresponding values that you want for a particular room to find your room flag number. A zero signifies no flags. 0 No Flag 1 Dark - character cannot see without a light source. 2 Death - death trap 4 No_mob - monsters cannot enter this room. 8 Indoors - players in this room will not get weather messages. 16 * Lawful - not implemented in some versions 32 * Neutral - not implemented in some versions 64 * Chaotic - not implemented in some versions 128 * No_magic - not implemented in some versions 256 * Tunnel - not implemented in some versions 512 Private - only 2 player may be in this room at a time. Ask your implementor about other flags that may be on your particular mud. *** SECTOR TYPES The 'sector type' of a room controls how many movement points it costs to enter that room. This is not a flag type item: choose one, and use the value... 0 Inside 1 City Streets 2 Field 3 Forest 4 Hills 5 Mountain 6 Water, swimmable 7 Water, not swimmable (need boat-type item to cross) *** EXITS Exits use the letter D and a number, compass, rather than the letter abbreviations that most mudders are used to for compass directions. Hence: (north) 0 4 (up) | / (west) 3-+-1 (east) + | / 2 5 (down) (south) Thus, an exit D4 is an upward direction, while D2 would be to the south. Each exit starts with its own direction field, and contains a exit description and door keyword list (both of which can be left blank with a tilde), and a fourth line containing a door type, key number, and exit-to-room number. Rooms without exits need no direction fields and the etc... this section may be safely ignored. The exit description is used for when a player types 'look '. This should in most cases be a vague description of what the next room might be, and is followed by a tilde on a line by itself. Each exit starts with its own direction field, and contains the following: - The next field is the door keyword list, used for manipulative door actions, such as open, close, pick, etc. These words are separated by a space, and are followed by a tilde on the same line. - The door type can be 1 (normal door), 2(unpickable door), or 0 (no door, or special door). - The key number is simply the vnum of the key that can open the door. A door without a keyhole is represented by a -1 in this spot, while a 0 will simply be ignored (used for exits without doors). - The exit-to-room number is the vnum of the room where the exit leads to. Use a -1 for the room number if you wish to merely have a description in the direction but no door. Please note that adding a description for the door itself is usually done under the 'extra descriptions' part of the room db. *** ROOM ARCHETYPE (the <'s and >'s are used to offset values, and should be ignored) #vnum Room Title~ Room's Description ~ D exit description field ~ door keyword list~ E extra description keyword list~ extra description ~ S *** TIPS and OBSERVATIONS * Map it out the rooms on paper first. Be grandiose. As you build, it will usually get smaller anyways! * When making a DT (deathtrap -- a room with a death flag) make exits back to the rooms that lead to it... so people in those rooms can hear the scream. Likewise, it is usually not good to make a death room dark. * For a working door, the rooms on each side must have matching doors and doorflags. * Capitalize the name of the room, and do not end with punctuation unless you feel it is absolutely necessary. Also, try to make it a coherent name. * For the room description, try to include obvious exits and important things in the room. Do not put mobs, objs, or otherwise in the room description. Finally, try to line up the right-most column as best you are able. * For doors, exits, and so forth, try to include an extra description of the door (for example, one for 'door wooden'), as well as a short description when looking in the direction of the door. This description usually works best when it is similar to the door's description. * For extra descriptions, try to make one for each thing that you would think to look at the the room description or in other extra descriptions. If there is one word that could mean two or more things, include them all in if you like, or direct the player to another description for such. * Do not use extra descriptions for direction descriptions, instead lay out a new door that exits to the room '-1' since the mud will default to checking the direction over the extra description. * Make sure that you make your descriptions interesting to read, after all, noone likes to read the same thing over and over again. 5. The .mob file The .mob file contains everything the mud needs to know about the mobs, except for where they are and what they're holding. Each mob in the file is in sequential vnum order. There are two types of mob files, but only the 'simple' mob type is described in detail below. The simple mob type contains all the necessary distinctions commonly used in muds -- the 'complex' mobs take a lot of time and effort for very little return. Most, if not all muds use simple mobs. The complex mob archetype will be given later in this Part, but no explanation will be given. Here's a sample mob: ---example follows this line--- #2200 mob example~ the Example Mob~ An example mob stands here, completely clueless. ~ The example mob looks indistinct, as if it hasn't been completely fleshed out yet. ~ 194 8 100 S 1 20 10 1d6+2 1d4+0 10 100 8 8 0 ---example precedes this line--- Now, to explain, line-by-line: #2200 The vnum of the mob. Read the section on Virtual Numbers in part 3 of this document for more information. mob example~ The namelist of this mob: what words can be used to interact with this mob. For instance, 'kill mob' or 'kill example' would both be valid for this mob. Note the tilde following the field. the Example Mob~ The short desc of the mob. Used in messages such as, "You poke the Example Mob." or "the Example Mob pounds you!" Note the tilde following the description. An example mob stands... ~ The long desc of the mob. Used as part of a room description when a player enters or looks in a room. Note the tilde on its own line after the description. The example mobs looks... ~ This is the description of the mob; what a player sees when typing 'look' at the mob. 194 8 100 S The first number is the ACTION flag of the mob, which tell the mud how the mob should act. The second number is the AFFECTION flag, which tells the mud about any special abilities the mob might have. Both these flag values work as per the section 'FLAGS' in part three of this handbook. See 'ACTION & AFFECTION FLAGS' below for more on both of these. The third number is the alignment of the mob, ranging from 1000 (good) to -1000 (evil). The 'S' stands for simple mob. Complex mobs are denoted by anything other than an 'S' in this field. Complex mob archetypes are covered later, but no explanation for these will be given. 1 20 10 1d6+2 1d4+0 Field one is the mob's level. The second field is the mob's 'Thaco', or rather, 'To Hit Armour Class 0'. There is more on this under 'THACO' below. The third field is the mob's armour value. Field four is the mob's hit points. There is more on Hitpoints and damage below in the aptly named 'HITPOINTS and DAMAGE'. The fifth field is how much damage a mob does with its bare hands. 10 100 The first number is how much gold pieces this mob is carrying. The second is how many experience points it is worth. 8 8 0 The first and second number are the mob's loading and default position, respectively. There is a section below: 'POSITIONS' that will explain more. The final number is the mob's gender; 0 is neuter, 1 is male, and 2 is female. *** DESCRIPTIONS Descriptions are done much the same way as those in the section in 'Rooms', earlier in this handbook. The reader is encouraged to go back and reread that section if necessary. However, the placement of tildes is still very important. * Short Desc: the tilde must follow right after the description, on the same line. * Long Desc & Mob Desc: The tilde must follow on a line by itself. *** ACTION & AFFECTION FLAGS Action flags tell the mud how a mob behaves, and affection flags control the 'special qualities' of a mob. These flags are added together in the way detailed in 'FLAGS', in part 3 of this handbook. Below is a listing of flags for each type, with descriptions of what each does: Action Flags ------------------------ 1 Special - Special routine which can be found in the file spec_proc.c . Ask the admins of your mud for more information on specials. 2 Sentinel - This mob stays put. 4 Scavenger - This mob picks up stuff lying on the ground. 8 * IsNPC - Reserved. Do not use. 16 Nice to Thieves - Will not attack a player trying to steal from it. 32 Aggressive - Automatically attacks players it can see. 64 Stays in zone - Will not enter a room with a different zone # than its own. See 'zone numbers' in section 3. 128 Wimpy - Will flee when hurt badly. Affection Flags ----------------------- 1 * Blind - Reserved for players, or internal use only. 2 Invisible - mob is invisible 4 * Detect Evil - Reserved for players, or internal use only. 8 Detect Invis - mob can see invisible players 16 * Detect Magic - Reserved for players, or internal use only. 32 * Sense Life - Reserved for players, or internal use only. 64 * Hold - Reserved for players, or internal use only. 128 Sanctuary - mob is affected by the 'sanctuary' spell. 256 * Group - Reserved for players, or internal use only. 512 * - This flag was left out in the Original DikuMud. 1024 * Cursed - Reserved for players, or internal use only. 2048 * Flaming - Reserved for players, or internal use only. 4096 * Poisoned - Reserved for players, or internal use only. 8192 * Protected/Evil - Reserved for players, or internal use only. 16384 * Paralyzed - Reserved for players, or internal use only. 32768 * Morden Sword - Reserved for players, or internal use only. 131072 * Slept - Reserved for players, or internal use only. 262144 * Dodging - Reserved for players, or internal use only. 524288 Sneaking - mob cannot be seen entering or leaving a room. 1048576 Hiding - mob is hidden 2097152 * Afraid - Reserved for players, or internal use only. 4194304 Charmed - mob will act charmed if 'follow ' is entered. 8388608 * Following - Reserved for players, or internal use only. *** THAC0 Thac0, or 'To Hit Armour Class 0', is a function of how well a mob can hit a player, or another mob. This number is a target number, which a mob must get higher than on a random 'roll' between 1 and 20 to hit. After this random number is found, and all other bonuses and penalties are weighed in, the final number is compared to the target number, and the mud will determine if the mob has hit. Armour class 0 is just a handy benchmark for the system. The target number at armour class 0 is modified up or down based on what the target's armour is like. For example, if a sample mob with a Thaco of 19 were trying to hit a player with a 5 armour, its adjusted target number would be 14 to hit this player. Likewise, if the same mob were trying to hit a player with a -2 armour, it would need a 21 to hit (good luck!). *** HITPOINTS and DAMAGE The functions of hitpoints and damage are arrayed randomly by the mud, as a function of imaginary dice and bonuses. These always follow the form xdy+z, where x is the imaginary amount of dice, y is how many sides these dice have, and z is a constant being added to the final total. For example, our example mob had hitpoints of 1d6+2: a random number between 1 and 6, then add 2, for a range of 3-8. Another mob might have 10d10+150 for a range of 160-250. Damage is calculated the same way. These fields must follow the form xdy+z, even if z equals 0! For instance, our example mob does 1d4+0 damage with its bare hands... One more important thing to know about damage: this is the mob's damage with its fists/claws/what-have-you. If this mob is wielding a weapon, it will do the weapons damage instead of its own, but will then ADD its z constant to the amount of damage done as a strength bonus. *** POSITION A mob always has two position numbers: its loading position, and its default position. A mob will be loaded into its loading position initially, and after fighting, will return to its default position. Note that these do not have to be the same, but usually are. The valid positions are: 4 Sleeping 5 Resting 6 Sitting 8 Standing There are a few more positions than these, but are not used except during fighting, which the mud takes care of automatically. *** Standards and Measures These are the suggested strengths of mobs, as given in the original Diku documentation... Level Hp. Exp. Thaco Armour Damage Notes ----------------------------------------------------- 0 1-10 25 20 10 1d4+0 1 11-22 100 20 9 1d5+0 2 23-35 200 19 8 1d6+0 3 36-47 350 18 7 1d7+0 4 48-60 600 17 6 1d8+0 5 61-72 900 16 5 2d4+0 6 73-85 1500 15 4 1d8+1 7 86-97 2250 14 4 2d4+1 8 98-110 3750 13 3 2d5+1 9 111-122 6000 12 3 2d5+1 10 123-135 9000 11 2 2d6+1 11 136-147 11000 10 2 2d6+1 12 148-160 13000 9 2 2d7+1 13 161-172 16000 8 2 2d7+1 14 173-185 18000 7 1 2d8+1 15 186-197 21000 6 1 2d8+2 16 198-210 24000 5 1 2d8+2 17 211-222 28000 4 1 3d6+2 18 223-235 30000 3 0 3d6+2 19 236-247 35000 2 0 3d6+3 20 248-260 40000 1 0 3d6+4 Minor Demons 21 261-350 50000 0 -1 3d7+4 22 351-400 60000 0 -1 3d8+4 23 401-450 80000 0 -2 3d8+4 Shopkeepers 24 451-500 100000 0 -3 3d8+4 Guildmasters 25 501-550 130000 0 -4 4d6+4 26 551-600 155000 0 -6 4d6+4 Major Demons 27 601-650 200000 0 -7 4d6+4 Demigods 28 651-700 310000 0 -8 4d6+5 Lesser Gods 29 701-900 450000 0 -9 4d7+5 Demon Lords/Arch Devils 30 901-1000 600000 0 -10 4d8+5 Greater Gods *** ARCHETYPE MOB (simple) #vnum name list~ short desc~ long desc ~ mob desc ~ S *** ARCHETYPE MOB (complex) #vnum name list~ short desc~ long desc ~ mob desc ~ *** TIPS and OBSERVATIONS * Mobs wander around by default. Remember to include the 'Sentinel' Action flag for stationary mobs! * 'Angry' mobs can be simulated by loading them sitting and agressive, with a default position of standing. After being attacked, they will wander around instead of sitting back down! Other interesting things can be done with the position values as well... * For the keywords of a mobile, there is no need to capitalize any of them, try to keep them all small letters for format cohesion. The order of the keywords does not matter at all, and try to have as many keywords to describe the mobile as possible from both the short description and the long description. For example: mayor neftlewitz man tall~ would be good for the following long description: A tall man is walking about here. It appears to be Mayor Neftlewitz. * For short descriptions, always use 'the' unless the mobile has a proper name. Above all, never put punctuation at the end of a short description. Also, do not to capitalize the first letter of the short description unless it is a proper name. * For long descriptions, end with proper punctuation, and make sure that the description is a complete sentence with proper grammar. * For the description, try to tell the player what the mobile looks like, how it is acting, etc... Do not include items in the description if possible, since if the mobile is given them, they will appear twice and it will look rather silly. 6. The .obj file An object is any item in the game, be it unmovable rock, the fountain in market square, or that nice sword Everyman the Barbarian has. Everything the mud needs to know about objects can be found in the .obj file, except for where they actually are. Here is an example object, followed by a line-by-line breakdown: ---example follows this line--- #2200 sword example~ an example sword~ An example sword lies on the ground, exampling. ~ ~ 5 64 8193 0 3 1 10 5 1000 100 E sword example~ It looks very shiny and polished, as if someone is taking care to try to make a good example. ~ A 1 1 ---example precedes this line--- The line-by-line breakdown: #2200 The vnum of the object. See the section on virtual numbers in Part 3 of this Handbook. sword example~ The namelist of the object: what words can be used to manipulate the object. In this case, either of the words 'sword' or 'example' can be used in conjunction with a wield, drop, take, etc. an example sword~ Short desc. This is seen when the object is the target of a command: 'You wield an example sword.' 'You give an example sword to...'. An example sword lies on the ground, exampling. ~ The long description. This is what a player sees if the object is lying in a room by itself. ~ This is the action description, and is NOT used at all. Just a tilde by itself for this field. 5 64 8193 The first number is what type of object this is... a weapon. See 'OBJECT TYPES' below. The second number is the object's flags. See 'OBJECT FLAGS' below. The final number is the wear flags of the item, a flag that tells the mud where the item can be worn on a player or mob. See 'WEAR FLAGS' below. 0 3 1 10 These are the object's values. What each number means is completely dependant on what Type of object it is. See 'OBJECT VALUES' below. 5 1000 100 The first number is the weight of the object. The second field is the value of the object, in gold coins. The final field is rent value of the object, or how much it costs to rent this item per day, in gold coins. E sword example~ It looks very shiny and polished, as if someone is taking care to try to make a good example. ~ This is an extra description, and behaves EXACTLY like the extra descriptions of rooms. The reader is referred to Part 4 of this Handbook for more information. A 1 1 These are 'applies' of the weapon... the 'A' signifying that an apply is forthcoming. The second digit is the type of apply, and the third how much the apply is worth (either positive or negative). See 'APPLIES' below. *** DESCRIPTIONS The short desc and long desc are similar to those of mobs and rooms, as well as the placement of tildes. * Short Desc: Tilde at the end of the desc. * Long Desc: Tilde on its own line. * Action Desc: No field, just a tilde. *** OBJECT TYPES The value of this field can be found in the chart below... 1 Light 2 Scroll 3 Wand 4 Staff 5 Weapon 6 * Fireweapon - not implemented in standard Diku 7 * Missile - not implemented in standard Diku 8 Treasure 9 Armour 10 Potion 11 * Worn - not implemented in standard Diku 12 Other 13 Trash 14 * Trap - not implemented in standard Diku 15 Container 16 * Note - not implemented in standard Diku 17 Drink Container 18 Key 19 Food 20 Money 21 * Pen - not implemented in standard Diku 22 Boat *** OBJECT FLAGS The following chart gives values and explanations of all the object flags... 1 Glow - item glows 2 Hum - item hums 4 Dark - Not Implemented 8 Lock - Not Implemented 16 Evil - Not Implemented 32 Invis - item is invisible 64 Magic - item has a magic aura 128 Nodrop - item cannot be dropped 256 Bless - item is blessed 512 A-Good - not usable by good aligned. Not imp'ed in some versions. 1024 A-Evil - not usable by evil aligned. Not imp'ed in some versions. 2048 A-Neut - not usable by neutral aligned. Not imp'ed in some versions. *** WEAR FLAGS These flags are handled the same way as the flags mention is Part 3 of this Handbook. The chart is fairly self-explanatory. # Where Wear Notes 1 Take - item is takeable (IMPORTANT!) 2 Finger 4 Neck 8 Body 16 Head 32 Legs 64 Feet 128 Hands 256 Arms 512 Shield 1024 About body - not always usable on some muds 2048 Waist 4096 Wrist 8192 Wield 16384 Hold 32768 Throw - not implemented *** OBJECT VALUES The four numbers consisting of the 'item values' are different for each type of item. Below the meanings of these numbers are broken down by each type. Zeroes refer to fields not used, while letters are explained for each section... (please note this is basically lifted verbatim from the Diku-docs. Credits to the original author(s), and no disrespect intended.) LIGHT (1) Value[0]: Not Used Value[1]: Not Used Value[2]: Number of hours the light can be used for. Zero hours means that the light has gone out. A negative number will create an eternal light source. Value[3]: Not Used SCROLL (2) Value[0]: Level of the spell on the scroll. Value[1]: Which spell (see 'Spell ID's below for more information on this) Value[2]: Which spell (unused spells should be set to -1) Value[3]: Which spell WAND (3) Value[0]: Level of spell in wand. Value[1]: Max Charges (1..X) Value[2]: Charges Left Value[3]: Which spell in wand (see 'Spell ID's below for more information) STAFF (4) Value[0]: Level of spell in staff. Value[1]: Max Charges (1..X) Value[2]: Charges Left Value[3]: Which spell in staff (see 'Spell ID's below for more information) WEAPON (5) Value[0]: Not Used Value[1]: Number of dice to roll for damage Value[2]: Size of dice to roll for damage Value[3]: The weapon type. Type is one of: NUMBER CATEGORY Message type 2 : Slash "whip/whips" 3 : Slash "slash/slashes" 6 : Bludgeon "crush/crushes" 7 : Bludgeon "pound/pounds" 11 : Pierce "pierce/pierces" TREASURE (8) [all values are 0... a treasure is an item with a high field, basically] ARMOUR (9) Value[0]: The effective AC. A positive value is a bonus, a negative is a penalty. Value[1]: - Value[2]: - Value[3]: - POTION (10) Value[0]: Level of the spell in the potion. Value[1]: Which spell (see 'Spell ID's below for more information) Value[2]: Which spell (unused values should be set to -1) Value[3]: Which spell WORN (11) Value[0]: Protection from cold. Value[1]: Protection from hot. Value[2]: - Value[3]: - OTHER (12) [all values should be set to 0] TRASH (13) [all values should be set to 0] CONTAINER (15) Value[0]: Maximum weight the container can contain. Value[1]: Container flags: CLOSEABLE 1 PICKPROOF 2 CLOSED 4 LOCKED 8 Value[2]: The key vnum of the container. No lock = -1. Value[3]: Internal use for Corpses that must "rot". DRINK CONTAINER (17) Value[0]: Maximum drink-units the drink-container can contain. Value[1]: Number of drink-units that are left in the container. Value[2]: The type of liquid in the drink-container, one of: Type nr. Drunkness Fullness Thirst WATER 0 0 1 10 BEER 1 3 2 5 WINE 2 5 2 5 ALE 3 2 2 5 DARKALE 4 1 2 5 WHISKY 5 6 1 4 LEMONADE 6 0 1 8 FIREBREATH 7 10 0 0 LOCALSPC 8 3 3 3 SLIME 9 0 4 -8 MILK 10 0 3 6 TEA 11 0 1 6 COFFE 12 0 1 6 BLOOD 13 0 2 -1 SALTWATER 14 0 1 -2 COKE 15 0 1 5 The above values for drunkness/fullness/thirst are used per four "units" drunk. The values are expressed in HOURS! Example: Dragon empties a bottle (say 7 units) of saltwater. His Drunkness is not changed ((7/4)*0) His Fullness increases by ((7/4)*1) hours His Thirst increases by ((7/4)*-2) hours, thus making him More thirsty. The hours above are numbers between 0 and 24. 24 hours is maximum for drunkness/fullness/thirst. Value[3]: if this value is non-zero, then the drink is poisoned. KEY (18) Value[0]: The key-type. This value should be the same as the object number. Value[1]: - Value[2]: - Value[3]: - FOOD (19) Value[0]: The number of hours, that this food will fill the stomach Value[1]: - Value[2]: - Value[3]: If this value is non-zero, the food is poisoned. MONEY (20) Value[0]: The number of gold coins "in the pile of coins". Value[1]: - Value[2]: - Value[3]: - ITEM_BOAT (22) [all values should be set to 0] *** SPELL ID #'s Due to the calculations performed in the damage routines of a standard mud, the following must be kept in mind; spells are more powerful when cast at the lowest level capable of casting the spell, compared to higher levels casting the same spells. An Example: The Mighty Eeyore is a 7th level mage, and has just earned the spell 'shocking grasp'. This spell will do the most damage while Eeyore is 7th level. When Eeyore becomes 8th level, the damage caused by this spell will dramatically reduce, and 9th level will reduce it even more. Please keep this in mind when choosing spells, and the level of the spells in a particular item. Below is a chart (lifted from the original Diku-docs, mostly) that gives the id# and usage of each spell... ID # POTION SCROLL WAND STAFF ARMOUR 1 Y Y Y N TELEPORT 2 Y Y Y Y BLESS 3 Y Y Y N BLINDNESS 4 Y Y Y Y BURNING_HANDS 5 N N N N CALL_LIGHTNING 6 Y Y N Y CHARM_PERSON 7 N Y N Y CHILL_TOUCH 8 N N N N CLONE 9 Y Y Y N COLOUR_SPRAY 10 N Y Y N CONTROL_WEATHER 11 N N N N CREATE_FOOD 12 N Y N N CREATE_WATER 13 N N N N CURE_BLIND 14 Y N N Y CURE_CRITIC 15 Y N N Y CURE_LIGHT 16 Y N N Y CURSE 17 Y Y N Y DETECT_EVIL 18 Y N N Y DETECT_INVISIBLE 19 Y N N Y DETECT_MAGIC 20 Y N N Y DETECT_POISON 21 Y Y N N DISPEL_EVIL 22 Y Y Y Y EARTHQUAKE 23 N Y N Y ENCHANT_WEAPON 24 N Y N N ENERGY_DRAIN 25 Y Y Y Y FIREBALL 26 N Y Y N HARM 27 Y N N Y HEAL 28 Y N N Y INVISIBLE 29 Y Y Y Y LIGHTNING_BOLT 30 N Y Y N LOCATE_OBJECT 31 N N N N MAGIC_MISSILE 32 N Y Y N POISON 33 Y N N Y PROTECT_FROM_EVIL 34 Y Y Y Y REMOVE_CURSE 35 Y Y N Y SANCTUARY 36 Y Y N Y SHOCKING_GRASP 37 N N N N SLEEP 38 Y Y Y Y STRENGTH 39 Y Y N Y SUMMON 40 N N N N VENTRILOQUATE 41 N N N N WORD_OF_RECALL 42 Y Y Y Y REMOVE_POISON 43 Y N N Y SENSE_LIFE 44 Y N N Y IDENTIFY *53* N Y N N *** APPLIES An item apply is a particular effect the item has upon the holder/wielder/wearer's statistics. There can be a maximum of TWO applies on an item, each requiring their own 'A' flag to let the mud know that there is more than one apply. Thus, a sword that added one to a character's strength, and -10 to his hitpoints would be: A 1 1 A 13 -10 The first value is the type of apply, the second the value. Below is a list of the different types of applies, and their values. 1 Strength 2 Dex 3 Int 4 Wis 5 Con 6 Gender - Internal use only... do not use. 7 Class - Internal use only... do not use. 8 Level - Internal use only... do not use. 9 Age 10 Weight 11 Height 12 Mana - adds to max value 13 Hitpoints - adds to max value 14 Move points - adds to max value 15 Gold - Internal use only... do not use. 16 Experience - Internal use only... do not use. 17 Armour Class 18 Hitroll - bonus/penalty to hit 19 Damage roll - bonus/penalty to damage done by user 20 Anti-Para - bonus/penalty to resistance roll 21 Anti-Rod - bonus/penalty to resistance roll 22 Anti-Petrify - bonus/penalty to resistance roll 23 Anti-Breath - bonus/penalty to resistance roll 24 Anti-Spell - bonus/penalty to resistance roll (most used) *** OBJECT ARCHETYPE #vnum namelist~ short desc~ long desc~ ~ E keywords~ Extra desc ~ A *** TIPS and OBSERVATIONS * Items with applies to stats over +3 should be very rare on most muds, and hard to get. * A lot of small items make an area more interesting than a few incredibly powerful items, for the most part. This is very subjective, however. * Remember to put take wear-flags on almost everything. It is easier to put a take wear-flag on everything, and take off the ones you don't need (like fountains and such). * Don't feel limited to items players consider 'useful', such as weapons and armour. A giant (untakeable) monolith, and other strange and odd items can add a lot of atmosphere to an area. * When entering the keywords for an object, ensure that the first word is a general description of the object (ie 'sword' instead of 'black') and do not capitalize these keywords. * For Liquid containers, always make the first keyword the liquid name. In the short description, use only the name of the object and do not include the liquid (ie 'a glass' instead of 'a glass of milk') * Try to add as many keywords as possible, and unless you have a good reason not to, ensure that the long and short descriptions contain at least one keyword. * For short descriptions, do not end them with a period (.) and begin the description with a definite article unless the object has a proper name. Again, unless the short description is a proper name, do not capitalize the first letter. * Long descriptions should be complete sentences with proper grammer and should end with a period. * Try to add extra descriptions to each object covering all the keywords. Extra descriptions can add small interesting details to your area and are often remembered by players. 7. The .shp file The .shp file contains all the myriad information necessary to make a working shop in a mud. Here is an example of a shop from the .shp file, followed by a line-by-line explanation. ---example follows this line--- #1~ 2000 2001 2002 0 0 1.2 0.8 5 9 0 0 0 %s I don't have any of those!~ %s Are you sure you have one?~ %s Sorry--I don't buy those!~ %s I can't afford that... sorry.~ %s You can't quite afford that yet... sorry.~ %s That will be %d coins.~ %s Here's %d coins for that.~ 1 0 2000 0 2000 8 12 13 17 ---example precedes this line--- The explanation: #2200~ The vnum of the shop. This number is not used by the mud for any purpose, however. 2200 ... 0 These are the vnums of the particular items the shop sells. Note the 0's for unused fields. 1.2 0.8 The first number is the multiple of the markup in price for selling, the second the multiple for buying from the players. 5 ... 0 These are the item TYPES the shop buys. (see OBJECT TYPES in Part 6 of this handbook. (this example shop buys weapons and armour). Note the 0's for unused fields. %s I don't have any of those!~ ... %s Here's %d coins for that.~ These are all the messages the shopkeeper will say in particular situations. These are better explained in 'SHOP MESSAGES' below. 1 0 These are the shopkeeper's tempers. See 'TEMPERS and HOURS' below. 2200 The vnum of the shopkeeper. 0 This field is unused at present. Merely place a zero here. 2200 The vnum of the room the shop will be. 8 ... 17 The hours the shop is open. Please consult 'TEMPERS and HOURS' below. *** SHOP MESSAGES The shop messages section has seven different slots for messages. They range as follows (in order): What the shopkeeper says when... 1)... he doesn't have that object to sell. 2)... the player doesn't have that object to sell. 3)... he doesn't buy that type of item. 4)... he doesn't have enough money to buy an object. 5)... the player doesn't have enough money to buy an object. 6)... he sells an object. 7)... he buys an object. The variable %s should precede the message (for say), and %d may also be used for the price of an object. Note each message ends with a tilde. *** TEMPERS and HOURS A shop keeper's temper is controlled by two fields, the first for when the player can't afford the item, the second for when a player is attempting to kill the shopkeeper. Note the following messages are those included in the Diku-docs, and may not be the same from mud to mud. Temper 1: Value [0] The shopkeeper spits at the player Value [1] The shopkeeper smokes a joint. Temper 2: Value [0] The shopkeeper warns the player, and attacks! Value [1] The shopkeeper insults the player, and no combat takes place. The hours fields are fairly simple. The first two are the opening and closing hours of the shop, in 24 hour time. The third and fourth are ALSO the opening and closing times of the shop. Thus, a shop can open and close more than once each day, as in our example: 8 12 13 17 (the example shop opens at 8am, closes at noon -- lunch? -- reopens at 1pm, and closes at 5pm). *** SHOP ARCHETYPE #vnum~ 0 *** TIPS and OBSERVATIONS * Any stationary mob can be a shopkeeper... this can advance the plot of a particular area no end if used cleverly. * Shopkeepers don't _have_ to buy anything. Or sell anything... 8. The .zon file The .zon file tells the mud where everything goes, from the goblin in the pit to what the knight is wielding and putting the fountain in the square. It also controls how and when the area is reset. There are two main parts to every .zon file: the header information, and a list of commands to be followed out by the mud. Here is a header of a zone file for an example, followed by a line by line example: ---example follows this line--- #22 Example Area~ 2299 20 2 ---example precedes this line Please note the example above is only the _header_ of the file. The examples of Zone commands will follow this explanation of the header... #22 This is the zone number of the area. The mud doesn't actually care what number goes here, but your mud-admin probably does. Example Area~ The name of the area. 2299 20 2 The first number is the 'top' or 'last' number of the zone -- the vnum of the final room of the area. The second number is the number of ticks between resets of the area. 20-30 is usually a good number. The third number controls how the zone is reset: a 0 is no-reset, a 1 is reset whenever there are no players are in the area, and a 2 is reset when the reset time has elapsed, no matter who or what is inside. *** ZONE COMMANDS The zone commands tell the mud exactly how to reset a zone, from mobs to objects, to closing doors. Each command is given its own line, one after the other, until the end of the file. Comments can be added for clarity's sake (like this: big guy with sword). * Standard Fields: An if flag tells the mud to look at the previous command. If the if-flag is 0, the mud will try to execute the command regardless of the previous command. If the if-flag is any other than a zero (one is most commonly used), then that particular command will only execute if the command immediately preceding it did as well. This is useful for objects loaded onto mobs; you don't want to load a shield on a guard that didn't get loaded, for example. There are several other uses as well, that should become apparent as you build... This is the maximum number of whatever this is can exist in the mud. If on a mob command, this will prevent excess mobs being loaded into an area. On an object command, this limits how many of this object are available in the game. For items not limited, it is common to put a very high number in this slot... from 100 to 1000. * The 'M' Command The 'M' zone command loads a mobiles to a certain place in the mud. The format is: M * The 'O' Command The 'O 'zone command loads an object into a room. This is mostly used for unowned or immovable objects (like a stick on the ground or a fountain). O * The 'G' Command The 'G' zone command loads an object and gives it to a mobile loaded in the command immediately previous. Note that this is different from the 'E' command below, in that the 'E'command loads an object and makes the mob equip it. A 'G' command object stays in the mob's inventory. G * The 'E' Command The 'E' zone command loads an object and makes the mob loaded in the command immediately previous to this one equip it. E Where equipment position is _one_ of the following: 0 Light 1 Right Finger 2 Left Finger 3 Neck (first slot) 4 Neck (second slot) 5 Body 6 Head 7 Legs 8 Feet 9 Hands 10 Arms 11 Shield 12 About Body 13 Waist 14 Right Wrist 15 Left Wrist 16 Wield 17 Hold * The 'P' Command The 'P' command loads an object, and places it into another object (container-type) that was previously loaded. P * The 'D' Command The 'D' command can open, close, or close and lock a door. D Where exit # is the _number_ equivalent of the exit just as in the world file, like so: (north) 0 4 (up) | / (west) 3-+-1 (east) + | / 2 5 (down) (south) And Door state is: 0 Open 1 Closed 2 Closed and Locked * The 'R' Command The 'R' Command is used to remove an object from a room. R *** ZONE ARCHETYPE # name of area~ S *** TIPS and OBSERVATIONS * Remember, a functioning door is a door from both sides, and needs to be closed from both sides. Thus, 2 door commands for each door. * The 'P' command gets confused if you try to load multiple objects into multiple containers IF the containers are all the same object. The solution is to copy the container over into the .obj file with a different vnum however many different containers you need. * Comment your zone files as much as possible. Doing this makes it much easier to debug your zone file if there happens to be an error in it. See the appendicies for examples. 9. Putting it all together. This section is simply composed of building tips for novice builders. This is very subjective, and based on the experiences of the builders at the Curious Area Workshop. Not all these techniques may be of use to your average builder. * Learn to build without a Dikueditor first: - It is a lot easier to troubleshoot when you understand what exactly goes on with all those numbers in those files... * Do it on paper first. Do it big: - Areas always seem to shrink while you're building it, from a cross of aggravation and editing. Having a map to work from helps a LOT when doing exits, and provides a visual impetus to getting all those tedious bits done. * Do the .wld file first: - The .wld file almost always takes the longest. Once past that long fight, the .mob and the rest will come easier. * Your .zon file will always be wrong on the first try: - Get used to it. * For random mob distribution, use this method: - (this was contributed by Locke of CthulhuMUD) Make a room, with exits to all the places that you would like mobs to come out of, in all 6 directions. Load all mobs to be randomly distributed in this room, and they'll choose and walk out themselves! (if they're not sentinel). For a big area, several of these 'mob chutes' can be connected for a bubble-sort effect. * An area will take twice as long as you think it will to build: - a certain boredom sets in sometimes. just set it aside for awhile if this happens; it is better to build when you want to then turn out something uninspired. * Be fair with the items: - Good items should be hard to get. Lousy items should require much less effort. Give the most powerful items actually _to_ a mob; thieves and mages can often steal stuff on the ground without even bothering with the mob. * Decide what players you want playing in your area. - Keep in mind what levels and player types your area is geared for and follow through with that in mind. Make it fun and challenging for the players. * Have fun building it. - Try to make a well-rounded area that you both enjoy building and looking over afterwards. If you don't like what you see when you are done, don't delete your creations, go through and find out what you don't like, then try to change thoes things until you like them. Another good reason for not deleting them is that you can get them out a year later and give them to someone else as an example of what an area looks like on 'paper' Contributions to this section are welcome, and will be added with proper credits. 10. Credits Special thanks to Tarkin of VieMud and MJPrime of AlbertMUD for invaluble help in writing this Handbook. Extra Special Thanks to all the Players of VieMud (viemud.org 4000), for all the help during the Buggies & Bounties competitions. Advertisement: The Curious Area Workshop provides publicly available DikuMud areas over anonymous ftp. (ftp://www.cirlemud.org/pub/CircleMUD/contrib/areas//Caw/) We are always open to suggestions, bug reports, and criticisms. Email us at fletchra@qsilver.queensu.ca or contact us at VieMud. We can also now be found on the web at http://qsilver.queensu.ca/~fletchra/Caw/ Builder_5 11/11/93 Revised: Matrix 10/1/94 Further revised: Furry 06/19/96 fletchra@qsilver.queensu.ca