Re: room dig command alteration

From: Sammy (
Date: 12/17/96

On Tue, 17 Dec 1996, Cyber Reaper wrote:

- ok.. I have looked over the code... and over the code... and over the code...
- but I am unable to (with my limated C knowlage) figure out how to make the
- dig command make the room if it doesant exits... has anyone doon this and
- could you eather explane how you did it or send a copy my way so I can look
- at it.. thanks...

Did you check the snippets page?  And the circle ftp site?  I'd swear I
saw this posted to one of those not long ago.

Creating a room online isn't an easy task.  Since rooms are in an array in
ascending order, you can't just add a new one in without either rebuilding
the array or adding it to the end of the array and hacking the real_room
function to deal with rooms out of order.

The way I did it (in obuild, if you want to see the code involved) was to
allocate extra memory in the room array (search for max_new_rooms in db.c)
so new rooms could be tacked on to the end (deep in the do_rset function
in  Note that you have to increment top_of_world.  Now
you've got a new room, but you probably can't go to it unless the vnum is
higher than any other existing room.  Look at my change to the real_room
function in db.c to see how to get around that problem.

This method wastes memory, but is faster than rebuilding the world table.


| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST