Friday, January 16, 2009

converting zmud maps to tintin++, and tintin++ with 100k rooms

The past few days I've been examining the telnet clients available for linux. There isn't too much to speak of, unfortunately. Many of them aren't under active development. However, I found a new MUD client being developed called mudlet that has the potential to be pretty cool.

I ended up using tintin++, since it had a rudimentary auto-mapper which looked interesting. After playing around with it for a while, I wondered if there was a way I could use my zmud maps with tintin++. I couldn't find my wotmud maps from a long time ago, so I grabbed the ones available from map.wotmad.org. What follows is the rough steps it took to get them into a format tintin++ understood.
  1. export zmud MDB data
  2. regex it into something sqlite likes
  3. throw it at sqlite
  4. tweak some data so tintin++ can do more things (like colors) faster/easier
  5. grab what we need from sqlite and output tintin++'s format
What you need:
And of course a zmud mdb file. And now...

$ perl ./mdb2sqlite.pl zmud.mdb
...
$ perl ./zmudconv.pl zmud.mdb.sqlite > tintin.map


mdb2sqlite.pl throws some errors on MetaTbl and another at the end, but they seem to be harmless. If you have a suggestion for a fix, I happily accept patches (or just guru-like advice too, I suppose).

Also, a few more things. My wotmud map had too many rooms for tintin++, so I wrote a little patch that increases the maximum (to 100k) to fix that. It seems to work for me, but YMMV.

Finally, for those of you using a distro without tintin++, but with RPM, here's a specfile for you (that uses the above patch, too). Just pull the patch into SOURCES/ first.

$ rpmbuild --sign -ba SPECS/tintin.spec

* Without the --sign if you don't have rpm set up to use gpg.

Anyway, happy MUDding!