Patch:Scorebox

From KeenWiki
Jump to: navigation, search

This page covers patches relating to the scorebox that appears in Keen galaxy in-level. It shows Keen's score, ammo and lives. It is possible to change what the scorebox tracks, and even stop it tracking something entirely. As such it requires knowledge of Patch:Game stats to patch properly.


Scorebox sprite and location

These patches relate to the sprite used for the scorebox and its location on the screen. Everything drawn on the scorebox will be drawn relative to this sprite and its location. If the sprite chosen is too small then various counters and tiles will simply not be drawn over it.

The sprite used must be the same as the sprite cached by left and right Keen, Map Keen and Swimming Keen when they are spawned. By default this is $00FDW, and it is not likely the modder would want to change this. The location is in map units (10ths of a pixel), so the default location is 4,4 pixels (Or 1/4,1/4 of a tile) from the top left of the screen. It should also be noted that whatever sprite is used must have four sprite shifts saved (This is a graphics setting.) or the sprite will appear as gibberish.

Patch: Keen 4
#Scorebox display
%patch $E97B $00FDW
#Left Keen cached
%patch $E9A7 $00FDW
#Right Keen cached
%patch $E9CF $00FDW
#Map Keen cached
%patch $DD83 $00FDW
#Sprite displayed
%patch $DD8A $0040W
#Vertical location
%patch $DD91 $0040W
#Horizontal location

Patch: Keen 5
#Scorebox display
%patch $D147 $00EBW
#Sprite
%patch $D14E $0040W
#Vertical location
%patch $D155 $0040W
#Horizontal location

Patch: Keen 6
#Scorebox display
%patch $CEFA $00AFW
#Sprite
%patch $CF01 $0040W
#Vertical location
%patch $CF08 $0040W
#Horizontal location

Patch: Keen Dreams
#Scorebox display
%patch $6347 $00D4W
#Sprite
%patch $634E $0040W
#Vertical location
%patch $6355 $0040W
#Horizontal location


Counter location in scorebox

These patches control the location of the three counters in the scorebox relative to the top left of the scorebox sprite. Vertical locations are in pixels while horizontal locations are in 8 pixel blocks.

For the score counter it is only possible to move it up 2 pixels at a time. The patch below sets its location at 0,0. Deleting $90 $90 will move it down two pixels.

Patch: Keen 4
#Decrease score counter vertical location 4 pixels
%patch $DAC0 $90 $90 $90 $90
#Lives counter location
%patch $DC94 $0014W
#Vertical
%patch $DC9E $02
#Horizontal
#Ammo counter location
%patch $DBA2 $0014W
#Vertical
%patch $DBAC $07
#Horizontal


What is displayed

This is what the scorebox displays, where and with what tiles. At present only a limited number of patches are available. The 'blank tile' is the 8x8 tile treated as 'tile -1'; the tile to be displayed when there is no value for the square. (Keen's starting score is one '0' tile preceded by five 'blank' tiles for example.) Blank tiles are not displayed if the variable itself is disabled.

Note that the lives variable is referenced four times by the scorebox for various purposes. Note also that in Keen Dreams the 'ammo' counter and tiles change in a specific level.

Patch: Keen 4
#What scorebox tracks:
%patch $DA92 $7A50W
#Score (refresh)
%patch $DADA $7A50W
#Score (low)
%patch $DAD6 $7A52W
#Score (high)
%patch $DB69 $7A58W
#Ammo
%patch $DC64 $7A6AW
#Lives
%patch $DCA8 $7A6AW
#Lives
%patch $DCC8 $7A6AW
#Lives
%patch $DD48 $7A6AW
#Lives
#Don't display...
%patch $DA94 $90 $90
#Score (Score 0 tiles still show)
%patch $DB74 $90 $90
#Ammo
%patch $DC66 $90 $90
#Lives
#Blank tiles
%patch $DB09 $0029W
#Score
%patch $DC07 $0029W
#Ammo
%patch $DCFA $0029W
#Lives
#Don't display blank tiles
%patch $DB0D $90 $90 $90
#Score
%patch $DC0B $90 $90 $90
#Ammo
%patch $DCFE $90 $90 $90
#Lives

Patch: Keen 5
#What scorebox tracks:
%patch $DA56 $6F4EW
#Score (refresh)
%patch $CE9E $6F4EW
#Score (low)
%patch $CE9A $6F50W
#Score (high)
%patch $CF2D $6F56W
#Ammo
%patch $D028 $6F6AW
#Lives
%patch $D06C $6F6AW
#Lives
%patch $D08C $6F6AW
#Lives
%patch $D10C $6F6AW
#Lives
#Don't display...
%patch $CE58 $90 $90
#Score (Score 0 tiles still show)
%patch $CF38 $90 $90
#Ammo
%patch $D02A $90 $90
#Lives
#Blank tiles
%patch $CECD $0029W
#Score
%patch $CFCB $0029W
#Ammo
%patch $D0BE $0029W
#Lives
#Don't display blank tiles
%patch $CED1 $90 $90 $90
#Score
%patch $CFCF $90 $90 $90
#Ammo
%patch $D0C2 $90 $90 $90
#Lives

Patch: Keen 6
#What scorebox tracks:
%patch $CC09 $7588W
#Score (refresh)
%patch $CC51 $7588W
#Score (low)
%patch $CC4D $758AW
#Score (high)
%patch $CCE0 $7590W
#Ammo
%patch $CDDB $75A6W
#Lives
%patch $CE1F $75A6W
#Lives
%patch $CE3F $75A6W
#Lives
%patch $CEBF $75A6W
#Lives
#Don't display...
%patch $CC0B $90 $90
#Score (Score 0 tiles still show)
%patch $CCEB $90 $90
#Ammo
%patch $CDDD $90 $90
#Lives
#Blank tiles
%patch $CC80 $0029W
#Score
%patch $CD7E $0029W
#Ammo
%patch $CE71 $0029W
#Lives
#Don't display blank tiles
%patch $CC84 $90 $90 $90
#Score
%patch $CD82 $90 $90 $90
#Ammo
%patch $CE75 $90 $90 $90
#Lives

Patch: Keen Dreams
#Level that decides between Flower Power and Bombs counter
%patch $6192 $8F3EW $0F $75
#Level that decides between Flower Power and Bombs tiles
%patch $5EF8 $8F3EW $0F $75
#What scorebox tracks:
%patch $6104 $7116W
#Score (low)
%patch $6108 $7114W
#Score (high)
%patch $6184 $7116W
#Score (low)
%patch $618B $7114W
#Score (high)
%patch $6198 $711EW
#Boobus bombs
%patch $619D $711CW
#Flower Power
%patch $62F5 $7126W
#Lives
%patch $630A $7126W
#Lives
#Don't display...
%patch $61A8 $90 $90
#Ammo
%patch $62D0 $EB $2E
#Lives


What is displayed when lives or ammo > 99

When Keen has more than 99 lives or ammunition the scorebox shows this by displaying a two character long string of text. By default this is '99', meaning that if Keen has more than 99 shots or lives the scorebox will simply read '99' instead of the true value. (Which can be seen in the Status Window.)

In the case of the lives counter in Keen Dreams the limit is 9 lives. When this is exceeded an 8x8 tile is placed instead. By default this is tile 10. (Which is an image of the number 9.) This mean extending the limit past 9 is very difficult.

Patch: Scorebox max ammo\lives text
#Keen 4 :
%patch $DBBB $1846W
#Text called from (Shots)
%patch $306B6 "99" $00 %patch $DCAE $1849W
#Text called from (Lives)
%patch $306B9 "99" $00
#Keen 5 :
%patch $CF7F $162EW
#Text called from (Shots)
%patch $D072 $162EW
#Text called from (Lives)
%patch $3196E "99" $00
#Keen 6 :
%patch $CD32 $164CW
#Text called from (Shots)
%patch $3237C "99" $00 %patch $CE25 $164FW
#Text called from (Lives)
%patch $3237F "99" $00
#Keen 7 :
%patch $61EF $16B6W
#Text called from
%patch $25126 "99" $00
#Shots
%patch $62E4 $000AW
#Lives (Tile)


Max ammo\lives to display

This is the limit referred to above; if Keen has more than this limit then the text above will appear. See also Patch:Jump conditions. Note that for Keen Dreams the limit on lives is 9.

Patch: Scorebox '99' limit
#Keen 4
%patch $DBB7 $63 $76
#Shots
%patch $DCAA $63 $7E
#Lives
#Keen 5
%patch $CF7B $63 $76
#Shots
%patch $D06E $63 $7E
#Lives
#Keen 6
%patch $CD2E $63 $76
#Shots
%patch $CE21 $63 $7E
#Lives
#Keen 7
%patch $61EB $63 $76
#Shots
%patch $CE21 $09 $7E
#Lives


Disable

This disables the scorebox entirely, that is, it is never displayed in-level, even when it is turned on.

Patch: Disable scorebox
#Disable scorebox -Keen 4
%patch $DA4F $90 $90
#Disable scorebox -Keen 5
%patch $CE33 $90 $90


Counters are yellow

This patch changes the counters from light red to yellow. (Grey digits become light red.) This patch appears stable but may cause unknown issues.

Patch: Keen 4
#Ammo counter is yellow
%patch $DB99 $0280W
#Lives counter is yellow
%patch $DC8B $0280W
#Score counter is yellow
%patch $DAB9 $0280W