SLAG: A Z-Machine Hint System

In a nutshell, SLAG is a Perl script that takes a command file describing hints to be built, then converts the command file to Inform source code. Once built and executed, the program will run the invisiclues in the standard menu-oriented manner. The z-code binaries are fairly lean since they reasonably do not build in Graham's parser and all that.

John Kean's similar project which I had hoped to help on (but completely failed to for a variety of reasons) has other intentions: convert the Invisiclues directly from human-readable to Inform. This was a loftier goal than I wanted to achieve, and besides I wanted a straightforward "mark up language" to make new invisiclues-style programs.

So this SLAG hack was born.

Note that I intended for the Inform output of SLAG to be stand-alone, but there's nothing stopping you from taking it and working it into your own code. (Except, of course, the fact that other menuing systems might be better.)

Features

None.

Well, there are actually a number of these:

  1. Ability to show an intro "splash" screen.
  2. Ability to nest menus.
  3. Ability to show just plain text (fixed or proportional fonts) in addition to clues.

The SLAG input files, below, demonstrate pretty much everything.

"Features"

  1. To link from a menu to another item requires typing the title of that item twice to identify the link.
  2. Syntax errors are often ignored by SLAG, leaving you to attempt to figure out what you did wrong at the Inform-compile stage.
  3. To convert from the human-readable Invisiclues you download, you must manually tidy it up into the SLAG input format. vi macros really help out here, but it is easy to accidentally eyeball the clues if you haven't played the game. Check John Kean's stuff if this is what you're after.
  4. I'm a real novice when it comes to this low-level screen manipulation. It works fine under Frotz for Unix, and acceptably under xzip. I'll bet there are other interpreters that have a fit.
  5. Some parts of the code are still virgin.
  6. Clues, hints, and menu items must be typed onto a single line.
  7. User must remember to keep the number of menu items less than 22 or so, or screen output will suffer on small terminals.
  8. Doesn't handle small screens well at all.
  9. Written in Perl.
  10. Etc.

Downloads

slag--The Perl script itself (Release 8)

The following two files are not required, but might prove interesting to some:

Makefile--A Makefile to build the invisiclues
vimac--Some vi macros to help convert Invisiclue files to SLAG files (contains escape characters)

 SLAG inputZ-Machine output
Zork I zork1inv.slg zork1inv.z5
Zork II zork2inv.slg zork2inv.z5
Zork III zork3inv.slg zork3inv.z5
Zork: The Undiscovered Underground ztuuinv.slg ztuuinv.z5
Enchanter enchaninv.slg enchaninv.z5
Sorcerer sorcinv.slg sorcinv.z5
Spellbreaker spellbinv.slg spellbinv.z5
Trinity trininv.slg trininv.z5
Planetfall planetinv.slg planetinv.z5
Stationfall stationinv.slg stationinv.z5
Lurking Horror lurkinginv.slg lurkinginv.z5
Leather Goddesses lgopinv.slg lgopinv.z5
Hitchhikers Guide hhgginv.slg hhgginv.z5

I have released the SLAG source code into the public domain. So there. If you want me to make changes or fixes, feel free to request them and I'll accommodate you, time permitting.

I'm not doing any more .z5 files for now, but if you mail me your requests, I'll queue them up.

Change Log

Release 8:

Release 7:

Release 6:

Release 5:

Release 4:

Release 3:

Release 2:

Why "SLAG"?

I was going to call it "ZHS" (Z-machine Hint System), but that seemed to imply that my version was the Z-machine hint system. I'm not proud enough of it to call it that, so I came up with a new impromptu name. I rather suspect that someone else can write a better system using the Z-Machine, so they are free to use "ZHS".

Since I had just been watching Red Dwarf, I credit Dave Lister for inspiring me.


beej@piratehaven.org