AGI/Debug Modes

From ScummVM :: Wiki
Revision as of 20:24, 14 December 2011 by OmerMor (talk | contribs) (Initial FAQ Import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Sierra On-Line Debug Mode FAQ
Version 0.93 [14-Jan-06] by HWM [hwmol@hotmail]
Thanks to Omer Mor, Lars Skovlund & Kelmer for their valuable information.

( [2] Intro )

This FAQ will explain the several debug modes found in Sierra On-Line
AGI adventure games.
Before you read, keep in mind the following things:
- References to "ego" mean "the main character" or the object you control.
- Any brackets, asterisks or quotation marks should NOT be typed in. They're
  only used to clarify.
- Anything between brackets means it's either a key or a combination of
  keys. So:
  [CTRL + D] means you push the CONTROL-key and the D-key AT THE SAME TIME.
- Between quotation marks means it should be typed in.
- Words between asterisks should be replaced with a proper word/object/thing.
  "PITCH *object name*" means you should type the object you want to get,
  e.g. "PITCH WIG".
And while you might know, Sierra games use an "interpreter". This basically
is a program/system which translates the program statements (in byte-code)
into executable machine code one line at a time as the program is running;
as opposed to a compiler, which translates the entire program before the
program is executed. The different interpreters used by Sierra for their
games are described in the next chapter.
This FAQ only covers the debug modes of IBM PC versions, however, some of
them might work on the other systems too.

( [2.1] AGI )

AGI (Adventure Game Interpreter)
Video: 160x200 resolution, 16 colors (2 or 4 colors on some platforms)
Audio: Up to 4 channels of audio (if platform supports it)
Platform: IBM PC (including PCjr & TANDY), Commodore AMIGA, Atari ST,
          Apple ][(GS), Apple Macintosh & Coco 3 (TRS-80 Color)
Period: 1984-1989
Games using the AGI interpreter:
Donald Duck's Playground
Gold Rush!
King's Quest 1: Quest for the Crown
King's Quest 2: Romancing the Throne
King's Quest 3: To Heir is Human
King's Quest 4: The Perils of Rosella
Leisure Suit Larry in the Land of the Lounge Lizards
Manhunter 1: New York
Manhunter 2: San Francisco
Mixed-Up Mother Goose
Police Quest 1: In Pursuit of the Death Angel
Space Quest 1: The Sarien Encounter
Space Quest 2: Vohaul's revenge
The Black Cauldron

( [3] Debug mode in AGI games )

This debug mode is solely script related, which means that a debug script is
located directly in the game code itself, not in the interpreter's (although
the interpreter of course offers the commands to use in the script). So if a
game does not have the debug script in it's code, it will not work. However,
pretty much all the games have a debug mode, except for Mixed-Up Mother Goose
and the Manhunter series. The latter does have some unused messages relating
a debug mode in it, but it's likely removed from the final release. The demo
packs and other demonstrations also don't include a debug mode.
There are four major versions of AGI. AGIv0, AGIv1, AGIv2 and surprisingly,
AGIv0/AGIv1 are old and uncommon interpreters with no known debug mode. The
only games using them are the self-booting first versions of King's Quest 1 &
2 and The Black Cauldron, which are rare and hardly used nowadays. Donald
Duck's Playground uses a hybrid between AGIv1 and AGIv2, it does include a
debug mode.
AGIv2 and AGIv3 are pretty alike and so are their debug functions. Debug-wise
the only major difference is that AGIv3 does not contain the trace-function.
AGIv3 games are Gold Rush!, King's Quest 4 (AGI version), the ManHunter
series and a certain version of The Black Cauldron. The rest of the games use

( [3.1] Script Debugger )

Usually, the debug mode is activated by pressing [ALT + D]. However, there
are some alternative ways/exceptions with some games. These games require a
certain sentence typed in, perhaps to access the debug mode on other
platforms. They are the following:
Gold Rush!      -  BIRD BOY
King's Quest 2  -  FAST SPEAK
King's Quest 3  -  RATS ASS (only in v2.14)
Police Quest 1  -  STINK BUGS (only in v2.0G)
Space Quest 2   -  DBG
After the debug mode is activated, the following options are available, by
TP             -  Teleport (change room/scene/script)
POSITION       -  Shows position of ego
SHOW VARIABLE  -  Shows value of a given variable
SET VARIABLE   -  Sets value of a given variable
SHOW FLAG      -  Shows a given flag (if set or not set)
SET FLAG       -  Sets a given flag
RESET FLAG     -  Resets a given flag
GET OBJECT     -  Get a given object added to inventory
Or by pushing:
[SCROLL LOCK]	-  Trace mode (only works with AGI v2)
These commands will work in all the AGI games with a debug mode. However some
games have additional commands for use with the debug mode. The next chapters
will cover them.

( [3.1.1] Game Specific: Al Lowe games )

Games programmed by Al Lowe: Leisure Suit Larry, The Black Cauldron, Police
Quest, King's Quest 3 and King's Quest 4. Donald Duck's Playground is also
programmed by Al, but does not support these debug commands. When certain
commands will only apply to a specific game, that game's abbreviation is
given between brackets.
GIMME GIMME	   -  All objects get added to inventory
OBJECT ROOM       -  Shows in which room certain object is located
OBJECT NUMBER     -  Shows list of objects in game (PQ & LSL)
OBJECT            -  Gives information on objects on screen (PQ & KQ4)
SHOW OBJECT       -  Gives information on objects on screen (BC)
EXAMINE POSITION  -  Shows coordinates of ego (LSL)
ROOM              -  Shows coordinates of ego (PQ & KQ4)
FIND              -  Shows position of ego (LSL)
[ALT + P]         -  Shows priority screen *
[ALT + M]         -  Shows available memory *
[ALT + I]         -  Gives information on objects on screen
[ALT + E]         -  Shows position of ego
[ALT + X]         -  Shows coordinates of ego (PQ & KQ4)
[ALT + D]         -  Exits debug mode (BC)
* King's Quest 3 has several versions and with some this command won't work,
  or will use different keys like F6 or F10 (e.g. v1.01)

( [3.1.2] Game Specific: Priority commands )

Games that use priority commands: Space Quest 1, Police Quest 1, Gold Rush!,
Leisure Suit Larry, The Black Cauldron, Donald Duck's Playground & King's
Quest 4.
SHOW PRIORITY     -  Shows priority screen
SET PRIORITY      -  Sets priority *
RELEASE PRIORITY  -  Returns to normal visual screen
* Does not work with King's Quest 3 and Donald Duck's Playground

( [3.1.3] Game Specific: Space Quest series )

General commands:
OBJECT         -  Gives information on objects on screen
SHOW MEMORY    -  Shows available memory
SHOW PRIORITY  -  Shows priority screen
Space Quest 1 includes a bunch of extra commands:
CASH            -  Change amount of money
DRINK CLOTHES   -  Changes ego to normal outfit
BE ALIEN        -  Changes ego to alien outfit
DRINK JET PACK  -  Changes ego to wear jetpack
NO HELMET       -  Changes ego to alien (without helmet)

( [3.1.4] Game Specific: King's Quest series & Gold Rush! )

General commands:
OBJECT            -  Gives information on objects on screen (except KQ3)
CHECK OUT FLAG    -  Shows certain status information (KQ2)
EXAMINE OBJECT    -  Gives information on objects on screen (KQ3)
EXAMINE POSITION  -  Shows coordinates of ego (KQ3)
FIND              -  Shows position of ego (KQ3)
ROOM NUMBER       -  Shows room number (KQ3/GR)
SHOW POSITION     -  Shows coordinates of ego (GR)
SHOW MEM          -  Shows available memory (GR)
SHOW OBJECT       -  Gives information on objects on screen (GR)
[F6]              -  Shows priority screen (KQ1/KQ3 v1.01)
[F8]              -  Shows priority screen (KQ2)
[F10]             -  Shows available memory (KQ1/KQ2/KQ3)
[ALT + S]         -  Gives information on objects on screen (GR)
King's Quest 3 has a more extensive debug mode:
SLEEP WIZARD      -  Wizard goes to sleep
HERE WIZARD       -  Wizard appears
DO CHORE          -  Chore for wizard completed
BYE BYE WIZARD    -  Kills wizard
PUT UP SPELL      -  Gives all inventory items
PUT UP MOUNTAIN   -  Changes game state to arrival at the kingdom of Daventry
PUT UP BOAT       -  Changes game state to the beginning of the sailing trip
GIMME SPELL       -  Gives all magical items
WIZARD STATUS     -  Gives a detailed status of the wizard
King's Quest 4:
CREATE DAY        -  Turns the game into day
CREATE DARK       -  Turns the game into night
TIME              -  Gives in-game time
TRACE             -  Trace mode (originally, but does not work)