Quickbuild v2 released!

Submitted by Sketch on Tue, 2012-06-26 22:27

Quickbuild is an offline MUSH building tool.
Full list of features and download here: https://github.com/Sketch/quickbuild
(Direct .zip download: https://github.com/Sketch/quickbuild/zipball/master)

Quickbuild is a Ruby script that lets you quickly lay out a MUSH area (a set of rooms connected by exits, optionally zoned and/or parented) in an easy-to-use format in a text file. It's smart about cardinal directions (aliases and reverse exits), <b>racket style exit-naming, and a few other things.


I'm as skeptical as you are! "What does this thing do for me," you ask. Here is an example:

Quickbuild takes this input, describing the connections between seven (7) rooms:

"sw" : "Grasslands" <-> "The Charcoal Grasslands" <-> "Fire Kingdom"
"s"  : "Ice Kingdom" <-> "The Frosted Grasslands" <-> "Grasslands"

...And produces this MUSHcode to build them all, and all their exits:

think Digging Rooms
@dig/teleport Grasslands
@set me=ROOM.Grasslands:%l
@dig/teleport The Charcoal Grasslands
@set me=ROOM.The_Charcoal_Grasslands:%l
@dig/teleport Fire Kingdom
@set me=ROOM.Fire_Kingdom:%l
@dig/teleport Ice Kingdom
@set me=ROOM.Ice_Kingdom:%l
@dig/teleport The Frosted Grasslands
@set me=ROOM.The_Frosted_Grasslands:%l
think Linking Rooms
@teleport [v(ROOM.Grasslands)]
@open Southwest <SW>;southwest;sw=[v(ROOM.The_Charcoal_Grasslands)]
@open North <N>;north;nort;nor;no;n=[v(ROOM.The_Frosted_Grasslands)]
@teleport [v(ROOM.The_Charcoal_Grasslands)]
@open Northeast <NE>;northeast;ne=[v(ROOM.Grasslands)]
@open Southwest <SW>;southwest;sw=[v(ROOM.Fire_Kingdom)]
@teleport [v(ROOM.Fire_Kingdom)]
@open Northeast <NE>;northeast;ne=[v(ROOM.The_Charcoal_Grasslands)]
@teleport [v(ROOM.Ice_Kingdom)]
@open South <S>;south;sout;sou;so;s=[v(ROOM.The_Frosted_Grasslands)]
@teleport [v(ROOM.The_Frosted_Grasslands)]
@open North <N>;north;nort;nor;no;n=[v(ROOM.Ice_Kingdom)]
@open South <S>;south;sout;sou;so;s=[v(ROOM.Grasslands)]

Saved you a bit of typing, didn't it? As a more extreme example, I used a 35-line file to build a whole walk-through Scrabble board for the 2012 M*U*S*H April Fools. The complete area has 250 Rooms and 840 Exits!
Not sold yet? Read on!


Quickbuild v2 is recoded from scratch, and features a handful of improvements:
  • The DESCRIBE command - A shorthand for @descibe-ing rooms as they're built. Just DESCRIBE "Your Room Name" = The description you want, in the Quickbuild file itself, and the room will have its @describe set when it's built.
  • Name tagging - If you're building a puzzle or maze (and don't mind rooms having different DBref#s), you can tag rooms with the same name and Quickbuild will treat them as different rooms: "n" : "Puzzle"1 <-> "Puzzle"2 gives you north/south exits from two rooms named "Puzzle". Name tagging is even good for grabbing sections of a MUSH--Just tag each room name with its own DBRef#. I tested this by writing a script that grabbed the main grid off of M*U*S*H, and rebuilding the grid in another MUSH!
  • Easier setup - Quickbuild requires no gems or other downloads. Just install Ruby, and it will run.
  • Better error handling - Quickbuild v2 catches a bunch of new errors, and produces plenty of warnings about odd input or potential badness like rooms with no exits. All errors and warnings also have filenames and line numbers!
  • Better hackability - The code itself is completely new, and separated into discrete sections that do specific things: Parse input files into opcodes, opcodes into graphs, and graphs into MUSHcode. This makes the code much more readable, comprehensible, and most importantly hackable.

History of Quickbuild:
The original Quickbuild was a perl script coded up by Javelin@M*U*S*H in 1999. I started hacking on it in 2011, and asked about becoming and then quickly became the maintainer in September 2011.
I recoded Quickbuild from scratch for a number of reasons. First of all, I had trouble using the original; the code was a little messy, but what really caught me off-guard was having to install Perl modules. I wanted Quickbuild v2 to be easy to set up, easy to use, and easy to read and alter. I also wanted to add a few features, the most prominent of which are listed above. Lastly, it's a nice piece of self-written code to offer as a Ruby code sample, for my own purposes. :)