Manual:Zone Manual/The Room Section/Building your first room
Building your first room
Now you are ready to build your first room. I like dragons and I like space, so I have chosen to make a dragon station. We start with one simple room and add to it in the following sections. This page walks you through the room and why each part is there.
You make the zone file first, as shown in Zone Source File. The zone is called dragonst, so the file must be called dragonst.zon: the zone name and the file name have to be the same. A zone with only rooms needs no %objects, %mobiles or %reset section; the rooms go in the %rooms section. At the end of the chapter you will have the whole zone in one piece.
Every room starts with its symbol. Pick one that matches the title. Gods move about with goto chamber@dragonst, and wstat zone dragonst rooms lists the zone's rooms by symbol only. With names like chamber, portal_room and office you know which room is which; with st_rm1, st_rm2 and st_rm3 you won't, once there are a hundred of them.
The first room is a simple chamber with nothing special:
chamber end
Easy so far. Now let's add some life to it. The room needs a title and a description. The title is a short name for the room, the way you would show someone around your house: "this is the big bathroom", "this is the computer room". The description is what you would tell an interior decorator on the phone when asking for advice: everything you can see in the room.
chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. Small human-size ornate chairs with dragon designs on the arms and backs are arranged in a triangle, with one large chair at the front. This must be where all station meetings are held. Large pictures cover the walls, showing dragons in all kinds of situations. Small passages lead off to the west and the east." end
Line breaks in the description are shown as you write them, so break the lines yourself and keep them under about 72 characters. vmc puts three spaces in front of the first line.
Whether you mention the exits in the description is a matter of taste; I like to. If you read this description to someone, they might ask what is on the pictures, or what the chairs look like. Extras answer that: look chair, look picture, and then look dragon.
extra {"chairs", "chair"}
"The chairs are made of some metal you don't recognise and every inch
is covered with some kind of dragon."
extra {"dragon picture", "picture"}
"Thousands of dragons dot the skies of this rather lifelike picture. In
the centre you see something move. It looks to be a little green
dragon."
extra {"green dragon", "dragon", "green"}
"An intelligent-looking dragon is sitting perched on a large chair,
watching you."
In each list the longer names come first: no name may start with an earlier one, or vmc stops with an error.
We could give the room a movement type for the endurance it costs to walk through, but we leave it out for now and get the default, SECT_CITY; with the station's artificial gravity that is as close as any of the sector types. The last thing the room needs is the two exits to the rooms next to it:
west to disposal_room descr "You see a small room."; east to hallway descr "You see what looks to be a hallway.";
Those two rooms don't exist yet. vmc doesn't check where exits lead, so the zone compiles anyway; until the rooms are there, the server drops these two exits at boot and says so in vme.log ("Unknown room direction").
That is all there is to making a room. Here is the finished first room:
chamber
title "The middle chamber of the station"
descr
"This chamber seems to have the entire station rotating around it.
Small human-size ornate chairs with dragon designs on the arms and
backs are arranged in a triangle, with one large chair at the front.
This must be where all station meetings are held. Large pictures cover
the walls, showing dragons in all kinds of situations. Small passages
lead off to the west and the east."
extra {"chairs", "chair"}
"The chairs are made of some metal you don't recognise and every inch
is covered with some kind of dragon."
extra {"dragon picture", "picture"}
"Thousands of dragons dot the skies of this rather lifelike picture. In
the centre you see something move. It looks to be a little green
dragon."
extra {"green dragon", "dragon", "green"}
"An intelligent-looking dragon is sitting perched on a large chair,
watching you."
west to disposal_room descr "You see a small room.";
east to hallway descr "You see what looks to be a hallway.";
end
In the next sections we compile it, then add more rooms with doors, hidden exits and rooms inside rooms.