Builder:Worlds
From Wormhole Sci-Fi MUD Homepage
Worlds Places are defined as a set of rooms, in a numbered .wld (’world’) file. For example, if the first room in your zone is 2200, the file will be called 22.wld and the area will typically be referred to by immortals as ‘Zone 22’.
The .wld file contains all the information necessary for the mud to display all the rooms in your area, making the links between each exit, and so on. The file simply consists of an entry for every room, with the entries arranged in order of their virtual number.
Reproduced below is a sample entry for a single room:
#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 ad 0
D0
You spot the Second Room to the north, behind a large steel grate.
~
grate steel~
1 2200 2201
E
sign notice~
The sign says...
WELCOME TO THE FIRST ROOM!
~
S
...
(at end of .wld file)
#99999
$~
Now to explain what each part means, line by line:
#2200
This is the virtual number (”vnum”) of the room. It is unique; no other room in the MUD’s database will have the same number. Before you code a room for a MUD, it might be wise to identify an empty zone... although searching and replacing part of the vnum entries is reasonably simple.
The first room~
This is the short description; the ‘title’ of the room. It will not normally be more than a few words long. For the sake of consistency with other Wormhole zones, please begin with a capital letter, but do not finish with a full stop.
Note the tilde (~) marking the end of this field, on the same line. Every room should have this.
You will be seeing a lot of tildes if you get into DikuMUD area authoring. Be warned: even one tilde in the wrong place could well cause the MUD to choke when it tries to reboot. If you are the administrator of a MUD that isn’t rebooting properly, check the crash log to identify the point that was reached before the MUD failed to reboot. This will often identify the room number (or mobile or object number) where the reboot failed. Go into the offending file, and start looking for a missing tilde!
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. ~
This is the long description of the room; what a player sees if he or she types 'look' in that room. You are free to choose what you write here, although at Wormhole MUD we require that you use good spelling and grammar. Note the three space indent that is used at the start of the paragraph, for neatness.
The long description is written with a strict maximum of 80 characters per line, because some players’ Telnet clients do not provide a wordwrap function. If writing your zone in a word processor, it might be a good idea to select a fixed-width font, as this will help you to ensure that no lines of text are too long.
A tilde follows the end of the long description. It should be on a line by itself, because when a player arrives in the room, the long description of any object or mobile that is in the room will be written immediately below. This should begin on a fresh line.
22 ad 0
The first number is the zone number of this room; what zone should the game engine should consider this room to be in. (See ‘zone control’ for an explanation... but you will normally just use the same number as that in the filename, in each room.)
The second number is the room flag value. This is a number that indicates the key characteristics of the room. It could be a room where psi powers are unreliable, or where health is regenerated at an accelerated rate. Or both! Each of these alternatives is the subject of a flag. The flags that are available include the following...
| Flag | Name | Description |
|---|---|---|
| a | dark | A light must be used to see anything |
| b | death | This is how you make a deathtrap. Player "dies" when entering, being shown the room description before being returned to Reception (aka room 3001). Only diode equipment is lost (from what I know, anyway. - Ecks) but experience points suffer, and hitpoints are set to one. It is a good idea to make exits to all rooms from which one can enter the death_room, then the "death cry" will be heard. Otherwise, other party members tend to blunder in after the leader! |
| c | !Mob | Monsters will not normally enter this room, although they will flee into it, and can be loaded here. |
| d | indoors | This place is sufficiently sheltered that the player need not be told about the weather. Also, the room's level of illumination is constant, rather than varying with the time of day. |
| e | lawful | Neither killing nor theft are possible in the room. Poison and similar effects where you lose hitpoints each tick do not affect you in lawful rooms. |
| f | fall_die | It's like a deathtrap, only activated if you don't have fly (and possibly hover?) |
| g | chaotic | There is a good chance that any psi power used in the room will be substituted with another, selected at random. |
| h | !Psi | Psi powers cannot be used in this room. |
| i | tunnel | Only one player can be in this room at a time. |
| j | private aka !Transit | It is impossible to use a psi power to move to this room if there are two players or mobiles in it. The 'teleport' spell will never teleport a player into this room. |
| k | godroom | Really, really private room. Mortals will never enter such rooms by psi powers or by chance, but can survive in the room if transferred there by an immortal. |
| l | bfs_mark | Reserved for internal use. Do not set this flag. |
| m | zero_mana | Not quite as bad as a deathtrap, but when you enter this room you are knocked unconscious, and your mana falls to zero. Be warned that unlike death traps, mobiles have been known to blunder into zero_mana rooms. Thus, you need to make them !mob... or at least give them a 'wake' action, or all the roving mobiles in a zone will untimately be found fast asleep in one room! |
| n | fog | This flag is supposed to make a room halfway between light and dark; you can see your own stuff but not anything else in the room. Amigone reports it as currently being broken. |
| o | silent | Communications are not heard in the room. Useful for jails, rooms where the player is lost in deep space, or where you want folks to be able to concentrate on reading noticeboards, etc. Also, players cannot send out communications. |
| p | in_air | This room can only be reached by those who are able to fly. |
| q | voice | Internal flag used in conjunction with voice keyed exits. |
| r | pkok | Player-killing OK. The room is not subject to the normal constraints that prevent attacking other players. |
| s | arena | Player-killing OK. Players do not suffer the normal penalty for death in this room, but cannot enter it without full hit points, mana, and move. |
| t | regen | Wounded players recover hitpoints at twice the normal rate. |
| u | space | The room is a vacuum (or, perhaps, contains poisonous fumes). Only players wearing a breathing apparatus can enter. NOTE: OLC lists this as "!Flee" |
| v | radiation | This room will cause the player to get radiation poisoning unless they are wearing protective clothing. |
| w | house | Houses are much more difficult than simply a flag, from what I understand. Probably best not to mess around with it unless you know what you're doing. - Ecks |
| x | h_crash | No idea what this does, it will be filled in later when I know what it does or someone else edits this field. - Ecks |
| y | port | Spacecraft can fly into this room, and land here. Ports are the only places where unsuited people and spacecraft generally mix. |
| z | no_recall | Typing recall in this room won't work, used for jails, etc. |
| A | fear | (Note the capital 'A'.) Players in rooms flagged with this will get messages saying things like, 'You hear heavy breathing' or 'In the distance you hear footsteps'. It's there to add to the atmosphere of certain rooms. |
| B | vehicle_only | Room cannot be entered unless the player is in a vehicle of some kind; use for highways, deep space, etc. |
| C | no_vehicle | Room cannot be entered by those on a vehicle. This ought to be used at the entrance to any indoor complex. |
| D | hot | The room causes people to become thirsty at an accelerated rate. |
| E | cold | The room causes people to become hungry at an accelerated rate. |
| F | new_fear | Players in rooms flagged with this will get the new fear messages. I don't know what they are, though it -may- be possible to place custom ones. - Ecks NOTE: OLC lists this flag as an empty space. |
Flag values are entered as a string of letters. For example, if you decide that the room is a small section of tunnel, you might give it the flags adC. If it’s really a small space, it might be adiC. If you want no flags at all, put a zero.
When examining or editing an existing MUD area, you will find its flags stored as a single number instead of a string of letters. The numeric value reflects a combination of ‘true or false’ options, built up using something like binary. For example, a=1, b=2, c=4, d=8 and so on. Thus, a value of 69 indicates a dark chaos room that mobs cannot enter (64+4+1).
The third number is sector type. This controls how many movement points it costs to enter the room, plus any additional requirements such as having the ‘climb’ or ‘swim’ skills. This is not a flag-type entry: choose just one, and use the value given here...
| 0 Inside |
| 1 City Streets |
| 2 Field |
| 3 Forest |
| 4 Hills |
| 5 Mountain |
| 6 Water, swimmable |
| 7 Water, not swimmable (need a boat-type item to cross) |
| 8 Under water (need the dive skill and some kind of water breath ability to enter) |
| 9 Air |
| 10 Void (Don't know what it does, however - Ecks) |
| 11 Space |
D0 You spot the Second Room to the north, behind a large steel grate. ~ grate steel~ 1 2200 2201
This sequence defines an exit. We’ll break it down, line-by-line...
D0
An exit exists in direction 0, which is to say north. There are six possible directions:
| 0 North |
| 1 East |
| 2 South |
| 3 West |
| 4 Up |
| 5 Down |
Thus, exit D4 indicates an upward direction, while D2 would be to the south. Each exit starts with its own direction field, and then comes a exit description, as shown below:
You spot the Second Room to the north, behind a large steel grate. ~
Note the tilde on a line by itself. 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.
The exit description is used for when a player types look <direction>. 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. Leaving these blank is sloppy. Have some text here, if only to say that it’s too dark to make anything out.
grate steel~
This 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.
Next, we have some detailed information about the exit:
1 2200 2201
The first number is the door type, detailing a number of options.
| Flag | Name | Description |
|---|---|---|
| 0 | no door | There is an exit, but nothing to close. It's a doorway, not a door. |
| 1 | Door (a) | A door exists and can be opened and closed as normal. If a key exists, the door can be locked and unlocked as normal. |
| 2 | Closed | Do not define in the .wld file. This flag is set by the game engine, as a result of an instruction to close the door in the .zon file, or because a player/mobile closes it. |
| 4 | Locked | Do not define in the .wld file. This flag is set by the game engine, as a result of an instruction to close and lock the door in the .zon file, or because a player/mobile locks it. |
| 8 | RSCLOSED | Suspect this was meant to cause a door to repop closed. If so, it doesn't work. Do not use. |
| 16 | RSLOCKED | Suspect this was meant to cause a door to repop locked. If so, it doesn't work. Do not use. |
| 32 | Pickproof (f) | The lock cannot be picked. |
| 64 | Trap | This may just be a leftover. Will experiment and update. - Ecks |
| 128 | Wall (h) | This is the same as having an exit lead to -1, used to give description. |
| 256 | Bashproof (i) | The door cannot be bashed open. See Angelus. |
| 512 | Small (j) | Only certain small races can navigate this exit. |
| 1024 | Hidden (k) | The exit is hidden, and does not give any indication that it exists if players try to move in that direction. It can still be opened, however. |
| 2048 | Slides (l) | The exit slides; players must use the slide command to open the door. |
| 4096 | Push (m) | The exit must be pushed to be opened. |
| 8192 | Pull (n) | The exit must be pulled to be opened. |
| 16384 | Item to pass (o) | Players must possess the 'key' to this exit to be able to walk through. It must be in their top-level inventory (not a bag), or worn. Most often used without a door. |
| 32768 | !Close_suck (p) | The exit sucks players through it when it is opened. This is especially useful for, say, airlocks that open into space. |
| 65536 | Autoclose (q) | The exit will close immediately upon someone passing through it. Also useful for airlocks; believe it will stop followers from coming through with you. |
Exits push, pull and slide are all good when used in conjunction with hidden exits. For example, you could have a stone block that needed to be pushed out of the way for the exit to open.
The exit values must be added together if the exit has more that one flag. For example, an exit that is hidden and slides would be 3073. (Door = 1, Hidden = 1024, slides = 2048.) Nowadays, you simply use letters (1=a, 2=b, 4=c and so on...) so that same hidden, sliding door can be described as "akl". Phew! Much easier.
1 2200 2201
The second number is the key number... the virtual number of the object that can be used to lock or unlock this door. If there is no such item, you can leave the value as zero. Keys are a special item type that disappears (and repops) on zone reset, and that fall to the ground if you quit the game. (More in the objects part of the builder documents.) If there is no key, use -1 for this field.
1 2200 2201
The third number is the exit-to-room number; the vnum of the room this 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 isusually done under the 'extra descriptions' part of the room entry.
Directions in which there is no exit need no entry at all. Rooms without exits (rare) need no direction fields etc. at all; for these, this section may safely be ignored.
Additional exit options: There are two additional exit options that can be set up: voice-activated locks and suck exits. Voice activated locks are just that - locked doors that only open when a phrase is spoken. Suck exits suck players into another room after a period of time. Both are added after all normal exits in the room file. Voice activated locks are designated with V<direction> using the same numbering system as for doors. The syntax is: V<direction> <text used to open the lock>~ Upon a player speaking the key to the lock, the door will unlock and open. I am not 100% sure whether doors need to be set up to auto-lock, or if they need any special flags - though allowing players to get in any other way defeats the purpose of the lock for the most part. I imagine you could just set an exit with a locked door with no key and then add the voice key afterwards. Note: If the keyword(s) are spoken anywhere in a sentence or line, they will work. I have tested this with one particular voice lock and had that result - but it as only a single word voice key, I don't know how multiple words (if they can be set) will work. Suck exits do just that. If a player is in a room with a suck exit for a certain amount of time designated by the builder, they will be sucked to another exit. The syntax is: X<direction> <time player must be in the room> <vnum of new room> An exit has to exist in that direction in the room for the room to suck in that direction. It is important to note, though, that an exit can have a door that is closed and hidden - doesn't show up, and still suck a player through it. It can be used for a trap that must be dodged and so forth - Underwater in the Klingon homeworld is a good example of a suck-dt. It can also be used to simulate travel over which the player has no control, such as elevators or some other transport. I'm also fairly certain that the timer begins when one player enters the room and does not reset or start a second timer if another player enters. Finally, I don't know exactly what will be sucked - mobs and objects may or may not be affected. I'll add more information as I learn and experiment. - Ecks
We now return you to your regularly scheduled building doc.
E
Tells the MUD there is an extra description (“extradesc”) coming. These are your opportunity to enrich your zone, allowing players to see something more if they try. Thus, if you’ve said that an office is decorated with antique tapestries, you can use an extradesc to allow the player to examine them. Otherwise they will get a “You do not see that here.” message, which is a bit naff.
sign notice~
The namelist of the extradesc. 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...
WELCOME TO THE FIRST ROOM!
~
This is the text of the extra description. Format it as you would the long description of a room. Again, note the placement of the tilde on its own line.
S #99999 $~
A capital ‘S’ is the end-of-room character. After this, you would start working on room #2201. #9999 and $~ go at the end of the wld file, to signify that the world file is complete. Do NOT put them after every room.
In summary, here is the ROOM ARCHETYPE
(the <'s and >'s are used to offset values, and should be ignored)
#vnum Room Title~ Room Description ~ <zone number> <room flag> <sector type> D<direction number> exit description field ~ door keyword list~ <door type> <key vnum> <exit-to-room vnum> <more exits here, if needed> E extra description keyword list~ extra description ~ S ... (end of zone) #99999 $~
