trenchant.org

by adam mathes · archive · rss · 🐘

QUEST_EBOOKS

This weekend’s project was creating a Twitter bot based on the content of early Sierra adventure games.

It’s already way better than anything I’ve ever tweeted on my own.

Follow @quest_ebooks on Twitter

A 3D Animated Adventure

Currently it’s tweeting out things based on a language model created by extracting the text from the MS-DOS versions of King’s Quest, King’s Quest II, King’s Quest III, Leisure Suit Larry, Police Quest, Space Quest, and Space Quest II.

Why those games? I own and have played (in most cases repeatedly) each of them. To me they share a certain “Sierra sensibility.” The improvements to the parsers, writing, and systems means the later games are more advanced and differentiated but also don’t have quite the same house style.

And they all use the same early AGI system so I could extract the text (relatively) easily. I didn’t get around to figure out how to parse out text from the later SCI games.

Technical Details

I was afraid I might have to do Real Computer Science but luckily there’s a community that reverse engineered the Sierra AGI formats years ago and made their work available.

I relied on some AGI utilities by Lance Ewing to do the hard work of extracting the resources of the old games into readable formats. In particular, I used XV3 and VOLX to extract the LOGIC files out of VOL files.

(Note: I wanted to include a few more AGI games, in particular Gold Rush and King’s Quest IV but the strings don’t seem to be in the LOGIC files in these later games, maybe due to internationalization schemes, or maybe because I’m extracting them wrong.)

After extracting the LOGIC files I used SHOWLOG to decrypt them into readable text.

This was slightly more complicated than it needed to be because these are DOS utilities, and I didn’t want to try and revamp them to be POSIX compatible and recompile them to work on OS X, so I ended up writing some scripts to create DOS BATCH files to do the hard work for me in a DOSBOX session. (Probably could have just re-booted into Windows but, whatever.)

The text is (mostly) hardcoded into these logic files. I wrote some python scripts to pull the message text out and reformat them a bit, leaving me with a few giant text files of strings from the games.

The twitter bot part I followed Joel McCoy’s How To Make an ebooks Bot which clearly walks you through the process of setting up mispy’s twitter_ebooks ruby scripts.

Some good stuff from it already:

You are too prickly to be touched.

You tap out a message in Morse code; unfortunately, only some rats hear a hollow, ringing sound.

·   ·   ·  
If you enjoyed this post, send emoji to my phone
🐸   🎯   🍩