Debug Modes

From AGI Wiki
Jump to navigationJump to search

Partially based on the On-Line Debug Mode FAQ by HWM

 


Introduction

This debug mode is solely script related. A debug script is located directly in the game logic itself, not in the interpreter (although the interpreter of course offers the commands to use in the script). If a game does not have the debug script in its logic, 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 to a debug mode in it, but it's likely removed from the final release. The AGI demo packs and other demonstrations also don't include a debug mode.

AGI1 is an old and uncommon interpreter. The only games using it are the rare first (booter) versions of King's Quest 2 and The Black Cauldron. However, the AGI1 games do have a debug mode, so they're included here. Donald Duck's Playground is also a booter game, but in many aspects more like AGI2, including the version number given by Sierra (v2.001), so it's listed under AGI2. The first release of King's Quest 1 is sometimes listed as AGI0, but technically this more a container category for the first versions of the first release of King's Quest, not really one interpreter.

AGI2 and AGI3 have few differences and have similar debug functions. Debug-wise the only major difference is that AGI3 does not contain the trace-function. AGI3 games are Gold Rush!, King's Quest 4 AGI, the Manhunter series and a certain version (v2.10) of The Black Cauldron. Some demos also use AGI3. The rest of the games use AGI2.

 

Activating Debug Modes

Most AGI games still have the debug code that developers used while the games were being developed. Most of the games activate their debug modes by pushing the [ALT-D] key combination. The other games use a "magic phrase" to enter the debug mode. Once activated, here are commands that can be used.

 

Activating AGI1 Debug Modes

In King's Quest 2, the debug mode is activated by entering "FAST SPEAK" at the command line. It will be activated on room change. In The Black Cauldron, the debug mode is activated by pressing [ALT + D]. This would eventually become the standard way of activation. The debug mode will be deactivated on room change. Also, activating the debug mode multiple times will generate multiple input/output lines!

Game Debug Phrase
King's Quest II "fast speak" (activated on room change)
The Black Cauldron Alt+D

 

Activating AGI2/AGI3 Debug Modes

Of all the AGI games, it is unknown whether the KQ4AGI 256K version, Manhunter 1, Manhunter 2 and Mixed-Up Mother Goose have a debug mode or not. KQ4 will almost certainly have one, while Mixed Up Mother Goose probably doesn't even though its WORDS.TOK file has all the debug words contained in it. MH2 has some kind of debug mode which allows you to teleport and change variable values because there are text messages in the first LOGIC file along these lines. MH1 probably has the same debug mode.

Again, the debug mode is usually activated by pressing [ALT + D]. However, there are some alternative ways/exceptions with some games. These games require a certain sentence to be typed in; perhaps this was done to access the debug mode on other platforms, without redefining keys in the code. The games and their sentences are:

Game Debug Phrase
Gold Rush! "bird boy" or "bird man"
King's Quest 1 Alt+D
King's Quest II "fast speak" or Alt+D
King's Quest III "rats ass" (v2.14) or Alt+D
King's Quest IV AGI Alt+D
Leisure Suit Larry 1 Alt+D
Police Quest 1 "stink bug" or "stink bugs" (v2.0G)
Space Quest 1 "backstage" or "dbg"
Space Quest II "dbg" or Alt+D

 

AGI1 Debug Mode Commands

After the debug mode is activated, the following commands are available:

Command Result
TP Teleport (change room/scene/script)
SP Shows position of ego *
SHOW POSITION Shows position of ego *
SHOW PRIORITY Shows priority of ego
SHOW FLAG Shows a given flag (or rather variable)
SET FLAG Sets a given flag (or rather variable)
GET OBJECT Get specified object and added to inventory
QUIT Quit game (originally, but now locks up)

* Does not work with King's Quest 2

 

AGI2/AGI3 Debug Commands

After the debug mode is activated, the following commands are available:

Command Result
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
[SCROLL LOCK] Trace mode*

* Only works with AGI v2

 

Standard AGI Debug Mode Commands

Command Result
TP Teleport to room.
SHOW PRIORITY Displays the current rooms priority bands and control lines.
GET OBJECT Get any inventory item.
GIMME GIMME Get all inventory items.
SHOW FLAG Displays one of the 256 flags.
SET FLAG Set one of the 256 flags.
RESET FLAG Clear one of the 256 flags.
SHOW VAR Displays one of the 256 variables.
SET VAR Change the value of one of the 256 variables.
POSITION Change egos position.
SHOW POSITION Show egos current screen coordinates.
OBJECT NUMBER Displays list of all the objects and their object numbers.
OBJECT ROOM Displays which room an object is found in.
ROOM Displays room number.
SET PRIORITY et the priority of ego.
RELEASE PRIORITY Release the last priority that ego was set to.

 

AGI Game Specific Debug Modes

Of all the AGI games, it is unknown whether the KQ4 256K version, MH1, MH2 and Mixed Up Mother Goose have a debug mode or not. KQ4 will almost certainly have one, while MUMG probably doesn't even though its words.tok file has all the debug words contained in it. Manhunter 2 has some kind of debug mode which allows you to teleport and change variable values because there are text messages in the first LOGIC file along these lines. Manhunter: New York probably has the same debug mode.

To access the debug mode in King's Quest I-III (in the newer versions of the game most of the debugging options won't work) while playing press Alt+D. Two information boxes will appear. Press Enter to get rid of them. Enter the right command to enter debug mode.

Game Command
Gold Rush type "bird man".
Kings Quest I Alt+D and Enter twice
Kings Quest II Alt+D and Enter twice
Kings Quest III type "rats ass" or Alt+D
Kings Quest IV AGI Alt+D and Enter twice
Leisure Suit Larry 1 Alt+D and Enter twice
Police Quest 1 type "stink bug".
Space Quest 1 type "backstage" or "dbg".
Space Quest 2 Alt+D and Enter twice

 

AGI Game Specific Debug Commands

 

King's Quest III

Here are a few interesting tricks to help you deal with that intolerable wizard in debug mode (). Type:

Command Result
enchanter status Were wizard is, when he'll return, etc.
do chore To have your task done for you.
sleep enchanter To put him to sleep.
bye bye enchanter To kill him.

 

King's Quest 4 AGI

While playing, press Alt+D. Two information boxes will appear. Press enter to get rid of them (in the newer versions of the games though, most of the debugging options won't work).

Command Result
TP Teleport to room.*

* For a list of room numbers for KQ4, see the King's Quest IV Room Maps.

 

Leisure Suit Larry 1

Press ALT+D and press enter twice to enable Debug Mode.

Command Result
TP (room #*) Teleport to specified room.
OBJECT NUMBER Show a list of items and numbers
GET OBJECT (item #) To get specified object
GIMME GIMME Obtain all objects
OBJECT ROOM (object #) Shows room where an item is
ROOM NUMBER X/Y Coordinates and current room number
SHOW VAR or SV Display value of variable
SET VAR or CHANGE VAR Change value of variable
SET FLAG or SF Set a flag
VIEW FLAG or SHOW FLAG See flags
RESET FLAG Reset a flag
ALT+M Display heap size
ALT+I or SP (object #) Shows information about screen objects
ALT+V or PRIORITY Displays priority screen

 

Space Quest I-II

Command Result
tester Displays Rogers screen coordinates.