xfrotz - Man Page
interpreter for Infocom and other Z-Machine games (X11 interface)
Synopsis
xfrotz [options] file [blorb_file]
At least one file must be specified on the command line. This can be either a plain Z-code file or a Blorb file. A Z-code file is a compiled executable for the Z-Machine. A Blorb file contains audio, graphics, and other things in addition to the game wrapped up into a single file. It can also optionally contain the Z-Machine executable. If a plain Z-code file is supplied, then Frotz will check for a Blorb file with the same base name but an extension of .blb, .blorb, or .zblorb and load it if found.
If the file supplied on the command line is a Blorb file, then Frotz will check to see if a Z-code file is contained within. If not found, then Frotz will complain and exit.
An alternatively-named Blorb file can be supplied as the optional second parameter to the command line invocation.
If you want to play any of the games from Infocom that use sound or graphics, you will need to get a corresponding Blorb file from the Interactive Fiction Archive. See Further Information below.
Description
The xfrotz program is an Xlib-based interpreter for Z-machine code, the byte code used by Infocom games and, more recently, Inform. xfrotz supports versions 1 through 8 of the format. It uses the standard Quetzal format for its saved games.
xfrotz supports Version 6 graphical games. It currently supports color, graphics (in the .mg1 format only) by way of Blorb archives or by parsing Infocom's original files. Sound is supported through OSS.
Options
In each of the following options which enables some feature, replacing - with + explicitly disables that feature, overriding any X resources. Also, each option has a corresponding X resource, which is listed in parentheses after the option name.
- -aa
(class WatchAttribute, name watchAttrAssign) Enables watching of attribute assignment.
- -at
(class WatchAttribute, name watchAttrTest) Enables watching of attribute testing.
- -bg <color>
(class Background, name background) Sets the default background color. In addition to the standard X color specification formats, xfrotz supports the format z:num, which refers to a z-machine color from 2 to 9.
- -c <number>
(class ContextLines, name contextLines) Specifies the number of context lines used. When scrolling large amounts of text, xfrotz pauses after each screenful with a “[MORE]” prompt; this option specifies how many lines of a previous screen xfrotz will keep at the top of the next screen.
- -fg <color>
(class Foreground, name foreground) Sets the default foreground color. See -bg above.
- -fn[-z|[f][b][i]] <font name>
(class Font, name font[Z|[F][B][I]]) Sets the fonts to be used for various styles. For example, -fn-fbi sets the font for fixed, bold, italic text, and -fn-z sets the z-machine “picture font,” which is used in Beyond Zork and Journey.
- -i
(class IgnoreErrors, name ignoreErrors) Ignore runtime errors. This can be useful when running xfrotz with buggy story files which cause fatal errors.
- -lm <number>
(class Margin, name leftMargin) Sets the left margin.
- -L <filename>
(class LoadThis, name loadthis) When the game starts, load this saved game file.
- -ol
(class WatchObject, name watchObjLocating) Enables watching of testing the location of objects.
- -om
(class WatchObject, name WatchObjMovement) Enables watching of object movement.
- -p
(class Piracy, name piracy) Enable branching on the @piracy opcode. This opcode is seldom used.
- -R <path>
(class Restricted, name restricted) Restricted read/write. Reading and writing files will be restricted only to the provided path. Ordinarily xfrotz will write or read its saves, transcripts, and move recordings in whatever path or directory the user provides when the SAVE, SCRIPT, or RECORDING commands are given. This can be undesirable if xfrotz is run in a restricted environment, by a front end, or by a chatbot. This option will cause xfrotz to write or read only to the provided path and nowhere else. Then the controlling process can then watch that directory for changes and need not worry about someone scribbling or snooping who-knows-where.
- -rm <number>
(class Margin, name rightMargin) Sets the right margin.
- -rs <number>
(class RandomSeed, name randomSeed) Set the random seed. By default, the random number generator is initialized based on the system clock; this allows you to make the random number generator predictable, for use in recorded scripts or debugging.
- -sc <number>
(class ScriptColumns, name scriptColumns) Set the transcript width (default 80). Set to 0 to disable line splitting in transcripts.
- -t
(class Tandy, name tandy) Set the z-machine's Tandy bit, which affects the behavior of certain Infocom games. For example, Zork I pretends not to have sequels, and Witness has its language censored.
- -u <number>
(class UndoSlots, name undoSlots) Set the number of undo slots available. The default number is 25. Note that many Infocom games do not support an “undo” command, and most Inform games do not allow more than one “undo” at a time. Because of this, you may need to use the undo hotkey instead (see below).
- -x
(class ExpandAbbrevs, name expandAbbrevs) With this option enabled, xfrotz Expand the abbreviations "g", "x", and "z" to "again", "examine", and "wait". This switch is for use with old Infocom games that lack these common abbreviations which were introduced in later games. Use it with caution: A few games might use "g", "x" or "z" for different purposes.
- -xrm <resources>
This allows setting resources on the command line.
- -zs <level>
(class ZStrict, name zStrict) Set the reporting level of “Vile Zero Error From Hell” bugs. The possible levels are: 0 to print no error messages, 1 to print just one error message and ignore subsequent errors (the default), 2 to print all error messages, or 3 to exit with a fatal error. Symbolic values of never, once, always, and fatal, respectively, are also accepted.
Resources
xfrotz's resource class is “XFrotz”, and its resource name is the base name by which it was invoked, usually “xfrotz”. In addition to the X resources listed above, there is one more set of resources: by setting colornum (class name Colornum) to the name of a color, you can change the meaning of the z-machine colors. Note that here the z:num syntax is not accepted.
Z-Machine Standards
Frotz complies with the Z-Machine Standard 1.1 of May 2006, revised February 2014. The authoritative version is found here:
http://inform-fiction.org/zmachine/standards/z1point1/index.html
As of 1.1, an additional optional parameter prompt is allowed on Version 5 extended save/restore. This parameter allows a game to read or write an auxiliary (aux) file without prompting the player. See section 15 of the Standard for details. Frotz restricts such files to having an ".aux" filename extension. When the -R (restricted read/write) option is active, reads and writes through this mechanism are restricted to the provided path the same as all other file accesses.
Environment
xfrotz supports the INFOCOM_PATH environment variable. This is a colon-separated list of pathnames in which xfrotz will search for the given story file. Any additional files required, such as graphics files, sounds directory, or blorb files must be in the same directory as xfrotz finds the story file.
Hotkeys
xfrotz supports several “hotkeys,” which interrupt the currently running game to set options or perform certain actions.
- Mod1+D
Sets debugging options by prompting the user. These options are equivalent to specifying -aa, -at, -ol, and -om on the command line.
- Mod1+H
Lists available hotkeys.
- Mod1+N
Starts a new game. Equivalent to the restart command supported by most games.
- Mod1+P
Starts or stops playback from a recorded script.
- Mod1+R
Starts or stops recording player input into a file.
- Mod1+S
Sets the random number generator seed.
- Mod1+U
Undoes one turn.
- Mod1+X
Exits the currently running game.
Further Information
The Frotz homepage is at https://661.org/proj/if/frotz/.
A git(1) repository of all versions of Unix Frotz from 2.32 to the bleeding edge is available for public perusal at
https://gitlab.com/DavidGriffith/frotz/.
The Interactive Fiction Archive, at https://www.ifarchive.org/, is a good place to find games to play with Frotz. To play Infocom's games that use graphics or sound, you'll need to get corresponding Blorb files from there. Various ports and builds for Frotz may also be found at the IF Archive.
Most distributions of Linux and BSD include Frotz in their package repositories.
It is distributed under the GNU General Public License version 2 or (at your option) any later version.
https://www.gnu.org/licenses/gpl-2.0.en.html
This software is offered as-is with no warranty or liability. If you find a bug or would like Frotz to do something it doesn't currently do, please visit the above Gitlab website and report your concerns.
Caveats
This manpage is not intended to tell users HOW to play interactive fiction. Refer to the file HOW_TO_PLAY included in the Unix Frotz documentation or visit one of the following sites:
http://www.microheaven.com/ifguide/
http://www.brasslantern.org/beginners/
http://www.musicwords.net/if/how_to_play.htm
http://ifarchive.org/
Bugs
If run on an 8-bit display, xfrotz will most likely leak the entire color palette, especially if displaying graphics.
The window size is fixed at 800x600, with pictures scaled to match; this scaling is hard coded. Also, xfrotz depends on backing store instead of saving the screen's state.
If different fonts have different heights, the display might look a bit strange, and things might not line up as they should. This is especially apparent in menus.
In order to change the fonts used, you would usually have to specify at least 4 fonts (for normal, bold, italic, and bold italic). This is extremely cumbersome.
Authors
Frotz was written by Stefan Jokisch in 1995-7. xfrotz is an Xlib port written by Daniel Schepler, based in part on the Unix port by Galen Hazelwood and on WinFrotz by Rich Lawrence.
The Unix port is currently maintained by David Griffith <dave@661.org>
See Also
frotz(6) sfrotz(6) nitfol(6) rezrov(6) jzip(6) xzip(6) inform(1)