Connecting Rooms Made Easy

In Bast1 and Bast2, when a zone was added, one had to edit both zones, adding an exit to each room. When a zone was moved or connected in a different direction, the old exits had to be deleted and replaced with exits in the new direction.

This wasn’t too bad, but I always found it annoying having to edit *two* files. Worse yet, if you weren’t very familiar with a zone it could result in poking around a bit before you found what exit connected where.

This could also create “hanging” exit data when one zone was unload or disconnected from another without deleting both exits. Many of the Bast2 zones have exits pointing to the old map even though those room numbers don’t exist. This doesn’t break anything, but it’s ugly data.

Well, the “old way” of connecting zones still works on Basternae3, but I’ve also added a very simple way of connecting zones. It’s a ZoneConnections text file in the area directory that gets loaded. It has nothing more complex than:

First Zone’s Room Number, Exit Direction, Second Zone’s Room Number.

So, for example, one line reads

This means that when the MUD boots and it loads that line of the file, it creates an exit leading from room 200 south to room 1200, and also creates an exit in the opposite direction, leading north from room 1200 to room 200.

If either of those two zones does not exist or is not loaded, the exit is not created.

This is a fun little solution that makes it way easier to connect zones to the world map, so you’ll see zones on the map pretty soon.