TeensyMud - 'A ruby mud server.'


Mudlib Reader

The Mudlib Reader utility converts databases, zones, areas, help files and other stuff from a number of popular (and unpopular) mud servers to a several YAML formats. The most important one being TeensyMud format.

This code has not been released yet although I have made available for download the tinymud database and the dikumud alfa zones. These are probably out of sync with the current TeensyMud. Be advised you must follow the license conditions contained therein.

Work on this is in hiatus until the TeensyMud database interface and object model is refactored. The original intent of writing this was to populate TeensyMud with test data. I had always known that most room-based muds, even those far apart in genealogy, contained common data. Anyway after writing a parser for tinymud, I got carried away here wrote one for dikumud and then merged the procedural mishmash together factoring out a lot of common code. Then I added circle, then merc, then rom, and finally smaug. Obviously this has utility for those wanting to migrate to TeensyMud, as well as those trying write generic area convertors.

A preview...

$ ruby mr2.rb --help   
MudLIB Reader 0.2.4

  DikuMud Alfa, DikuMud Gamma, Merc 2.1, Merc 2.2, Circle 3.1, 
  TinyMud 1.4.1,TinyMud 1.5.4, Rom2.4b6, Smaug 1.4

Usage: ruby mr2.rb [options]

Specific options:
    -t, --type TYPE                  Select the mud server type - required (no default)
                                       One of: gamma, alfa, merc, tinymud, rom, circle, smaug

                                         Example: -t tiny

    -f, --format FORMAT              Select the output format - default is multi
                                       One of: single, multi, teensy

                                         Example: -f single

    -s, --start NUMBER               Select the starting thing id number
                                       Defaults to 0

                                         Example: -s 3000

    -p, --path PATH                  Select path to the input LIB/AREA/DB directory
                                       Defaults to current directory
                                       Must include trailing backslash

                                         Example: -p /circle-3.1/lib/
                                                  -p /merc22/area/

    -i, --input FILE                 Select a specific input database/area file.
                                       For Diku this overrides the default prefix of 'tinyworld'.
                                       This is not used at all for circle but required for tinys

                                         Example: -i small.db
                                                  -i midgaard.are

    -o, --output FILE                Select output file prefix
                                       Defaults to 'teesnyworld'

                                         Example: --output myworld

General options:
    -v, --[no-]verbose               Run verbosely
    -h, --help                       Show this message
        --version                    Show version

$ ruby mr2.rb -t alfa -f teensy -o world -p /c/work/diku-alfa/trunk/lib/
Sector Error: file-tinyworld.wld line-12105 match--1
Setting to :inside.
Thing Type Error: file-tinyworld.obj line-1388 match-0
Setting to :nothing.
Thing Type Error: file-tinyworld.obj line-1926 match-0
Setting to :nothing.
Thing Type Error: file-tinyworld.obj line-1958 match-0
Setting to :nothing.
Thing Type Error: file-tinyworld.obj line-2026 match-0
Setting to :nothing.
657 rooms processed.
1529 exits processed.
253 things processed.
150 mobiles processed.
17 shops processed.
23 zones processed.
0 helps processed.
0 specials processed.
0 scripts processed.
0 players processed.
Recalculating oids starting at oid 0.
Calculated last oid used will be 2629

See a sample MudlibReaderSample