Building Guide

*This guide is adapted from OLC: Down and Dirty in the Mud (original Geocities site offline) by Kara Ann
OLC is short for On-Line Creation. It is your friend.
OLC is a set of code added to a MUD that allows builders to edit area files in real-time while logged into the MUD, instead of the old method of manually editing text files and rebooting the game every time a change is to be implemented.
There are many different versions of OLC in use on different MUDs, although the syntax and usage is fairly standard. Becoming familiar with OLC will let you be an asset as a builder on almost any MUD. This guide is written explicitly for the Cleft of Dimensions, however.
==Basics==
===Vnums===
'VNUM' is short for 'virtual number'. One vnum can be assigned to a mobile, an object, a room, AND a mob program (or mprog)
Each mobile and object has a virtual number, which is used to store the index data or template that is used to create each instance of that mobile or object.
For example:
* Object vnum 1050 contains data for a pair of purple pants. Every pair of purple pants in the game shares this vnum, but object vnum 1050 is only used for purple pants.
* Mobile vnum 1050 contains data for Green Imps. Every Green Imp in the game uses shares this vnum, and mobile vnum 1050 is only used by Green Imps.
* Room vnum 1050 contains data for a section of road in Truce Canyon. There is only one room with this vnum, and any references to room vnum 1050 are thus references to this specific section of road.
* Mob program vnum 1050 contains a greet program for the Imp King. Only one mobprog is number 1050, and any references to mobprog 1050 are to this one, although one prog can be used by several mobs.
===Building Modes===
These are modes in which builders can edit certain things. 
* REDIT - room edit, rooms are created, linked, and edited, and resets are made within this mode
* OEDIT - object edit, objects are created and edited within this mode
* MEDIT - mobile edit, mobs are created and edited within this mode
* MPEDIT - mobprogram edit, mob programs are created and edited within this mode (reserved for builders above level 101)
* AEDIT - area edit, area files are created and edited within this mode (generally reserved for the head builder)
* HEDIT - help edit, creates and modifies help files (reserved for high-level staff)
Commands are limited between modes, IE you can only do certain things in a given mode. For a list of commands specific to each mode, enter one and type commands.
You can switch from one mode to another any time. To exit a mode, type done.
===Saving your Work===
It is vitally important to save completed work often. If the game crashes or is rebooted without saving, any work done will be lost forever. To save your work, type asave changed frequently. This works in all edit modes and will save everything that has been changed or created.
===Short Descriptions===
A short description is the text displayed when an object or mobile is being interacted with, such as 'a red apple' or 'the noxious Grimer'.
Short descriptions should either be a proper noun or begin with an article. (a/an/the/some/etc)
===Long Descriptions===
A long description is the text displayed when an object or mobile is seen in a room, such as 'The enterprising Hassan is here, waiting to make a sale.' 
Note that long descs are not the same as a mobile's 'description'.
If an object has a keyword set as one of its names, but no extra desc for that keyword, then the object's long desc will be used instead.
===Names===
Object and mobile names function as keywords for targeting those objects and mobiles. Any words within the name will work to target the object or mobile. Adding too many names to an object or mobile increases the chance of ambiguity when attempting to interact with it.
If a mobile's name is 'green imp' then both 'look green' and 'look imp' will function correctly. If the mobile's name is 'a green imp' then 'look a' will also target the imp, which is not desired behavior.
If the long description doesn't contain the same words as the short description, it's good form to add extra words to the name. For example, the Chain Chomp's short desc is "a Chain Chomp", while its long desc is "A round black beast tied to a chain is chomping away at you as close as it can get." Since a player may not know from the long desc that it is a chain chomp, they will probably type 'look beast' to find out more about it. Because of this, the mob's name string is 'chain chomp beast' so that all these words function correctly.
==REDIT==
Redit is the mode used to create and change rooms and exits between rooms. 
To enter Redit mode, you can type redit by itself, but only if you are in an area that you have permission to modify.
To see all the rooms in an area and their vnums, type rlist. To see details about the room you're working on, type show or just enter a blank line.
===Creating New Rooms===
To create a room from scratch, you redit create (new room vnum), which will create an empty room with no exits, and simultaneously move you into it.
You can also simultaneously create a new room and a two-way exit to it by typing (direction) dig (new room vnum), where the direction is which way from the current room to link it.
A brand-new room will have no name, no description, and no special properties.
===Linking Existing Rooms===
Rooms can have two-way and one-way exits. 
To create a two-way exit from a room, type (direction) link (other room), where direction is which way the exit will be in this room. Two-way exits are always linked opposite of each other EG if Room A has a two-way exit West to Room B, then Room B will have an exit East to Room A. A door on one side of a two-way exit will let people on the other side know that it has been opened.
To create a one-way exit from a room, type (direction) room (other room). One-way exits don't do anything to the room on the other side, so be careful not to create dead-ends when using one-way exits.
When linking rooms from different areas make sure that both areas are edited and saved. The link will not save if you only asave changed.
====Deleting Exits====
Rooms cannot be deleted, but exits can. To delete an exit, type (direction) delete. Deleting a two-way exit removes both sides.
Note that if you delete a one-way exit that leads to a room where the "returning" exit is different, both exits would be deleted.
===Describing Rooms===
To set the name of a room, go to the room to name and type name (name). 
A room's Name is the line of text that players see at the top of the description when they see a room or type 'exits', and the part a builder sees when typing 'rlist'. It's standard procedure in this MUD to include the area name in the room title. Normal formats are 'Area Name - Room Name' and 'Room Name, Area Name', colored however you wish.
To edit a room's description, enter the room to be described and just type description. This enters the description editor, which is identical to the normal note and player desc editor. Type .h if you need help using the editor.
A room's description is the block of text that players see when they look at a room, describing its contents and atmosphere. Room descs can be colored, but they should all be one solid color for readability. 
====Description Style Tips====
Keeping descriptions to a decent length is important, since players will often avoid reading anything that shows up as one giant wall of words. Five or six lines is usually plenty. If you want to elaborate more on something in the room, you can use an extra desc (see below).
Colors are available to help set a mood, but be aware that some colors (particularly blue and dark blue) are difficult to read on a black background. Descriptions can be colored, but should be one solid color for readability unless highlighting specific words.
Descs should stay objective in tone, avoiding references to the reader. "The monster terrifies you." is inapplicable if the player is a robot incapable of fear or a hardy warrior who's seen worse.
====Extra Descriptions====
Extra Descriptions are additional descriptions a room can have for curious players who try to look at things mentioned in the main description. IE If a room description mentions that there is a painting on the wall, you could describe the painting in depth using an extra desc for the word 'painting' to avoid cluttering the main room desc.
If there is an item or mob in the room with the same name as an extra desc, then the player will see that item or mob instead of the extra desc.
To add an extra desc to a room, type ed add (keywords). You can add one desc for multiple keywords at once if you enclose them in double quotes. To edit an existing extra desc, type ed edit (keyword). To delete an extra desc, type ed delete (keyword).
Extra descs can be any length, can contain asciiart, break the fourth wall, and ignore all sorts of other description conventions for the sake of an interesting experience. It's good form to add extra descs in every room you can, but it's not strictly necessary.
===Changing Room Properties===
To toggle a room flag, type room (flag name). Most room properties exist as flags, which can all be toggled on and off individually. All flags are off in a new room. For a list of room flags and their functions, see Flags_Compendium#ROOM_FLAGS.
To change a room's sector, type sector (sector name). A sector has information about the general biome or type of room. A room can only have one sector, and it is set to 'inside' by default. For a list of sectors and their functions, see Flags_Compendium#SECTOR.
To change a room's mana or health regeneration rates, type heal (percent) or mana (percent). These numbers are percentages that regeneration rates are modified by EG 'mana 200' will double MP regeneration for players and monsters alike in the room. Note that setting a negative number won't cause damage, but will floor regeneration rates to their absolute minimum.
Rooms can also have specific positions on the weather grid and extra weather modifiers. These are usually set at for the whole area instead of for specific rooms. A room's weather modifiers will override the ones set for the area. Avoid very high weather modifiers unless absolutely necessary (You're in a tornado!). We want the weather modifying spells to be more useful..
To set a room's coordinates, type "xarea #" or "yarea #".
===Changing Exit Properties===
To toggle an exit flag, type (direction) (flag name). For a list of exit flags and their functions, see Flags_Compendium#EXITS. Note that for 'closed', 'locked', etc to work, 'door' must be on. If 'door' is on but 'closed' is not, then the door will open itself when the area is reset and players will likely not even notice it. Applying a flag to one side of a two-way exit will automatically apply it to the other side as well.
If a door is locked, you can specify what item a player needs to unlock it by typing (direction) key (obj vnum). The player will only need to have the object in their inventory to be able to unlock the door.
====Exit Names and Descs====
Doors can also have special names and descriptions. These can help immerse the player in the area they're exploring.
To set an exit's keywords, type (direction) name "(names)" Note that the double quotes are required. This will allow players to use these names when trying to open or close the door EG 'east name gate' will allow players to type 'open gate' in addition to 'open east' to open the door, as well as allowing them to 'enter gate' in addition to just typing 'east'. Once you've given an exit a special name, you can make the exit hidden and mention 'There is a gate to the east.' in the room's description to reward players that read descs thoroughly. You can use '(direction) name none' to remove all names.
To set an exit's description, type (direction) desc "(desc)" Note that the double quotes are required. A door's description string is cosmetic, and will be shown to people manipulating the door EG 'east desc "the imposing iron gate"' will show players 'You open the imposing iron gate'/'Soandso opens the imposing iron gate', etc. You can use '(direction) desc none' to remove anything and revert the exit to using the default text 'the door'.
==MEDIT==
Medit is the mode used to create and edit mobs, or mobiles, AKA NPCs. A mob is any fightable or unfightable monster, shopkeeper, quest NPC, townsperson, boss, etc. Mobs can also be made completely invisible to players in order to create special events or puzzles.
To see all the mobs in the area you're in, type mlist. You can see only mobs with a certain name with mlist (name).
To see details about the mob you're currently working on, type show or just enter a blank line.
===Creating and Editing Mobs===
To enter Medit mode, you must type either medit create (empty mobile vnum) or medit (existing mobile vnum) If you try to create a mob in a vnum that already exists, or edit a mob that doesn't already exist, you will receive an error and not enter medit mode. 
A newly created mobile is mostly blank and has no name, description, or attributes.
===Describing Mobs===
To set the name of a mob, type name (mobile names). This is not the same as the mobile's short description, and the names are never seen by the player all at once.
To set the short description of a mob, type short (short description). This is the what the player sees when interacting with the mobile.
To set the mob's long description, type long (long description). This is the line of text that the player sees when looking at a room with this mob in it.
To create or change a mob's description, type desc. This enters the string editor, and if the mob already has a desc it will be loaded into the editor. When you are finished editing the description, type @ to exit the editor. A mob's description is what a player sees when looking at the mob. A mob without a description only shows the player 'You see nothing special about (him/her/it).'
===Setting Mob Stats===
Mobs have a variety of statistics. They can all be changed from within Medit mode.
A mob's race can be set with race (race name). To see a list of all PC and NPC races in the game, type race ?. A mob's race pre-sets act, form, part, imm, res, and vuln flags. Changing an existing mob's race will add new flags but won't remove existing ones. A mob's race doesn't affect many things on its own, though.
Mobiles have lots of other stats that can be set.
;sex (male/female/neutral/random)
:The mob's gender; modifies pronouns when interacting with the mob. A mob set to be Random sex will be randomly male or female each time it is loaded.
;level (#)
:The level of the mob. Note that a mob's armor values will need to be modified accordingly with the mob's level.
;align (#)
:While players can only range from -1000 to 1000, mobs can have outrageous alignment values. Despite this, -1000 to 1000 is normal.
;hitroll (#)
:This is a bonus or penalty to hitroll for this mob. This usually isn't necessary to change.
;damtype (damage type)
:This is the damage noun and thus damage type that the mob uses for unarmed attacks. Type ? weapon for a list.
;hitdice (XdY + Z)
:Must be entered with the d and +. A mobile will have a randomly-rolled amount of hit points when loaded. A mobile's hit points should not vary too widely to prevent very easy/difficult to defeat outliers.
;manadice (XdY + Z)
:Mobiles have mana, but will not use it unless explicitly told to by an mobprog. This number is rolled when a mobile is loaded, like hit dice.
;damdice (XdY + Z)
:The first two numbers determine how much damage a mobile will do with unarmed attacks. If the mob is wielding a proper weapon, it will do damage based on the weapon instead. The third number is the mob's damroll. This bonus will apply whether the mob has a weapon or not!
;armor (# # # #)
:The AC scores of the mobile. The actual amount of damage prevented depends on the level of the mobile as well. All four values must be entered to set all four armor scores for the mobile.
;size (size)
:Type ? size for a list of valid sizes. This stat mostly affects combat skills like bash and trip.
;wealth (#)
:The amount of wealth, in silver, that this mob carries. This number is not exact, so a mob will have a random amount of money when actually loaded, somewhere near this variable. If the wealth value is high enough, at least some portion of the mob's money will be in gold coins.
When setting stats on a mob, use the Formulator application to determine how much HP, armor, etc it should have based on its level. Talk to another staff member for information on how to download this application.
===Mobile Special Properties===
In addition to their descriptions and stats, mobs can have a variety of special flags that change how they act.
To toggle a mob's Act flags, type act (flags to toggle) A mob's act2, affect, shield, form, part, imm, res, vuln, offensive, and behavior flags are changed in the same way. 
For a list of all applicable mob flags, see Flags_Compendium#MOB_FLAGS, or type ? (flag name) while in medit mode.
==OEDIT==
===Basics===
Oedit is the mode to edit objects, which includes fountains, apples, swords, basically anything that can't move around or perform actions on its own. Though note that there are cases where you may want a certain thing like a computer to be an object vs. a mob. Mobs can react to people interacting with them, objects cannot.
Like the other modes, you need to either oedit create (vnum) or oedit (vnum) depending on whether it already exists or not. A new object will be basically blank and featureless. You can check its status at any time that you're in oedit mode by typing show.
===Descriptions===
There are three main descriptions that an item needs:
Name - These are the keywords that the player uses to identify the item. They'll never actually *see* this (so no need for colors), but you want it to include the relevant keywords from it's short and long descs. Depending on what item it is, you may want to add certain hidden names in order to sort them for later searching. Typically for weapons this is +wtype, like +sslash, and for armor it's =slot, like =legs. (Later you can take advantage of these along with vnum to search for a certain slot, or in an mprog to remove whatever's on the legs, as long as it's been properly tagged)
Example: name silver sword excalibur +sslash
Short - This is the word that shows up directly for the object, such as when the player picks it up or has it equipped. This should not be very long, and including 'a', 'an', or 'the' is appropriate unless it has an actual proper name, as the player should ideally see 'You get an apple' rather than 'You get apple'. This is also where color is most likely to be used.
Example: short {WExcalibur{x
Long - This description is what will be seen when the item is sitting on the ground in a room. Keep in mind both where it comes from and the fact that players could potentially later drop the items in different places entirely. This is also what will normally show up for the description of the item (see below).
Example: long A silver sword has been stuck in the ground.
There's also extra descriptions. As mentioned, the long description is the default, but that's generally not good enough for a real item. In order to attach a longer description, exdescs must be utilized. These can be done with ed add "<keywords>", ed edit "<keywords>", and ed delete "<keywords>". Remember the quotes there or else it will only take the first word that you specify. Once you do ed add, an editor window will pop up, similar to personal or mob descriptions. Just put your text in there. Make sure that you include all the same keywords that are in the name (though any hidden ones are generally unnecessary).
Example: 
ed add "silver sword excalibur"
.c
This shining sword looks like the weapon of a true king! It glows with soft light from within.
.f
@
===Stats===
Type - One very important part of any object is it's type. This determines what other flags it has - weapons will have flags to determine what type of damage it does and how hard it hits, pills will have flags for what spells they cast, trash is trash, etc. For a full list of these, check the Flags_Compendium/Obj_Types. Once a type is selected, new flags v0 - v4 show up and will need to be selected.
Level - The level that is required to use this item. Keep in mind that items will poof if the player is too underleveled and the remortable flag is not on the item.
Wear - The wear flags determine if the item can be worn and where. Most important of these is take! If you don't flag the item as wear take, it will not be able to be picked up at all. This also means you can make strange cases, like wearing a weapon on your face or a rod on your wrist. Note that the arms, waist, and shoulders slots are typically not used in our MUD, so do not use those unless you have an good reason and have checked with someone else.
Extra, Extra2 - These two flags hold various important utilities that do a variety of things. Refer to the Flags Compendium for full information.
Weight - How heavy the item is. 10 here means 1 pound.
Cost - How much the object is worth, in silver. Keep in mind that this is just the base, and shopkeeper settings mean they'd buy the item for 60% of it's real cost, etc.
===Enchantments===
One last trick that you might need to know is how to put affects and applys on items. These are the 'enchantments', the stuff like dex+2 or permanent quartz guard that goes on an item you wear.
They are split into two categories:
Addaffect - This is used for purely stat boosts. There's a lot of options here, but you don't really want to touch anything other than the primary stats (str, dex, etc), mana, hp, move, saves, ac, hitroll and damroll. The rest you really don't want to be messing with on items. The syntax is addaffect <type> <amount>. Remember that if you're doing this with AC, good AC is negative, not positive.
Example: addaffect str 2
Addapply - Addapply does the stuff that's not just stats but effects. The syntax for this is really strange - by definition an addapply must also *include* an addaffect, but it can be of type 'none'. The flags that can be added include affects, object, immune/resist/vuln, weapon, and shield flags (For a full list of these refer to mob flag information). Once added these show up on the object show as just addaffects w/out the associated real effect, so you may have to load a copy of the object and identify it to make sure it's working right.
Here are a few examples:
addapply vuln str 1 bash - This gives +1 strength but weakness to bashing damage.
addapply affects none 0 slow - This causes a permanent slow state, with no other effects.
addapply shield mana 20 confused - This causes the player to gain 20 max mana but be constantly confused.
To remove an affect or apply, just use delaffect #, where the # is the right one from typing show in oedit mode.
That's basically it - items are fairly straightforward!
==MPEDIT==
coming soon
==AEDIT==
coming soon
==HEDIT==
coming soon
==SEDIT==
coming soon
Avoid making new socials simply for entertainment purposes, as this will add more clutter to the socials list, which is utilized by players to maneuver through rooms, puzzles or quests at times. Existing social commands are for the most part set in stone. Changing existing output can cause quests to fail activation. If a condition arises where the syntax should indeed be changed, an admin should run a find and replace for relevant mprog triggers.