Patch:Computer Wrist

From KeenWiki
Jump to: navigation, search

The Computer Wrist in Keen 4 and 5 is the help section, accessed by pressing F1 during gameplay or at the Main Menu. It consists of a main screen that allows Keen to read a number of sections. The format and function of the 'subsections' are identical, with only content varying, while the main screen is separate. As such this page will be divided into three sections; the first will deal with the Computer Wrist in general, the second with the main screen and the third with the remaining screens.


Computer Wrist in general

Patches in this section of the page affect the Computer Wrist in general; how it is bought up and how it behaves when it is.


What key brings up the Computer Wrist

For Keen 4 and 5 it is possible to change the key that brings up the Computer Wrist. The values are scancodes. Setting this to $00 will totally disable the Computer Wrist, or the patches in the section below can be used. Note that since the game has different key response codes for various things, to completely disable the Computer Wrist requires the use of several patches.

The Computer Wrist cannot by used during the ending sequence, title screen, paddle war, demos or story sequence. Instead these will end (or must be ended) before the Computer Wrist can be used.

Patch: Keen 4
#Scancodes for F1 help
%patch $3F08 $3B
#Unknown, initiation screen?
%patch $51AA $3B
#During terminator text
%patch $792F $3B
#In game levels
%patch $1CED7 $3B
#In Main Menu

Patch: Keen 5
#Scancodes for F1 help
%patch $3F02 $3B
#Unknown, initiation screen?
%patch $51A4 $3B
#During terminator text
%patch $78EA $3B
#In game levels
%patch $1DE73 $3B
#In Main Menu


Disable Computer Wrist

These patches will cleanly skip the Computer Wrist by bypassing scancodes, a somewhat neater way of doing things than manipulating the above patches. Again, multiple patches may be necessary. For Keen 5 the last patch will completely disable the Computer Wrist under all circumstances.

Patch: Keen 4
#Disable help
%patch $3F09 $EB
#Unknown, initiation screen?
%patch $51AB $EB
#During terminator text
%patch $7930 $EB
#In game levels
%patch $1CED9 $90 $90
#In Main Menu

Patch: Keen 5
#Disable help
%patch $3F09 $EB
#Unknown, initiation screen?
%patch $51A5 $EB
#During terminator text
%patch $78EB $EB
#In game levels
%patch $1DE75 $90 $90
#In Main Menu
#Totally disable help
%patch $EA5D $CB


Graphic chunks used for Computer Wrist documents and number of options

These are the EGAGRAPH chunks used for various Computer Wrist topics. These determine what the player sees when the Computer Wrist topics are selected.

Note that it is possible to include one extra Computer Wrist item in Keen 4 using chunk $1288W which is unused by default.

Patch: Keen 4
#Location of help chunks list
%patch $9BA4 $0716W
#Number of Computer Wrist options - 1
%patch $99CD $04
#If attempting to go higher than this
%patch $99D4 $04
#Set value TO this
#Help section documents
%patch $2F586 $1283W
#Computer Wrist
$1285W
#The game
$1284W
#The story
$1289W
#Order Info
$1286W
#About ID


Music

In Keen 5 music plays in the Computerwrist, however Keen 4 lacks this by default.


Song played in Keen 5

Music plays in the help section. This is not a song reference but a level reference, that is, the same music plays as the level whose value is listed here.

Patch: Keen 5
#Help menu song:
%patch $EABD $0013W


Don't play music in Keen 5

These patches remove music from playing or changing in given situations. For disabling music in a level the best option is to create an 'empty' song with no sound and use that as the level music.

Patch: Keen 5
#No music in help menu:
%patch $EABC $EB $0A


Play music in Keen 4

It is possible to play music in Keen 4 when an option is selected or the Computer Wrist screen exited. This should be handled carefully in order to blend with the rest of the game. The main menu music patch should be used so the song start doesn't seem too abrupt and the song should be switched back to the menu song when help is exited.

The song to be played is in the second line of each patch and works exactly the same as values in Patch:Music. The music will restart when this patch is called, even if the same song is already playing.

Like the menu music patch these patches work by replacing the 'change screen color' patch. However, due to the way the help screen is set up, these screen recolors are never seen and so aren't missed. (Making them visible takes a lot of effort.) The second 'play on exit' patch is superfluous, but included for completion.

Patch: Keen 4
#In help play music when:
%patch $9A76 $06BD20C7RL
#Selecting a help option
%patch $9A72 $0004W
#Play this song
%patch $9A8B $06BD20C7RL
#Exiting help
%patch $9A87 $0004W
#Play this song
%patch $9B8C $06BD20C7RL
#Exiting help 2 (Not really needed)
%patch $9B88 $0004W
#Play this song
%patch $9B5F $06BD20C7RL
#Selecting option AND exiting
%patch $9B5B $0004W
#Play this song


Main Screen

The main screen consists of four images bordering the screen, a large image in the middle of the screen and a cursor that can move up and down to select an option. This can be a bit hard to see by default as everything is colored dark red, seeming to blend together. Patches in this section should only affect this screen and not any screens selected from it.

For patches changing what documents are accessed from here see the above section.


Images used and their position

There are six images used for the help screen, four screen borders, the options image and the cursor. All values refer to graphics chunks, which can be complicated if using ModKeen (Keengraph numbers graphics correctly.) Each image must be stored (Cached) before being displayed and is displayed at specific x,y locations.

Not all images have both x and y location values, if a value is 0 it isn't patchable. The hand needs two location patches, since it is a cursor. These should match.

Patch: Keen 4
#Store images
%patch $990D $0006W
#Help options
%patch $9919 $002DW
#Hand
%patch $9925 $0050W
#Top of help screen
%patch $9931 $0051W
#Left of help screen
%patch $993D $0052W
#Right of help screen
%patch $9949 $0054W
#Bottom of help screen
#Display images
%patch $9955 $0050W
#Top of help screen (At 0,0)
%patch $9965 $0051W
#Left of help screen (At 0,8)
%patch $9969 $0008W
#V location
%patch $9978 $0052W
#Right of help screen (At 312,8)
%patch $997C $0008W
#V location
%patch $9980 $0138W
#H location
%patch $998C $0054W
#Bottom of help screen (At 8, 192)
%patch $9990 $00C0W
#V location
%patch $9994 $0008W
#H location
%patch $99A0 $0006W
#Help options (At 96,8)
%patch $99A4 $0008W
#V location
%patch $99A8 $0060W
#H location
%patch $99D7 $002DW
#Hand (At 48,48)
%patch $99E3 $0030W
#V location 1
%patch $99E7 $0030W
#H location 1
%patch $9A0C $0030W
#V location 2
%patch $9A10 $0030W
#H location 2


Don't display images

These patches simply remove a bitmap image from the screen.

Patch: Keen 4
#Don't display main Computer Wrist bitmaps:
%patch $995C $90 $90 $90 $90 $90
#Top of help screen
%patch $996F $90 $90 $90 $90 $90
#Left of help screen
%patch $9983 $90 $90 $90 $90 $90
#Right of help screen
%patch $9997 $90 $90 $90 $90 $90
#Bottom of help screen
%patch $99AB $90 $90 $90 $90 $90
#Help options
%patch $99EA $90 $90 $90 $90 $90
#Hand


Background color

As mentioned below, while the help section uses many 'change screen color' calls, these have no visible effect on the screen and indeed, it is very hard to make them show.What matters are the 'box draw' colors, which in help color the entire screen. The default screen color is $04, or red, the color behind the help pointer should be the same. There are two different box colors, one for the Computerwrist screen alone and one for both the help and ending sequence pages.

Patch: Keen 4
#Screen color change values (Unseen by default)
%patch $9A72 $0004W %patch $9A87 $0004W %patch $9AB7 $0004W %patch $9B29 $0004W %patch $9B5B $0004W %patch $9B88 $0004W %patch $9C85 $0004W %patch $9DAB $0004W
#Computerwrist screen color: Visible by default)
%patch $98F5 $0004W
#Color dark red used for screen background
%patch $98F9 $00C8W
#200x...
%patch $98FD $0140W
#320...
%patch $99F8 $0004W
#Color used behind help pointer
#Help\Ending pages background color (Visible by default)
%patch $95FB $0004W
#Color dark red used for screen background
%patch $95FF $00C8W
#200x...
%patch $9603 $0140W
#320...


Height of options menu

The help 'menu' is just an image and bears no relation to what option can be selected. If you resize this image you may want to resize the height of each help option. Due to the way the menu is set up there are three values for the 'height' of each menu option. These should all match. For patches changing the number of options in the main screen see the first section of this page.

Patch: Keen 4
#Help menu option height
%patch $99DE $0018W
#Height of hand options 1
%patch $99FC $0018W
#Height of hand options 2
%patch $9A07 $0018W
#Height of hand options 3


Option screens

All other screens in the help section are equivalent, they merely load a different data file to display. Thus patches that affect one will affect all other screens. Patches in this section relate to every one of these option screens. For patches changing what documents are loaded as well as how many options the player has see the first section of this page.


Images used and their position

Unlike the above help screen, images in the other screens don't need to be cached (Except the page number indicator); they are already cached when the main screen is loaded. Notice also how similar the setup is to the main screen, except for the bottom image they are identical.

Notice also that the same setup -with one difference- is used by the ending sequence screen so altering one will alter both screens.

Patch: Keen 4
#Top of help screen (At 0,0)
%patch $9613 $0050W
#Bitmap
#Left of help screen (At 0,8)
%patch $9623 $0051W
#Bitmap
%patch $9627 $0008W
#Vertical position
#Right of help screen (At 312,8)
%patch $9636 $0052W
#Bitmap
%patch $963A $0008W
#Vertical position
%patch $963E $0138W
#Horizontal position
#Help section bottom (At 8, 176)
%patch $964E $0053W
#Bitmap
%patch $9652 $00B0W
#Vertical position
%patch $9656 $0008W
#Horizontal position
#Bottom image
%patch $9664 $0054W
#Bitmap
%patch $9668 $00C0W
#Vertical position
%patch $966C $0008W
#Horizontal position
#Don't show...
%patch $9612 $EB $0E
#Top help image
%patch $9622 $EB $11
#Left help image
%patch $9635 $EB $12
#Right help image
%patch $964D $EB $12
#Bottom help image
%patch $9663 $EB $12
#Bottom ending image
%patch $9612 $EB $63
#All images


Background color

Just like the main screen, Computer Wrist pages have a background color that has no effect on them, and instead take their color from a screen-sized red background box.

Patch: Keen 4
#Screen colors:
%patch $95FB $0004W
#Color dark red used for screen background
%patch $95FF $00C8W
#200x...
%patch $9603 $0140W
#320...


Page number indicator

The Page number indicator (PNI) tells the palyer which page they are on and how many pages in total are in a given section. It has a single vertical and horizontal position despite being made of four different pieces of text.

Patch: Keen 4
#Position of page no. indicator text
%patch $97A2 $00BAW
#Vertical
%patch $97A8 $00DAW
#Horizontal
#Don't display...
%patch $9755 $EB $0E
#Current page number