There are several other programs bundled with IFM, which you might find useful.
ifm2dev is a front end to fig2dev, which converts diagrams in Fig format to various other formats. ifm2dev converts each map section and writes them to separate files. The command format is:
All fig2dev output options are passed through without change. You can use the -L option of fig2dev to set the output format. See the fig2dev manpage for details.
You can supply options to IFM by first giving the end-of-options indicator (-) and then the options.
ifm2tex is a program for creating a summary file in LATEX format, suitable for converting to PostScript and printing. It uses ifm2dev to create the maps. The command format is:
tkifm is a graphical front end to IFM. It provides a text editing window in which you can map out your game using IFM commands, and a set of menus to view things. The various features are as follows:
If you'd like to use your own editor to edit IFM files, but still view results with tkifm, you can. tkifm recognizes when the file it is visiting gets modified, and rereads it if so. If you like, you can also disable all tkifm file modification commands by setting the ifm(edit) variable to zero (see below). This is probably a good idea if using another editor, or else you might accidentally save from tkifm and lose all your changes.
On startup, tkifm reads an initialization file in your home directory (the one pointed at by the HOME environment variable). On Unix systems it is called .tkifmrc, and on Win32 systems it is called tkifm.ini. From there, using Tcl commands, you can set various things that affect the appearance of the program. Here's an example file showing the valid variables, their format and defaults.
# Example tkifm init file. # Whether to allow editing. set ifm(edit) 1 # Edit window dimensions. set ifm(editwidth) 80 set ifm(editheight) 24 # Editing font. set ifm(editfont) {Courier 12 bold} # Edit window colours. set ifm(editforeground) black set ifm(editbackground) wheat # Item list window dimensions. set ifm(itemwidth) 50 set ifm(itemheight) 30 # Task list (brief) window dimensions. set ifm(taskwidth) 50 set ifm(taskheight) 30 # Task list (verbose) window dimensions. set ifm(verbosewidth) 80 set ifm(verboseheight) 30 # Variable window dimensions. set ifm(varswidth) 50 set ifm(varsheight) 30 # Text window font. set ifm(textfont) {Times 12 bold} # Text window colours. set ifm(textforeground) black set ifm(textbackground) wheat # Whether to allow tearoff menus. set ifm(tearoff) 1 # Syntax highlighting variables. set ifm(syntaxcomments) firebrick set ifm(syntaxstrings) grey40 set ifm(syntaxstructure) blue set ifm(syntaxdirections) darkgoldenrod set ifm(syntaxspecial) cadetblue set ifm(syntaxbuiltin) forestgreen set ifm(syntaxkeyword) royalblue set ifm(syntaxpreprocessor) purple
Any errors or warnings that occur when invoking IFM will be displayed in a dialog. The current line of the text window will be changed to point at the error or warning line (if appropriate).
scr2ifm reads one or more transcripts of an Interactive Fiction game and produces a map of it in IFM format. It works on Infocom-style transcripts--those produced by Inform- and TADS-generated games (and of course Infocom games themselves). The idea is that you play your game in a carefree manner, without worrying about mapping anything, and after the session use scr2ifm to get a map. Well, that's the theory anyway.
scr2ifm offers two basic ways of mapping: you can create an initial (incomplete) map from your first transcript and then add the rest ``by hand'', or you can create a set of transcripts, each exploring different parts of the game, and then merge them all into a final map. Which you choose is up to you.
These are the command-line options for scr2ifm:
scr2ifm works by recognizing several key things in the transcript:
For best results with scr2ifm, you should follow these guidelines when making a transcript:
Another problem with mapping is that some games have these inconvenient things called puzzles, which sometimes block you from exploring everywhere so you can map it properly. Come on, IF authors, let's get our priorities right!
While you're making your transcript, you can use a subset of IFM commands to add extra things that scr2ifm will recognize. (Of course, the game almost certainly won't understand these commands, and will print a suitable indignant reply. But that shouldn't affect the state of things.) The commands recognized are:
If you use the map command, you'll end up with two or more map sections. The first map section is the one that contains the very first room, and will have a default name unless you give it one using another map command.
The map produced by scr2ifm will not be perfect in a lot of cases. When running it through IFM you might get warnings about overlapping rooms, or crossed link lines. These problems are usually fixed by stretching the link lines of some of the rooms. Some overlapping-room problems are caused by the program making a bad choice of direction to put an up/down/in/out connection in. Another problem might be not recognizing when a room is the same as a previously-visited room, because the room description changed too much between visits.
You can fix most of these problems by creating a command file and specifying it with the -c option. There are two types of entry: scr2ifm commands and IFM commands. In a command file, blank lines and comment lines (those starting with a #) are ignored. If a command isn't recognized as a scr2ifm command, it's assumed to be an IFM command, and is passed straight into the output verbatim. You can use these to resolve conflicts in the generated map, by stretching certain links or hiding them altogether.
Here's a list of the commands available:
Output from scr2ifm is as follows. First, if the title of the map was specified with the title command, it is printed. Then, if there's more than one map section, a list of map section titles is printed.
Next, there's a list of IFM commands derived from the transcript. Each time a new room is seen, a room command is output for it. Each room is given a tag name formed by the initials of each capitalized word in its name. To make tags unique, the second and subsequent occurrences of a tag name have that number appended. For example, room ``West of House'' would get tag WH.
If a movement command was up, down, in or out, then a compass direction is chosen for it that doesn't clash with other rooms (if possible) and the go attribute is used to mark its real direction. If a movement command isn't recognized, the same is done except this time the cmd attribute is used to record the command instead.
If movement is seen between two already-visited rooms, a link command is output (or a join, if the rooms appear to be on different map sections). Link tags are built by concatenating the room tags of the linked rooms with an underscore in between. Link movement is dealt with in the same manner as for rooms.
If the special item or task commands are seen, then an item or task command is output following the room that it appears in. If an item or task hasn't been given a tag, it is assigned one. The tag is made by translating all invalid tag characters in the name to underscores, capitalizing (to avoid clashes with IFM commands) and, if the tag clashes with a previously-defined tag, adding a numerical suffix to make it unique. For example, ``black rod'' might get a tag Black_rod_2.
Finally, the IFM commands from the file indicated by the -c option are echoed (if any).
Here's a simple example of scr2ifm in action on Colossal Cave. First, the transcript in file advent.scr (with annotation):
Start of a transcript of ADVENTURE The Interactive Original By Willie Crowther and Don Woods (1977) David M. Baggett's 1993 reconstruction, ported by Graham Nelson Release 3 / Serial number 951220 / Inform v1502 Library 5/12 Interpreter 1 Version B / Library serial number 951024 >verbose ADVENTURE is now in its "verbose" mode, which always gives long descriptions of locations (even if you've been there before). >l At End Of Road You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.
>e Inside Building You are inside a building, a well house for a large spring. There are some keys on the ground here. There is tasty food here. There is a shiny brass lamp nearby. There is an empty bottle here. >item "keys" That's not a verb I recognise. >item "food" That's not a verb I recognise. >item "lamp" That's not a verb I recognise. >item "bottle" That's not a verb I recognise.
>get all stream: You have nothing in which to carry the water. well house: That's hardly portable. spring: That's hardly portable. pair of 1 foot diameter sewer pipes: That's hardly portable. set of keys: Taken. tasty food: Taken. brass lantern: Taken. small bottle: Taken. >w At End Of Road You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully. >s In A Valley You are in a valley in the forest beside a stream tumbling along a rocky bed. >s At Slit In Streambed At your feet all the water of the stream splashes into a 2-inch slit in the rock. Downstream the streambed is bare rock. >s Outside Grate You are in a 20-foot depression floored with bare dirt. Set into the dirt is a strong steel grate mounted in concrete. A dry streambed leads into the depression.
>unlock grate What do you want to unlock the steel grate with? >keys You unlock the steel grate. >task "Unlock grate" need Keys That's not a verb I recognise.
>open grate You open the steel grate. >task "Open grate" after last That's not a verb I recognise. >d Below the Grate You are in a small chamber beneath a 3x3 steel grate to the surface. A low crawl over cobbles leads inward to the west. The grate stands open. >w In Cobble Crawl You are crawling over cobbles in a low passage. There is a dim light at the east end of the passage. There is a small wicker cage discarded nearby. >item "cage" That's not a verb I recognise. >get cage Taken. >w Darkness It is pitch dark, and you can't see a thing. >undo In Cobble Crawl [Previous turn undone.]
>turn lamp on You switch the brass lantern on. >w In Debris Room You are in a debris room filled with stuff washed in from the surface. A low wide passage with cobbles becomes plugged with mud and debris here, but an awkward canyon leads upward and west. A note on the wall says, "Magic word XYZZY." A three foot black rod with a rusty star on one end lies nearby. >item "black rod" tag Rod That's not a verb I recognise. >xyzzy Inside Building You are inside a building, a well house for a large spring.
>xyzzy In Debris Room You are in a debris room filled with stuff washed in from the surface. A low wide passage with cobbles becomes plugged with mud and debris here, but an awkward canyon leads upward and west. A note on the wall says, "Magic word XYZZY." A three foot black rod with a rusty star on one end lies nearby. >get rod Taken. >w Sloping E/W Canyon You are in an awkward sloping east/west canyon. >w Orange River Chamber You are in a splendid chamber thirty feet high. The walls are frozen rivers of orange stone. An awkward canyon and a good passage exit from east and west sides of the chamber. A cheerful little bird is sitting here singing. >item "bird" That's not a verb I recognise. >unscript End of transcript.
# Fix bad choice of direction. link BG dir s; # Hide "xyzzy" link. link IDR_IB hidden; # Replace it with join. join IDR to IB cmd "xyzzy";
## IFM map created by scr2ifm.pl ## Commands generated by transcript. room "At End Of Road" tag AEOR; room "Inside Building" dir e from AEOR tag IB; item "keys" tag Keys; item "food" tag Food; item "lamp" tag Lamp; item "bottle" tag Bottle; room "In A Valley" dir s from AEOR tag IAV; room "At Slit In Streambed" dir s from IAV tag ASIS; room "Outside Grate" dir s from ASIS tag OG; task "Unlock grate" need Keys tag Unlock_grate; task "Open grate" after last tag Open_grate; room "Below the Grate" dir n from OG go down tag BG; room "In Cobble Crawl" dir w from BG tag ICC; item "cage" tag Cage; room "In Debris Room" dir w from ICC tag IDR; item "black rod" tag Rod; link IDR to IB dir n s cmd "xyzzy" tag IDR_IB; room "Sloping E/W Canyon" dir w from IDR tag SEC; room "Orange River Chamber" dir w from SEC tag ORC; item "bird" tag Bird; ## Customization commands. link BG dir s; link IDR_IB hidden; join IDR to IB cmd "xyzzy";
Here's a list of things that scr2ifm doesn't currently deal with: