AGiliTy: The (mostly) universal AGT interpreter

Version 1.1.2
Written by Robert Masenten
Updates and Windows version by David Kinder

This is an interpreter for game files created with Malmberg and Welch's Adventure Game Toolkit. AGiliTy is universal in the sense that it understands and interprets most of the many versions of the AGT game file format (unlike the original interpreters which were only intended to run the game file format associated with them) and also in that it is written in ANSI C and so should be straightforward to port to other systems.

It is not a port of the original interpreters but rather a completely new interpreter built around the game file format; while it follows the original interpreters on most things, there are some differences which are described below.

The most recent release of this program can be found at the Interactive Fiction archive:
https://www.ifarchive.org/indexes/if-archive/programming/agt/agility/

This software is copyright 1996-1999,2001 by Robert Masenten. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.


Acknowledgements

Thanks to the following people:
  • Jay Goemmer, who has sent me pages and pages of comments and bug reports.
  • David Kinder, responsible for the both the Amiga and Windows ports and a source of much valuable feedback.
  • David Youd, who has uncovered many subtle and complex bugs in both AGiliTy and Magx.
  • Mitch Mlinar, who has contributed several patches.
  • Jan-Erik Karlsson, for his bug report/patch.
  • Everyone else who has sent me suggestions and bug reports, including Audrey De Lisle (responsible for the red smoke), David Doherty, Al Golden, John Hartnup, Walter Isaac, Sami Kivela, Alexander Lehmann, Grant E. Metcalf, Paul Mikell , Adam Myrow, Olav Nielsen, D.J. Picton, Kevin Soucy, Ben Straub, "Grand Moff Tarkin", Adam Thornton, Mark Tilford, David Turpin and Gil Williamson.
  • Volker Blasius, maintainer of the Interactive Fiction Archive at www.ifarchive.org.
  • Robert Pelak, who suggested the name "AGiliTy".
  • All of the other people on rai-f who suggested names for my interpreter.


AGT and AGX Game Files

Games in the AGT format can be found at the Interactive Fiction archive:
https://www.ifarchive.org/indexes/if-archive/games/agt/

AGT games are recognizable by having several different files with names like 'MYGAME.D$$', 'MYGAME.DA1', 'MYGAME.DA2', ... , 'MYGAME.DA6', 'MYGAME.TTL', etc. They also usually come with a DOS runtime interpreter (usually called RUN.EXE or MRUN.EXE), which can be deleted without affecting AGiliTy.

AGiliTy also has its own file format (with extension "AGX", which stands for "Adventure Game eXecutable"); existing AGT games can be converted into this format using the utility agt2agx which comes with AGiliTy. They can also be created from AGT source code by using the Magx compiler, available from
https://www.ifarchive.org/indexes/if-archive/programming/agt/magx/

The new format takes all of the various AGT files (MYGAME.DA1, MYGAME.DA2, MYGAME.DA3, MYGAME.DA4, MYGAME.DA5, MYGAME.DA6, MYGAME.TTL, MYGAME.INS, MYGAME.VOC, MYGAME.D$$, MYGAME.OPT, and parts of MYGAME.CFG) and puts all of the data in one file (MYGAME.AGX).

Aside from the reduction in directory clutter, it has the following advantages:

  1. It's smaller; for large games the new format can save over 100K (The most extreme case I've run across so far is Shades of Gray: 790K vs. 568K uncompressed or 273K vs. 148K ZIPed).
  2. It loads more quickly since it's closer in structure to AGiliTy's internal format. (In particular, the interpreter doesn't need to build the dictionary or convert metacommand opcodes into a common format).
  3. It's more portable. For example, there are platforms out there that can't handle the 'D$$' extension.


AGT Versions Supported

AGiliTy understands the following versions of AGT (which includes every AGT game at www.ifarchive.org that I know of):
  • 1.0
  • 1.18
  • The early "Classic AGT": e.g. 1.19, 1.2, 1.21
  • "Classic AGT", both big and small: e.g. 1.3, 1.32, 1.35, 1.5, 1.7
  • The "Even Bigger 1.32" used by Cosmoserve
  • The "Chemically Altered 1.32" used by Shades of Gray
  • Menichelli's 1.82 [untested] and 1.83
  • Both known "proto-Master's Edition" 1.5 variants
  • The proto-Master's Edition 1.6 variant used by Pork
  • Both Master's Edition 1.0 variants
  • The Master's Edition 1.5/1.51, 1.55, and 1.56/1.6/1.7
The Pyramids of Mars and Cliff Diver require configuration options to be set; they use variant interpreters that are supported but can't be detected by the interpreter. In particular, Pyramids needs the ALT_ANY option and Cliff Diver requires the IRUN option.

Klaustrophobia is now supported. Use AGiliTy to play each of the chapters as usual. To switch between chapters, just SAVE at the end of one chapter and RESTORE at the beginning of the next (the game will tell you when to switch chapters; however, use SAVE instead of DONE1 or DONE2). This is still experimental and so I'd appreciate any feedback on how well it works (or doesn't work, as the case may be).

Unlike the MS-DOS programs that Klaustrophobia originally used for this, AGiliTy doesn't check that you've actually reached the end of the previous chapter; be warned that if you switch chapters before the game tells you to, things may break.

There is also no way for AGiliTy to support the intermission or endgame text from the original game: these are all printed out by DOS programs rather than by the AGT interpreter.


Differences from the Original AGT Interpreters

  • Disambiguation is done on the normal command entry line rather than having a special prompt.
  • When asked "Which object do you mean?", it is possible to reply ANY, EITHER, BOTH, or ALL, as well as giving the name of an object.
  • LISTEXIT ON, LISTEXIT OFF will turn automatic listing of exits on or off (in AGT there is a LIST EXITS command, so some AGT games don't list exits to rooms).
  • OOPS, UNDO, and RESTART are supported (at least on systems with enough memory).
  • Adjective-only matches are accepted by the parser.
  • The parser is capable of intelligent disambiguation.
  • It is also able to expand ALL and ALL EXCEPT (when appropriate options are set).
  • Some more multiple word verbs are automatically recognized (for example, GET IN is automatically translated into ENTER).
  • Some built-in verbs have additional synonyms. (In particular, standard one-letter abbreviations are supported: X for EXAMINE, Z for WAIT)
  • Game-specific synonyms are given a higher priority by the parser than the generic built-in synonyms.
  • The standard error messages are different than the original (except in Master's Edition games where most of the standard error messages are included in the game file)
  • SCRIPT output is sent to a file rather than to the printer.
  • AGiliTy has an extended AGILDEBUG debugging verb and supports more detailed metacommand tracing output.
  • AGiliTy uses a different save file format.
  • COLORS is not supported, although on some systems equivalent functionality may be supported in the configuration file.
  • The special title screen effects of the Shades of Gray and Cosmoserve97 interpreters aren't duplicated.
  • Graphics, sound, and fonts are not supported on all platforms.


List of Special Verbs

These are all of the special verbs recognized by the interpreter:
SCORE | Print out your score.
NOTIFY | Turn score notification on and off.
INSTRUCTIONS or INS | Display the instructions for the game.
INTRODUCTION or INTRO | Repeat the introduction of the game.
VIEW <picture> | Views an illustration. (Not supported on all platforms.)
BRIEF | Don't print room descriptions for rooms you've seen.
VERBOSE | Print room descriptions even for rooms you've already seen.
LIST EXITS | List the exits from a room.
LISTEXIT ON,OFF | Turn on/off automatic listing of exits.
SCRIPT | Start sending a transcript to a file.
UNSCRIPT | Stop creating a transcript.
SOUND ON, OFF | Turn sound on/off.
LOG | Start sending all of your commands to a file.
REPLAY <number> | Replay your commands from a file, one every <number> seconds.
REPLAY FAST | Replay your commands from a file without waiting for you to read the scrolling text.
REPLAY STEP | Replay your commands from a file, one for every keypress.
AGILDEBUG | Access debugging commands.
MENU | Toggle menu mode on or off.
OOPS | Correct a word you just mistyped; must be the first command on a line.
UNDO | Undo your last move; must be the first command on a line.
SAVE | Save the game.
RESTORE | Restore the game.
RESTART | Restart the game.
QUIT | Quit.


Configuration Files

The interpreter gets configuration information from as many as three places: the global configuration file, the game-specific configuration file (usually with an extension '.cfg'), and, in the case of AGX-format games, the game file itself.

Options in the game-specific file override options specified from the other two sources; options in the AGX file override those in the global file.

The following configuration options are supported on all platforms. Other options may be supported on your particular system; see appropriate platform-specific documentation for information.

Each option should be on a separate line in the configuration file. Lines starting with '#' will be treated as comments and ignored. Options can be negated by prefixing them with 'NO_' so that, for example, DEBUG would become NO_DEBUG.

General options:
VERBOSE | Start the game in VERBOSE mode
DEBUG | Allow the use of AGILDEBUG for pre-Master's games (For Master's Edition games, this decision is based on the DEBUG flag in the game file itself)
DEFAULT_ERRORS | Cause AGiliTy to use its own internal defaults for standard error messages even if the game file defines its own. (Recommended for most Master's Edition games.)
TONE | Enables the *tone* action token, which allows games to make annoying beeps on some platforms. The only game I might recommend enabling this for is CosmoServe which has some interesting sound effects.
IBM_CHAR | Try to use the IBM character set; don't translate them. On Windows characters in the IBM set will be mapped to the appropriate Unicode characters.
NO_ERROR | Suppress GAME ERROR messages during play. Some AGT games are not very well written and contain bad metacommands, out-of-range tokens, or other problems; this option will suppress the messages reporting these sorts of problems.
SMART_DISAMBIG | This turns on smart disambiguation. This works better with some games than others.
EXPAND_ALL | This turns on ALL and ALL EXCEPT expansion in the parser (by default, expanding them is the responsibility of the individual verb execution routines); see remarks on SMART_DISAMBIG: both of these options use the same engine and so they are likely to work or fail together. If you're using this, you'll probably also want to set FIX_MULTINOUN.
IGNORE_SIZE | Ignore weight and size limits on how much the player can carry. (There remain limits on the size and weight of any individual object.)
STABLE_RANDOM | Use a fixed algorithm for generating random numbers that always produces the same sequence on any system.

Game specific options:
(Many of these are more useful to game authors than game players.)
PROPER_CREATURE | Treat all creature names as proper nouns. (In particular, this will cause them to be capitalized and to not have "the" appear in front of them.) Use of DEFAULT_ERRORS is recommended with this option.
ROOMTITLE | Print the room title in bold before the room description in pre-Master's games. (Master's Edition games do this automatically)
IRUN | Print error messages in first person. This should be set for Cliff Diver.
NO_BLOCK_HOSTILE | Allow the player to leave a room containing a hostile creature if they go back the way they came.
NO_GET_HOSTILE | Prevents the player from picking up objects in a room containing a hostile creature. (Intended to be used with NO_BLOCK_HOSTILE)
NO_OBJECT_NOTES | Turns off notes after object description, such as '[providing light]'.
CONST_TIME | Increment time at a constant rate instead of randomly.
SLASH_BOLD | If set the slash character toggles bold on and off. (This should be set automatically for 1.8x games, but you may still need to set it explicitly for version 1.82)
PRONOUN_SUBS | Do $you$-style substitutions even in game-author defined messages.
ALT_ANY | This scans the ANY metacommands *with* the metacommands rather than before them. Should be set for Pyramids of Mars and not for any other games I know of.
CHECK_GRAMMAR | Print out error messages if the player enters a verb with too many objects. (For example, "N KEY").
FORCE_LOAD | Force AGX game to load even if interpreter isn't of the right version. Don't use this unless you know what you're doing: Magx doesn't assign minimum version numbers without reason.
PURE_AFTER | Causes LOOK and other end-of-turn actions to take place after AFTER commands. (This is on by default for Master's Edition games.)

Technical options: These are fine tuning.
FIX_METAVERB | Don't run ANY metacommands when executing a metaverb.
FIX_MULTINOUN | Only advance one turn when manipulating multiple nouns, rather than a turn for each noun.
PURE_ANSWER | Require AND-connected answers to be in the right order. (The Master's Edition documentation claims order doesn't matter, but with the actual interpreters it does)

Parse Options: These are all pretty technical.
PURE_DUMMY | Allow dummy verbs to be run by typing "dummy_verb3"
PURE_SUBNAME | Allow subroutines to be run by typing "subroutine3"
PURE_SYNONYM | Treat synonyms exactly as nouns.
ADJ_NOUN | Don't pick noun matches over adjective-only matches.


Debugging Options

With AGILDEBUG you can access various debugging commands. You can move objects around; change the values of flags, variables and counters; list objects in the game; examine and edit objects; and turn metacommand tracing on or off.

(Note: You can change almost all of the fields associated with an object using the View/Edit Object option; be warned that many of them are not SAVEd or RESTOREd since they can't be changed during normal play. If you change one of these and then RESTORE or UNDO, it will stay changed. Conversely, if you make a change, save, quit, and restore, the changed value will not be preserved. The fields having this behavior are marked.)

When metacommand tracing is on, every metacommand that is run will be displayed. You can turn off tracing of ANY metacommands and tracing of metacommands during disambiguation (the latter is off by default).

In addition, AGiliTy has a test mode which automatically reads a log file from .LOG (or equivalent) and writes a script to .SCR. In this mode, the random number generator is forced to be non-random, allowing for automated testing of games.

To use this, you create a LOG file (either by hand, by using the '-c' option, or by using LOG - note that this log file needs to include everything from the very beginning, including the key hit at the end of the title screen, so if using the LOG command you'll need to add a line or two at the beginning.)

Run AGiliTy in test mode once to get the script. Copy the script to some other file. Then, whenever you make a change to your game file, rerun AGiliTy and compare the new script with the old one. (There are programs that will do this automatically and just print out the lines that have changed.)


AGT Game List

Here is a list of a few of the better or more popular AGT games, along with their filename in
https://www.ifarchive.org/indexes/if-archive/games/agt/

I've also included references to reviews in issues of SPAG and XYZZYnews; these can be found in
https://www.ifarchive.org/indexes/if-archive/magazines/SPAG/ and
https://www.ifarchive.org/indexes/if-archive/magazines/XYZZYnews/ respectively.

Shades of Gray (soggy97.zip) by Mark Baker, Steve Bauman, Belisana Magnificent, Mike Laskey, Judith Pintar, "Hercules", and Cindy Yans
Widely considered to be the best AGT game ever written. This is a 'real life' game that is concerned more with the protagonist's ideals and mental state than with "adventuring". You open the game with amnesia and need to figure out who you are and recover your memory. To say more would give too much away. It's a bit uneven (it was written by a team of seven people) and it opens with an arbitrary puzzle that's a potential show-stopper, but overall this is an excellent game.
SPAG 2, 8; XYZZY 11(interview with one of the authors)

Cosmoserve (cosmos97.zip) Judith Pintar
Another strong AGT game. In it, you take the role of R.J. Wright, free-lance programmer/plumber, who is trying to finish a program that is due the next morning. You will need to log on to Cosmoserve and interact with the other users in order to be able to do this. It has a clever interface that really captures both the DOS command-line and life online pre-GUI. This is, however, a game you'll have to play through several times to win since it requires tight timing to be in all of the right places at the right times.
SPAG 5; XYZZY 1, 11(interview with the author)

The Jeweled Arena (tja.zip) David S. Raley
This game is divided into four chapters; in each chapter you are a different person (although the first and third chapters share the same main character). Games like this often suffer from a lack of unity; this game, however, holds together quite well. In part, this is because all of the chapters take place in a single, large, setting: the city of Kumeran. You can visit locations multiple times, as different characters. Locations that are unimportant in one chapter may be of great importance in a later chapter. In general, the world has a lot of depth, from diaries of the main characters to newspaper articles to books on law. On the other hand, it could have used some more beta-testing. There are several guess-the-verb puzzles and a quite a few bugs; most of the bugs are just amusing, but at least one (in chapter 3) can cause the game to become silently unwinnable for no obvious reason if you do a certain action in the wrong place.

The Multi-Dimensional Thief (mdthief1.zip) Joel Finch
[Summary/review by Audrey De Lisle]
You are a thief desiring to become a member of the Thieves' Guild. The test for this is to find the way out of the house. This seems rather easy, but it's not. One feature is a visit to OZ; another feat is done while quite small. The amazing machine is fun to use and you must learn how to use it to get in an otherwise closed room. You can order things from a catalog and part of the game is to figure out which items you need. I would recommend this game to those who like a little humor with their puzzles.
[There is also a non-AGT version of this game.]
SPAG 2, 4, 9


List of Changes since Version 0.1

Changes for Version 1.1.2
  • Added a STABLE_RANDOM configuration option. When enabled, the interpreter will use a fixed algorithm to generate random numbers, allowing log files to be created that will work on any system.
  • In the "tests" directory there are now log files that play through The Multi-dimensional Thief and Shades of Gray to completion. The intention is to add further log files for other games in time, as tests of the interpreter. Note that the above STABLE_RANDOM configuration option must be turned on to use these log files.
  • Substitutions generated by the interpreter's main loop are handled correctly. For example, dying in Shades of Gray no longer results in a "$You$ have died" message.
  • Metacommands overriding two-word synonyms built into the interpreter (such as GET OUT, which is a synonym for OUT) are handled.
  • The ability of metacommands to use expansions like $noun$ has been enabled for the AGT 1.5 variants.
  • The logic to set up roomflags when reading from DA1 files was not quite right. This has been fixed, and has been enabled for the AGT 1.5 variants. As a result, The Multi-dimensional Thief is finishable. Note that if you have a version of a game affected by this change as an AGX file, you will need to re-generate the AGX file from the original AGT data files.
  • The version of AGT used by Shades of Gray can override SCREAM in a dummy verb.
  • The order in which dummy verbs are scanned when parsing now better matches the order used in the original AGT interpreters.
  • Smart disambiguation is on by default for AGT 1.5 and later.
  • For pre-Magx games, GetNumberInput always returns a number in the range of a 16-bit signed integer, that is, between -32768 and 32767.
Changes for Version 1.1.1
  • Fixed output function: paragraph filling corrected; made filling less agressive for Magx games; fixed print_statline to work with a screen width greater than 100.
  • Object loops more carefully trapped, avoiding infinite loops. Object loop error no longer printed out.
  • IsWorn and IsCarried no longer look inside closed objects. [Al]
  • Fixed handling of AGT_DEBUG_CMD by agt_newgame(). [Kinder]
  • *nix port changes: MORE handling fixed; os_linux.c renamed os_termcap.c; os_curses.c is now the main *nix interface; os_curses version of fix_loc() fixed; os_curses batch support fixed.
  • 32-Bit DOS port: BIOS option now works.
  • Fixed formatting in debugger object editor.
Changes for Version 1.1
  • The interpreter will now work correctly when passed an AGT file name with an extension (instead of trying to read it as an AGX file).
  • Overhauled STANDARD message handling: ATTACK messages will now get the $noun$ and $object$ in the right order; parser messages now replaceable; $noun$-type substitutions are prevented in cases where they are not meaningful; added message fallback system to stdmsg(); added '-s' command line option for debugging standard messages; added $the_name$, $name_pro$, $name_indir$; fixed capitalization of proper $name$s; $/# substitution routines simplified.
  • Debugger now supports objprops, objflags, and PROPER.
  • New metacommand tokens: CanGo and MoveInDirection.
  • Added support for printing objprops and objflags.
  • Added support for itemized objprops/variables/objflags/flags.
  • Added support for explicit objects to redirection and command headers.
  • Null NOUN/OBJECT/ACTOR args to conditional tokens will no longer generate GAME ERROR messages.
  • Added $ and # expansion to shortdescs of nouns and creatures.
  • Misc bug fixes:initialization of seen and proper for original AGT games; types in GAME ERROR messages; objswap in exec_verb(); parse_noun will no longer look for multiple nouns when parsing the actor; possible buffer overrun in wordcode_match; added second line of vb== conditions to verify_scope.
  • Overhauled handling of dobj_rec, iobj_rec, actor_rec: they are now copied and freed by runverbs() and objcheck_cycle(); added copy_parserec(), free_all_parserec();
  • Fixed e-mail address and Jay's URL.
Changes for Version 1.0
  • Added support for proper names of creatures and nouns, indicated by the object in question having the PROPER flag set. Proper names are printed capitalized and without the definite article ("Fred" instead of "the fred"). Note that this change only affects built-in messages, and game messages that use the new $the_n$, $the_o$, and $the_c$ substitutions.
  • As part of this change, added the PROPER_CREATURE configuration option which will make *all* creature names proper.
  • For pre-Magx games, built-in verb synonyms now take precedence over author-defined ones. For example, N will now be interpretered as NORTH, even in games that try to redefine it as meaning "NO". (Games created using VERSION MAGX will still honor the author's intent.)
  • PLAY WITH is longer automatically converted to PLAY. [Metcalf]
  • TURN ON can now trigger specials [Metcalf]; in general, the handling of <verb> <preposition> <noun> constructions for pre-Magx games has been fixed.
  • Items contained in worn objects are now also considered to be worn.
  • Short description used instead of adjective-noun for nested inventory items. [Metcalf]
  • Fixed problem with empty filenames in get_user_file.
  • $ strings no longer forced to lower case before substitution.
  • 32-bit DOS version now supports graphics and fonts.
  • 'strptr' changed to 'ss_end', to conform to ANSI C namespace requirements.
Changes for Version 0.9.1
  • Fixed reading of Master's Edition games, which was broken by the roomflag changes in 0.9.
Changes for Version 0.9
  • ALL now ignores the contents of objects that are already selected.
  • Fixed RoomFlag handling for more than 16 roomflags; reduced the official limit on number of roomflags to 31. [Mlinar]
  • KillPlayer now ends metacommand execution. [Jay]
  • DescribeThing <room> now works correctly. [Tarkin]
  • Disambiguation of GET fixed to deal with containers. [Turpin]
  • Fixed conflict between autoexec verbs and AFTER. [Turpin]
  • Fixed reading in of answers from large AGX files. [Myrow]
  • Typographical fixes: pronoun references in v_attack() error messages and the spelling of resurrection.
  • Dissassember changes: top-of-stack and indirect references fixed; newlines after OnFailGoto corrected; debug settings in AGTOUT fixed.
Changes for Version 0.8.9
  • DOS binary recompiled with correct source files.
  • Fixed AGX incompatibility problem with pre-0.8.8 interpreters. Standard AGX version raised to 2.
  • Fixed large save-file support: DOS version can now handle save files up to 64K and there is a (theoretical) upper limit of 2GB for appropriate platforms.
  • Fixed reading of AGX files with no descriptions.
Changes for Version 0.8.8
  • Added REPLAY FAST command and fast_replay flag.
  • Room descriptions are now printed out after ressurection. [Jay]
  • The debugger now splits noun attributes across three columns.
  • Added support for user defined object flags and properties, including new metacommand tokens ObjFlagOn, ObjFlagOff, TurnObjFlagOn, TurnObjFlagOff, ToggleObjFlag, PushObjProp, and PopObjProp.
  • Action tokens that only affect the stack no longer force then end of an OR block. (This allows the stack to be used for computations in such a block.)
  • Changed names of IsSet/Set/Clear to AttrOn/TurnAttrOn/TurnAttrOff.
  • Two-argument metacommand tokens now work correctly with NOUN and OBJECT.
  • Two-argument metacommands with a double top-of-stack reference now pops the second argument first.
  • Fixed handling of NOUNInRoom, DescribeThing, and EndDisambig tokens.
  • Fixed 16-bit overflow bug in loadgame(). [Tarkin]
  • DOS DA6 buffering adjusted to fit in 32K.
Changes for Version 0.8.7
  • COLOURS option (as synonym for COLORS) added.
  • Added 50_LINE and BLOCK_CURSOR configuration options to DOS port.
  • Most command line options are now case-insensitive
  • Added support for $FLAG[obj]$, $ON[obj]$, $OPEN[obj]$, $LOCKED[obj]$ [Patch contributed by Mitch Mlinar].
  • New token: HasSeen. (Warning: this is untested.)
  • Pure-stack operations are no longer treated as action tokens for disambiguation purposes.
  • The game stack is now cleared before each major metacommand scan although not before DoSubroutine or RedirectTo initiated scans.
  • Delay no longer divides by two.
  • Corrected handling of RoomNeedsLight.
  • Bugs fixed: direct address with multiple actors of same name, "start==-1" problem in agtread.c, objname handling of missing adjectives, object.c problems with creatureless games, agtout display of non-printable owner-ids, BeforeCommand/AfterCommand handling during disambiguation, premature closing of the description file in agt2agx (giving a "Bad file number" error under DOS), DOS memory allocation error ("Failed Assertion: size>=0" when loading games with 500 or more nouns), and a couple of typos in game messages.
  • Fixed PUSH error message handling and compute_addr diagnostics [Patch submitted by Paul Mikell].
  • Addition of quitflag tests in a few places [Patch contributed by Mitch Mlinar].
Changes for Version 0.8.6
  • Added NAVARROW configuration option to Linux and DOS version, which allows the arrow keys to be used for navigation instead of editing.
  • Added PURE_AFTER configuration option. (This affects whether LOOKs occur before or after AFTER commands.)
  • OncePerTurn now triggers on _last_ object in a list if called from AFTER or COMMAND AFTER block. Furthermore, AfterCommand is now true in a COMMAND AFTER block.
  • Bad operand errors will no longer stop metacommand execution.
  • Added version detection support, including the FORCE_LOAD configuration option to override it.
  • Added string tokens: CompareStrings, StringBefore, StringAfter, StringIsAnswer,, CopyString, UpcaseString, DowncaseString.
  • Added XRedirect metacommand token to allow multiple RedirecTos in an AGATE command structure.
  • Added fixed font formatting code as well as FIXED_FONT configuration option.
  • Filename handling has been completely overhauled. All file I/O now goes through the new file "filename.c". All FILE* references have been replace by "genfile" and all uses of the game name have been replaced by 'file context' elements.
  • Miscellaneous fixes: bold text in the DOS port should now be the right color; use of 'class' and 'new' was eliminated from the source code to avoid conflict with C++; eliminated error message when title file not found; disambiguation now correctly accounts for two-cycle execution; fixed bug in rsort() so it can deal with multiple RedirectTo headers; tweaked concdup(); started adding hint data structures; handling of user strings fixed.
Changes for Version 0.8.5
  • Added DEFAULT_ERRORS configuration option.
  • TALK to a nonexistant object goes to STD 179 instead of 184. [Y23/24]
  • Platform dependent information has been broken off into a seperate include file, config.h, which is #included in agility.h.
  • Changed source code filenames to improve readability: agtread.h-->agility.h; uagt.h-->interp.h; agtdata.c-->gamedata.c; agtdbg.c-->disassemble.c; agttest.c-->agtout.c; rmem.c-->util.c
  • Converted bool to rbool to avoid conflicts with other libraries and systems.
  • Documentation of agt_textcolor() fixed.
  • Fixed 1.83 command sequence and moved Master's Edition AFTER commands after 1.83 after-command group.
  • Added TWO_CYCLE option to turn on the 1.83-style command sequence.
  • Added flagnum and isglobal to nouns and creatures. [YS2]
  • Bugs fixed: unmovable objects and DROP [Y22]; segfault if D$$ file not present; buffer sizing in buffopen() and buffreopen; DOS titlebox colors.
  • Fixed $turn$ message.
  • Added range checking to the debugger.
Changes for Version 0.8.4
  • Corrected AGT 1.5/P to AGT 1.6.
  • Added BIOS option to DOS port.
  • Added EndDisambig token.
  • Made UNMOVABLE nouns undropable/unremovable. [YS1]
  • Fixed error messages for THROW, TALK, and REMOVE [Y19,20,21]
  • Bugs fixed: actor metacommands not scanned correctly; spurious "Preposition needs object" message [Y18]; TURN ON/OFF not parsed correctly; ToggleMovable broken; yank segfault under Linux.
  • Eliminated spurious "preposition needs object" message. [Y18]
  • DOS port: Turned off common subexpression elimination in compiler to fix PORK "climb tree" bug.
Changes for Version 0.8.3
  • Added CHECK_GRAMMAR configuration option.
  • DOS output now goes through BIOS calls.
  • File routines now chop AGX, D$$, and DA1 extensions off before adding another extension.
  • SHOW without an object now converted to SHOW EXITS. [Y12]
  • LOOK <object> converted into EXAMINE (unless the game has a metacommand overriding LOOK <object>). [Y16]
  • Global noun handling fixed: EXAMINING one now gives a sensible message and $adjective$ handling has been fixed to deal with them. [Y10&11]
  • SHOOT will now treat a lone object as the target if it is not shootable. [Y6]
  • Eliminated internal error caused by "TALK" with no object. [Y7]
  • Trace output now prints out metacommand adjective match fields.
  • Redirection turns off checking for excess objects under certain conditions. [Y4/17]
  • The tokensier uses context is used to determine whether '.' should be treated as a letter or as puncutation.
  • Added support for <none> fields in metacommand header distinct from ANY fields. (Untested)
  • Fixed restoring of noun.position.
Changes for Version 0.8.2
  • Fixed Room debugging fields
  • Added $you're$ and rewrote some of the error messages to take advantage of it.
  • Fixed enter and exit messages.
  • Tweaked display of contents of invisible items.
  • Support for new tokens: Equal, GT, LT, GE, LE, Goto, OnFailGoto.
  • Parser now recognizes roomflag nouns even when they aren't present.
  • Fixed verb redirection bug.
  • Rewrote run_metacommand.
  • Rewrote visibility checking routines to handle roomflags and other virtual objects more carefully.
  • Fixed bug in check_obj.
Changes for Version 0.8.1
  • Error message for unparsable noun has been made clearer.
  • GO <direction> will not be condensed to <direction> if GO has been overridden.
  • LOOK now generates <look> action even after DoneWithTurn.
  • Fixed direction names in ChangePassageway debugging output.
  • Command offsets now printed for non-ME AGX files.
  • Spaces now stripped from end of pre-Magx description lines
  • Added 'unused' field to rooms,nouns,creatures and to agtread.c
  • Added unused checking to score computation and agttest.c
  • Whitespace recognition in AGT files changed to be platform-independent.
  • Fixed read_filerec so it won't read past end-of-block.
  • rrealloc explicitly returns NULL (and frees the original pointer) if passed a size of 0.
Changes for Version 0.8
  • The interpreter can now recognize AGX files that don't end in '.agx'.
  • Added NO_ERROR and IGNORE_SIZE options for the CFG file.
  • The parser accepts ANY, EITHER, BOTH, and ALL as responses to disambiguation queries.
  • The save file format has changed again :-(.
  • Tweaked title-printing routines to use less space when the title is large.
  • Agtout now doesn't print messages for PrintRandomMessage except by request (and then it prints the whole range, not just the actual two arguments).
  • AGTout doesn't print out standard messages unless -m flag is set.
  • Added -o option to agtout.
  • Debugging screens now mark fields that aren't saved/restored.
  • Token tables: added support for new ME/1.0 variant, fixed the 1.83 token translation table, and unified 1.83 and 1.83a (using 1.83a table).
  • Added PATH option to Linux and DOS ports.
  • Illustrations are now listed inroom description.
  • Linux and DOS ports now support graphics, fonts and function keys.
  • For Unix, DOS, and similar systems, RESTORE will list existing save files.
  • Linux allows script and log output to be piped.
  • Added ^P,^N,^B,^F to Linux/DOS line editor
  • Test mode (option -t) for automated testing of games has been added, resulting in a new variable test_mode and more careful control of calls to agt_readkey().
  • Added infrastructure for PATH support (gamepath).
  • Moved gamename argument from init_interface to start_interface.
  • Added set_file_context() and related code.
  • DESCR_BUFFSIZE now controls buffering of description text for AGX format games; AGT games are partially supported.
  • New language features: direction-triggered verbs, game-defined multiple-word verbs, game-defined prepositions, and classes.
  • New tokens, for manipulating CLASS and the expression stack, accessing arbitrary properties and attributes, and checking player input for numbers.
  • DoSubroutine now uses an explicit stack.
  • POINTS added to save file.
  • SPECIAL descriptions now correctly printed by agtout.
  • "Scanning..." messages now use verb synonym for dummy verbs.
  • The debugger adds newlines after some metacommand tokens (those that print out messages).
  • Changed ressurection smoke to dark green :-).
  • Objects whose contents are all INVISIBLE won't print "Which contains:"
  • Fixed $adjective$ and $noun$ substitution to avoid double-words (e.g. 'silver silver').
  • Overhaul of built in verbs: can no longer lock open objects; v_throw() has been rewritten to handle liquids correctly; the error messages map more closely to the original AGT messages, including two different messages for darkness; weight and size have been completely rewritten to be bug-compatible with the different AGT versions.
  • Handling of DOOR in parser and built-in verbs has been reworked; it now has a lower disambig priority than any real object it the game and Magx games no longer recognize it at all.
  • Metacommand scanning is now bug-compatible with the original interpreters; metacommands are no longer sorted at all.
  • $object$, $noun$ objects now work with $name$ as well in redirect.
  • Redirection no longer changes the *real* actor. (unless a $-form is used, of course).
  • Eliminated ignore_grammer
  • $verb$ will now refer to last real verb rather than "g".
  • Changed verb_id() so built-in synonyms are checked before room synonyms (although only if there is no author-defined synonym).
  • noun[].pict, noun[].related_names, and creature[].pict are all now initialized for pre-Master's Edition games.
  • Bugs fixed: NOUN/OBJECT arguments with 2-arg opcodes work; COLORS check at beginning of title now case-insensitive; AGX titles now work with slash_bold; Statusmode 4 does what it's supposed to; eliminated format_string() 200-character limit; counters now printed out correctly; TurnOnCounter now sets counter to 1; capitalization of $...$ forms with '_' fixed; FailMessage works corerctly.
  • EVERYBODY now has limited support.
  • Tweaked DOS color support.
  • DOS doesn't create status line window until after the title is printed.
  • Code reorganizations: removed FAR; moved some global variable intialization to agtdata.c; converted \E to \033 in os_linux.c to silence warning messages about non-ANSI escape sequences; reorganized os_linux.c for better readability.
Changes for Version 0.7.2
  • Fixed bug in AGX file code; upped AGX file version number.
  • Added #include <errno.h> to rmem.c and interface.c
  • Fix Sun support and added Next support.
  • Reorganized file name routines and added PREFIX_EXT option.
Changes for Version 0.7.1
  • Saving of counters/flags/variables and incrementing of counters now correctly includes the last one in each group.
  • Bugs fixed: memory overrun in ask_for_number() fixed, initialization of flag/variable/counter debugging pointers now done correctly.
  • Linux port: Eliminated extra MOREs.
Changes for Version 0.7
  • The DOS and Linux versions now support command history.
  • The built-in getfile() has default filenames.
  • The parser uses the exitance of an ALL metacommand to determine if a given verb should accept multiple objects.
  • Whenever possible, errors are reported using the words the player typed in.
  • Configuration option NO_OBJECT_NOTES has been added.
  • Noun field RELATED_NAME is supported.
  • The disambiguator has been rewritten (yet again): disambiguation is now done using a scored system (rather than the previous pass-fail approach); it will arbitrarily pick in the case of two or more 'identical' objects; actor disambiguation has been fixed; visibile scope is no longer assumed for dummy_verbs; a GLOBAL_SCOPE verb option has been added to allow game authors to define verbs that act on non-visible objects.
  • Added support for multiple commands to NPCs.
  • Support for new metacommands: OnDisambig, IsHostile, HostilePresent, NameWasPresent, OncePerTurn, SubtractFromTime, SetDisambigPriority, SetVariableToDeltaTime, ChangeStatus, MultiplyVariable, DivideVariable, ComputeRemainder, WaitForKey, SetHE, SetSHE, SetIT, SetTHEY, PrintMessagesNoNL, StandardMessage, FailMessage, FailStdMessage, ErrMessage, ErrStdMessage, and AND.
  • Added adjective support to the metacommand scanner.
  • Assigned standard message numbers to error messages that weren't supported by the original AGT.
  • Added support for generalized operand types and NAME.
  • Added color code 9 for 'true' white.
  • New #define added: OPEN_AS_TEXT.
  • Changed AGX writing code to avoid seeks beyond end of file.
  • Created auxfile.c, moving code out of agtread.c and agtdata.c
  • If EndGame is run after a 'q' command has been entered, the game will quit without asking questions.
  • A couple of bugs in the tokeniser have been fixed.
  • Miscellaneous bugs fixed: noun initial descriptions print at the correct times; SendTreasureToRoom and IsCarryingTreasure, THROW/AFTER synonyms, BLOCK_HOSTILE, and noun.position are fixed; SHOW prints a more reasonable default error message; fixed the error message printed when ALL doesn't refer to anything; sorting of actor metacommands is now correct.
  • Reorganized command line argument parsing routine
Changes for Version 0.6
  • Added support for Klaustrophbia's multiple game files and save files from previous versions of the same game.
  • Added INTRO verb to reprint the introduction of the game.
  • The introduction will now wait for you to hit any key before continuing.
  • Pronouns are now assigned to the last direct object in preference to the last indirect object.
  • agt_save(), agt_restore(), agt_newgame(), and agt_quit() added for use by event-driven ports.
  • For DOS and Linux: Title box formatting changed slightly, and COMPASS option added.
  • Line is no longer wrapped if the remainder consists only of spaces.
  • SHOOT now works.
  • Eliminated redundant (being worn) message.
  • Scope checks for built-in verbs have been centralized.
  • agtread.h now defaults to PLAIN platform.
  • Cleaned up header files.
  • SAVE now uses the last UNDO block which saves memory and allows asyncronous saves.
  • Other bugs fixed: the ordering of agildebug menu, the scoring of nouns and creatures, and processing of $your$.
Changes for Version 0.5
  • Added support for new "AGX" file format, in agxfile.c; a new set of file manipulation routines have been added to rmem.c to support the format. There is a new pAGX #define for the extension of the new format.
  • Save and restore were rewritten to use the same file I/O code as the AGX routines; savefmt.h no longer exists. This seems to have fixed the bug with RESTART and UNDO overwriting the dictionary under DOS.
  • Save, restore, script, and log files now add an extension automatically.
  • Both the interpreter and agttest.c have been modified slightly to work with the new file format and a new program, agt2agx, has been added to convert AGT files to the AGX format.
  • To support the new format, the TTL and INS routines in agil.c have been rewritten.
  • The interpreter now waits until there is something on the status line before printing it out.
  • Extensions to the debugger: roomflags now can be viewed and modified; so can the gender field of creatures and user strings; formatting of output has been improved(thanks to Jay Goemmer's suggestions); main debugging menu reorganized; can now turn tracing of disambiguaion and of ANY verbs off; metacommand trace now prints out actors and REDIR instead of cryptic numbers to represent the first field of the command header.
  • dbg_nomsg added so messages will only be printed once when tracing metacommands rather than twice.
  • The function init_interface() has been replace by two functions, init_interface() and start_interface();
  • Split exec.c into exec.c and object.c
  • Added a new file, agilstub.c, which needs to be linked with the non-interpreter utilities.
  • File read/write routines now do more comprehensive error checking.
  • AMIGA and HP-UX configurations have been added to the header (thanks to David Kinder and Alexander Lehmann)
  • Boxes under the DOS interface are now in reverse video.
  • Fixed reading of CFG file so SLASH_BOLD would work.
  • All agtread output now goes through rprintf and from there through writestr and writeln. DIAG now defaults to 0 so there should be less output to begin with.
  • Added fix_ascii_flag and IBM_CHAR option which allow the decision about character translation to be made at run time.
  • Made a lot more limits dynamically set, including the number flags, variables, counters, dummy verbs, and subroutines;
  • LookAtRoom now prints the room description directly, rather than waiting until the end of the turn.
  • Object lists are now sorted by object number, so they will maintain a consistent ordering.
  • Changed handling of REPLACE_WORD so it will also replace synonyms.
  • Line break section of writestr() rewritten to fix a couple of bugs and os_dos.c has been fixed to get rid of extra line breaks.
  • The 1.5/F decoding of the DA2 file has been fixed so _The Multi-dimensional Thief_ should now work.
  • Bugs fixed: exits now printed correctly by debugger; a few spelling errors fixed; YesNo and Chance bug; maxpix, maxpict, etc. are now converted to zero if they are negative; UserStrings now numbered from 1..25 rather than 0..24; fixed centering of status line; AFTER commands not scanned after GameEnd token anymore.
  • Eliminated extra newline in Linux script files.
  • Fixed bug in os_linux.c, agt_option(), that caused it to report an error with COLORTERM
  • General cleaning up of the code: picture/sound/font filenames are now stored in the main static string array; several redundant variables eliminated; read_descr() rewritten to work with new file format; eliminated distinction between regular and auxilary verbs; added get_opdef();
  • Moved most of the purity flags from uagt.h/agil.c to agtread.h/agtdata.c, so they would be visible to agxfile.c.
  • ReDirect now marked by a flip in sign instead of adding 2000; ANYBODY has been moved to 2 from 123; and <no actor> is now represented by 1 instead of 0 (so it can be negated).
  • Replace fixchar() and IBM character set translations by a look-up table to speed up reading of descriptions.
  • Tweaked room description printing so SPECIALS that send you to the same room don't cause the room description to be printed out again.
  • For Master's Edition games, now set have_meta flag based on last_cmd rather than on the value in the DA1 file (which is always true for ME games even if there are no metacommands).
  • Made several int data type more specific and made sure they were consistent with the corresponding save/restore/AGX file types.
  • Rewrote readnum() in agtread.c
  • Moved dictionary diagnostic stuff into a separate routine, which we can call from agttest.
Changes for Version 0.4
  • Added intelligent disambiguation and ALL expansion.
  • Added simple object viewers/editors to debugging system
  • The parser now converts SHOOT x AT y into SHOOT y WITH x
  • The parser now handles TELL <actor> TO <verb> ... correctly.
  • NO_BLOCK_HOSTILE and GET_HOSTILE are now supported.
  • Added SOUND ON, SOUND OFF, INSTRUCTIONS (or INS)
  • Prompt is now bold as well as input text.
  • Added synonyms: 'inv' as synonym for 'inventory'; 'in' and 'inside' as synonyms for 'enter'
  • Classic version 1.0 is now supported as is the version used by Cosmoserve 97, and the 1.5 variants used by Hotel Notell and The Multidimensional Thief.
  • The status line is now updated every time the player's location changes.
  • Version 1.83 now properly recognized even if there are no creatures.
  • Titles in v1.83 are no longer automatically centered (to conform with the original interpreter).
  • Split metacommand.c into metacommand.c and token.c
  • The contents of variables are now type-checked; fixed type output in agtdbg.c to accomadate the new variable format.
  • Interpreter now computes maximum score itself if value in .DA1 file is 0.
  • Fixed timing of "Creature is getting angrier" message
  • Fixed color/bold code in Linux.
  • Bold/color settings are now reset to normal after each description block.
  • For Master's Edition games, the 'door' virtual object is now given a lower disambiguation priority than non-present objects.
  • Instructions now pass through IBM character decoding
  • Formating characters now stripped from status line.
  • Code reorganizations: metacommands are now sorted by verb to speed up processing; reorganized dict data structures to be more compact; put in additonal error checking in check_lastcmd(); broke up exec_token() into exec_token(), exec_cond(), and exec_action().
  • Fixed bugs: title centering detection fixed; GetNumberInput's argument list fixed; NamePresent and ANYBODY commands have been corrected; DescribeThing is now able to describe rooms; SetVariableTime now normalizes its data type; PlayerHas; 1.83 verb list was off; there was an extra "the" in the AGT info entry.
Changes for Version 0.3
  • Instructions and an information screen can be viewed.
  • The title is now centered.
  • Added debugging features.
  • 'it' refers to plural as well as singular antecedents.
  • SOGGY credits are printed out
  • Added IRUN support (-1 command line option)
  • AGiliTy can now understand the variant 1.5 versions.
  • Added LOG and REPLAY
  • Changed script output to append instead of replace existing files.
  • Added support for menu-driven input.
  • Added global and game-specific configuration files (.CFG)
  • Shrunk save files again.
  • Getfile now asks before overwriting.
  • Added pINS, pVOC, pOPT, pHNT
  • Removed the last call to stat() from core code.
  • Moved file_size() to rmem.c
  • Split parser.c into parser.c and agil.c and reorganized initialization.
  • Added version and port strings
  • Rewrote DA6 reading code to work with only partial buffers.
  • Rewrote the type checking system to be more precise
  • DEBUG_AGT_CMD is now equivelent to flag[0].
  • rmalloc, rrealloc trap errors if too large a block is requested (determined by MAXSTRUCT).
  • Rewrote color code to avoid collision of color tokens with '\t' and remapped the 1.83 '\' bold character.
  • Moved terminal tokens up to code 2000, to make it easier to add new tokens.
  • Code reorganization: moved concdup() from agtdata.c to rmem.c, making it public; reorganized file code in agtread.c and rmem.c; removed underline translator in tokeniser; rewrote fix_cmd; reorganized memory allocation in agtread.c to reduce fragmentation; added 'static' to a lot of declarations and reduced external linkage requirement to 8 characters; rfree macro rewritten; word lists("slists") now stored dynamically; opcode name list uses pointers instead of fixed length arrays.
  • Fixed various bugs: various problems with PUT IN; ME/1.0 pictures, fonts,songs, and user strings ignored; cosmetic errors in print_contents; dictionary search case senstitive; various problems with INVISIBLE; 1.83 games crashed; ANYBODY not properly matched.
Changes for Version 0.2
  • The save file format has shrunk.
  • Fixed print_title() to do IBM character translation for the title file.
  • RESTORE now verifies that save files are from the correct game.
  • Added support for version 1.18 games.
  • Metacommand debugging information now goes throught the standard screen output routines.
  • The interpreter now loads the game faster due to file buffering and a hash table for search_dict().
  • When program finds a lot of bad tokens it no longer floods the screen with warning messages
  • OR metacommand tokens are now handled consitently with the original interpreters.
  • Reorganized exec.c into three files: exec.c, runverb.c, and metacommand.c and a header exec.h
  • DEBUG_OUT is now defined in uagt.h.
  • Completed internal support for fonts, music, and graphics. Of course these still require a port actually capable of using of this.
  • Rewrote file size functions to be more portable; eliminated NO_FILESIZE and REPLACE_FILESIZE
  • Added FAST_SETSIGN, using macros to speed this up on compatible systems.
  • Got rid of HUGE #defines; any individual data structure now fits in 64k
  • Changed print_obj() to not print out an object's short description if it starts with INVISIBLE even if it contains other words.
  • Changed MEM_MARGIN to 16k which should prevent the interpreter from starting up without enough memory and then dying mid-game.
  • Changed the way noun.position is handled to reduce the size of save files.
  • Cleaned up DA1 reading routines in agtread.c and aver encoding.
  • 'long int' and 'short int' changed to 'long' and 'short' to allow #define int short int (for debugging purposes)
  • Cleaned up BRIEF and VERBOSE messages.
  • it_sdesc converted into a function
  • The code for reading DA6 files should now be endian independent.
  • Descriptions with '$' symbols now print correctly.
  • r?alloc calls with size zero are now handled correctly and rmem_trap is now correctly set.
  • Several memory leaks have been fixed.
  • Several other minor bugs have been fixed.
Version 0.1
  • First public release


This Windows port of AGiliTy

This Windows port of AGiliTy was written by David Kinder.
Web: http://www.davidkinder.co.uk/
Email: davidk@davidkinder.co.uk

The original author, Robert Masenten, has not been heard from in years, but David Kinder has done some work on updating AGiliTy to fix bugs. Any bugs you find can be reported at David's GitHub page for AGiliTy:
https://github.com/DavidKinder/Windows-AGiliTy/

AGiliTy supports input line editing and history to make typing more convenient. All the common editing keys work as you would expect. Cursor up and cursor down step up and down through the input history, respectively. Text can be pasted into the input line using the standard paste keys (i.e. Ctrl+v or Shift+Insert).

This Windows port of the AGiliTy Interpreter behaves as you would expect of a Windows program: to operate use either the menus or the toolbar. The only section requiring explanation is the Options dialog. The settings available in this dialog are:

Fix window at 80 columns | If this option is set, then whenever a new game is loaded AGiliTy will attempt to resize the window so that the display is exactly 80 columns across. Some games require this for their text to appear correctly.
Enable colours | If this is set, then the colours are taken from the four colour well gadgets immediately below. If it is not set, the standard Windows fore and background colours are used.


.topic 1
If this option is set, then whenever a new game is loaded AGiliTy will attempt to resize the window so that the display is exactly 80 columns across. Some games require this for their text to appear correctly.
.topic 2
If this is set, then the colours are taken from the four colour well gadgets immediately below. If it is not set, the standard Windows fore and background colours are used.
.topic 3
Clicking on this button opens a colour dialog to set the text colour of the main interpreter window.
.topic 4
Clicking on this button opens a colour dialog to set the emphasis colour of the main interpreter window.
.topic 5
Clicking on this button opens a colour dialog to set the background colour of the main interpreter window.
.topic 6
Clicking on this button opens a colour dialog to set the status bar colour of the main interpreter window.