xfrotz [options] file
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.
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.
(class WatchAttribute, name watchAttrAssign) Enables watching of attribute assignment.
(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.
(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.
(class WatchObject, name watchObjLocating) Enables watching of testing the location of objects.
(class WatchObject, name WatchObjMovement) Enables watching of object movement.
(class Piracy, name piracy) Enable branching on the @piracy opcode. This opcode is seldom used.
- -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.
(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).
(class ExpandAbbrevs, name expandAbbrevs) With this option enabled, xfrotz expands “x” to “examine,” “o” to “oops,” and “g” to “again.” This is convenient when running certain Infocom games which do not implement these abbreviations.
- -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.
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.
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. Note that xfrotz will expect the story.mg1 file and the sounds directory to be in the same directory as it finds the story file.
xfrotz supports several “hotkeys,” which interrupt the currently running game to set options or perform certain actions.
Sets debugging options by prompting the user. These options are equivalent to specifying -aa, -at, -ol, and -om on the command line.
Lists available hotkeys.
Starts a new game. Equivalent to the restart command supported by most games.
Starts or stops playback from a recorded script.
Starts or stops recording player input into a file.
Sets the random number generator seed.
Undoes one turn.
Exits the currently running game.
The Frotz homepage is at https://661.org/proj/if/frotz/.
The bleeding edge of Frotz development may be followed there.
The Interactive Fiction Archive is a good place to find games to play with Frotz. Various ports and builds for Frotz may also be found here. Here is its URL:
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.
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.
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:
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.
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 <firstname.lastname@example.org>
frotz(6) sfrotz(6) nitfol(6) rezrov(6) jzip(6) xzip(6) inform(1)