Manual:Zone Manual/Zone Source File/Zone information section

From DikuMUD Wiki
< Manual:Zone Manual‎ | Zone Source File
Revision as of 06:19, 15 November 2026 by Agent-mud (talk | contribs) (checked against the current code (wiki review 2026-11-15))
Jump to navigation Jump to search

Zone information section

The zone information section is the zone's header: %zone, the zone's name, and the fields that apply to the whole zone. It is the first section of every zone file and the only one that must be there. It has only a few fields, so it is the easiest section to learn.

Zone section fields
Field Type Default Description
%zone name Symbol the file name The zone's name: letters, digits and _, at most 30 characters. It must be the name of the file without .zon. Without a name vmc uses the file's name. vmc doesn't check that the two match, but the server stops at boot when they don't.
title String none The zone's name for players. The areas command lists the zones whose title has the form "Name@Continent", such as "Midgaard City@Mainland", with their continent. help area shows the part before the @. Leave the @ out, or the title out, for a zone that players shouldn't see in that list, such as a zone of DIL programs.
lifespan Number 60 Minutes between resets. The server adds up to 3 minutes at random, so that zones don't all reset at once. With lifespan 0 the zone never resets, not even at boot.
reset Number RESET_NOT When the zone resets. Use the names from vme.h:
  • RESET_NOT: only once, when the server boots.
  • RESET_IFEMPTY: every lifespan minutes, but only when no player is in the zone. If there is one, the server tries again every minute.
  • RESET_ANYHOW: every lifespan minutes, even with players in the zone.
  • RESET_NEVER: never by itself, not even at boot. A god can reset it with reset, and a DIL program with zonereset(); the holiday zones work this way.
creators String list none The players who built the zone, by their character names. They are shown by wstat zone, and a creator may load the zone's objects and NPCs even below the zone's load level.
notes String none Notes for the administrators: what the zone is, how to reach you. Gods see them with wstat zone and wizhelp notes.
help String none Help for players. A player in the zone sees it with help area.
weather Number 1000 The zone's normal air pressure, from 960 to 1040 (vmc refuses other values). The pressure wanders around this value: low pressure brings clouds, rain and thunderstorms, high pressure clear skies. Use a high value for a desert, a low one for a stormy coast.

The fields may come in any order, and only the name is required. Watch for stray words in the header: a word that isn't a field is taken as the zone's name, so a typing error such as Title gives a syntax error, and a lone word changes the name without a word from vmc.

Examples

Three legal headers. You be the judge of which tells the most.

Very bad: the zone gets the file's name, and all the defaults.

%zone

Better than nothing:

%zone bug_planet

The way it should be done, in dragon.zon:

%zone dragon
title "The Dragon Station@Deep Space"
lifespan 20
reset RESET_ANYHOW
creators {"whistler"}

notes
"The dragon station. If you have any questions, mail Whistler
in the game."

help
"Not sure what could help you now. You are stuck on one of the
weirdest space stations you have ever seen, and you smell
burning sulphur."

Each of these, with #include <macros.h> before it and %end after it, is a zone that compiles: an empty one. The next chapters fill it with rooms, objects and NPCs.

Getting the zone loaded

The server loads only the zones listed in vme/etc/zonelist, one line per zone, starting with the zone's name. Copy the line of a similar zone and change the name. The server stops reading that file at the first blank line, so add your zone above any blank line, or it is quietly left out. See General Compiler Information for compiling and loading.

Previous: Zone Source File
Next: Unit Building Blocks