Guides

Area Building with OLC

Building functional MUD areas requires understanding your codebase's specific file grammar and the constraints of text-only navigation. Unlike graphical engines, every room connection, mob stat, and reset command must be explicitly declared in flat files or OLC buffers. This guide walks through creating a production-ready zone for ROM-derived codebases, covering vnum allocation, graph topology, and reset dependency chains.

4-6 hours7 steps
Area Building with OLC hero illustration
1

Claim Vnum Range and Initialize Area Header

Reserve a contiguous block of virtual numbers (vnums) in your area.lst or via OLC. Create the #AREA header with filename, name, builder credits, and level range. This metadata controls loading order and in-game listing.

newarea.are
#AREA
newarea.are~
The Forgotten Sewers~
{ 1 50} YourName~
100 199~

⚠ Common Pitfalls

  • Overlapping vnum ranges with existing areas causes load-time collisions
  • Forgetting tilde (~) terminators after strings corrupts file parsing
  • Missing the area.lst entry prevents the file from loading on boot
2

Design Room Topology as a Directed Graph

Map rooms as nodes and exits as edges before writing descriptions. Each room needs unique vnums within your range. Define exits using D0-D9 (north=0, east=1, south=2, west=3, up=4, down=5) with target vnums and exit flags. Ensure bidirectional connections match logically to prevent unintentional one-way traps.

newarea.are
#100
Sewer Entrance~
The tunnel slopes down into darkness.~
~
0 0 3
D2
~
~
0 -1 101
D5
~
~
0 -1 200
S

⚠ Common Pitfalls

  • Creating orphaned rooms with no exits back to the zone
  • Exit descriptions that mismatch the actual destination room
  • Using D0-D9 numbers incorrectly (D0 is north, not D1)
3

Author Mob and Object Prototypes with Stat Calculations

Define mobiles with dice-based hit/damage in XdY+Z format, level-appropriate armor class, and act/aff flags. Objects require type, wear location, and stat modifiers. Calculate average damage per round using codebase formulas to ensure level-appropriate combat balance.

newarea.are
#100
sewer rat rat~
a sewer rat~
A sewer rat scurries in the muck.~
~
0 0 0 0
10 0 0 0
1d6+2 2 2 2
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
10 10 10 10 10 10 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

⚠ Common Pitfalls

  • Level 0 mobs crash combat routines or grant excessive experience
  • Missing ~ terminators after long descriptions causes boot failures
  • Equipment without proper wear flags cannot be equipped by mobs or players
4

Script Reset Dependencies for Equipment and Inventory

Write reset commands in execution order: Load mob (M), equip item (E), give item (G). Resets execute sequentially; a mob must exist before receiving equipment. Use maximum load limits to prevent overpopulation and ensure equipment resets reference the correct mob.

newarea.are
#RESETS
M 0 100 1 101
E 1 101 0 16
G 1 102 0
S

⚠ Common Pitfalls

  • Attempting to equip items before the mob reset loads results in orphaned objects
  • Setting max_load higher than available inventory slots creates infinite loops
  • Forgetting the final S line terminates the reset block prematurely
5

Implement Mob Programs for Quest Logic

Add ACT_PROG, SPEECH_PROG, or ENTRY_PROG triggers using if_checks to handle quest states. Use variables like $n for actor, $t for target. Ensure every if has a matching endif. Test speech triggers with exact case matching as most codebases are case-sensitive.

newarea.are
>act_prog p drops~
if ispc $n
  say Thank you for that, $n.
  mpquest $n 1001 start
endif~
|

⚠ Common Pitfalls

  • Missing endif statements crash the MUD or cause infinite loops
  • Case-sensitive string matching in speech progs fails on player input variations
  • Infinite act_prog loops from self-triggering echoes or mpecho commands
6

Validate Syntax with Offline Compilation

Run your area file through a syntax checker or load it into a local test port. Check for unterminated strings, mismatched vnum references in exits, and reset command syntax errors. Review syslog for 'Error in reset' messages during area loading.

⚠ Common Pitfalls

  • Testing directly on production ports risks player experience corruption
  • Ignoring boot-time warnings about missing objects referenced in resets causes crashes
  • Failing to check exit vnums results in rooms that lead to void or invalid zones
7

Version Control and Collaborative Merging

Commit area files to git with clear commit messages indicating vnum ranges changed. Coordinate with other builders to avoid editing overlapping vnum ranges simultaneously. Use branches for major overhauls and resolve area.lst merge conflicts carefully.

⚠ Common Pitfalls

  • Binary corruption from concurrent edits to the same .are file
  • Losing work by not committing before server reboot or crash
  • Merge conflicts in area.lst index files causing zones to load in wrong order

What you built

Area building is a systems integration task requiring precision in file syntax and logical consistency in world design. After initial implementation, observe player movement patterns and adjust mob density or reward tables based on actual session data rather than theoretical balance. Iterate on room descriptions based on player feedback regarding text clarity and navigation ease.