Converting a database from another server to PennMUSH

Submitted by javelin on Wed, 2004-03-17 16:18

Moe from ChicagoMUSH writes:

I once did a rather elaborate conversion using @decomp to move from TM3.1 to Penn...It worked pretty well, here's a rough breakdown of what I did:

On the TM3.1 game, I did an @decomp of every object in the db,
sequentially, logging the WHOLE thing out. This way, the whole thing
would be recreated, in order, preserving dbrefs. And all the commands
that I 'created' the output for would get quoted in as commands to the
Penn game.

I then ran several @dol's to accomplish the following things:

  1. To create a series of commands that would relocate and re-link all exits:
    @dol search(type=exit)=think @tel ##=[home(##)];think @link ##=[loc(##)]        
  2. To create a series of commands that would relocate all objects and
    @dol search(type=player) [search(type=thing)]=think @tel ##=[loc(##)]
  3. To create a series of commands to correctly re-chown everything (I
    think TM3.1 has stats()):
    @dol lnum(0,first(stats()))=think @chown ##=[owner(##)];think @set ##=!halt     

I then did a bit of editing on the big flatfile with all of the output
of the above @dol's, so that flags/powers were appropriately renamed to
be reset, obvious function inconsistencies were corrected, etc. I also
compressed a lot of things so that multiple consecutive @set lines were
put into one @dol. Room #0 was redesc'ed off the bat.
Then, I started up a brutally vanilla Penn game, logged in with #1, and
quoted the flatfile of @decomp commands in. (Yay tf)

Truthfully, it took about a half hour to quote in a 3k-object db
flatfile. And truthfully, it took three tries, as I found little oops'es
that I hadn't caught in the editing of the flatfile. Whenever I caught
an oops, I would just /kill the tf quote, @shutdown the Penn game and
restart with the minimal.db.

One of the few things I found as a problem was the case of garbage
objects. In my original sequential @decomp of the TM3.1 db, I tested the
type of each object. If it was of type Garbage, I @created an object as
a dbref 'placeholder'. Then one of my last commands in the flatfile was
to @search for all 'thing' objects named 'Garbage' and nuke them.

After this whole process, there was about two or three days for the
staffers of the game to smooth over a few very small
inconsistencies (Channels, for instance), but on the whole, the game was
ported VERY smoothly using this method.