Patch:Lives
Lives are the number of attempts the player has to complete the game. When the player dies, either due to level hazards or enemies a life is lost. Keen can gain a life by getting points or in Galaxy by getting 1UP item. This page contains patches relating to lives. Related patches are Patch:Extra Keen At, Patch:Keens Left Window and Patch:Game over.
The F10-Z cheat in Keen galaxy sets lives to 0 and causes a game over.
Lives at game start
This is the number of lives Keen starts with. It is set when a new game is started and also serves the purpose of overwriting any previous game data. Here both the lives and life stat are set. For other patches the affect what Keen has when starting a new game see Patch:Game start.
Lives at game start
#Lives Keen has at game start -Keen 1
%patch $9000 {$AAC6W} [$0004W] #4 lives
#Lives Keen has at game start -Keen 2
%patch $8A8E {$9ADCW} [$0004W] #4 lives
#Lives Keen has at game start -Keen 3
%patch $98E4 {$9D46W} [$0004W] #4 lives
#Lives Keen has at game start -Keen 4
%patch $5CC7 {$7A6AW} [$0003W] #3 lives
#Lives Keen has at game start -Keen 5
%patch $5C9B {$6F6AW} [$0003W] #3 lives
#Lives Keen has at game start -Keen 6
%patch $5A9B {$75A6W} [$0003W] #3 lives
Life counter and Game Over
A Game over is triggered when Keen's life counter reaches a certain value (By default when he has -1 lives.) It is possible to change the life counter so it tracks other things or, say, removes Keen's pogo when he dies. This can be done by changing the brown colored bytes. See Patch:Game stats
What decreases when Keen dies
#Decrease lives by one when Keen dies -Keen 3
%patch $8E00 $FF $0E {$9D46W}
#Decrease lives by one when Keen dies -Keen 4
%patch $667E $FF $0E {$7A6AW}
#Decrease lives by one when Keen dies -Keen 5
%patch $6639 $FF $0E {$6F6AW}
#Decrease lives by one when Keen dies -Keen 6
%patch $644E $FF $0E {$75A6W}
Keen gains a life each time he dies
This patch makes Keen gain a life each time he dies. It can thus be used to count Keen's deaths if Keen is given 0 lives at the game start. (See also patches int he next section.)
Keen gains a life each time he dies
#Keen gains a life each time he dies -Keen 3
%patch $8E00 $FF $06 {$9D46W}
#Keen gains a life each time he dies -Keen 4
%patch $667E $FF $06 {$7A6AW}
#Keen gains a life each time he dies -Keen 5
%patch $6639 $FF $06 {$6F6AW}
#Keen gains a life each time he dies -Keen 6
%patch $644E $FF $06 {$75A6W}
Infinite lives
There are several ways to have infinite lives. The first is to stop decreasing the life counter when Keen dies and the second is to simply not check for Game Over. The first method is preferred as nothing odd will happen. A second method can result in Keen having negative lives which may cause problems. As such it is best used in conjunction with other patches.
Don't decrease lives on dying
This patch works by not decreasing the life counter when Keen dies. As such he will always have the number of lives he started with and can try as many times as he wants to complete the game. (Note that the F10-Z cheat is made useless.)
Infinite lives - Don't decrease lives
#Infinite lives - Don't decrease lives -Keen 1
%patch $8041 $90 $90 $90 $90
#Infinite lives - Don't decrease lives -Keen 2
%patch $8446 $90 $90 $90 $90
#Infinite lives - Don't decrease lives -Keen 3
%patch $8E00 $90 $90 $90 $90
#Infinite lives - Don't decrease lives -Keen 4
%patch $667E $90 $90 $90 $90
#Infinite lives - Don't decrease lives -Keen 5
%patch $6639 $90 $90 $90 $90
#Infinite lives - Don't decrease lives -Keen 6
%patch $644E $90 $90 $90 $90
Don't check for Game Over
This patch is useful if the lives counter is going to be used as a death counter or something similar. It allows the player to keep track of their deaths. Used by itself however it can have odd consequences.
No Game Over even with 0 lives
#No Game Over even with 0 lives -Keen 1
%patch $804A $90 $90
#No Game Over even with 0 lives -Keen 2
%patch $844F $90 $90
#No Game Over even with 0 lives -Keen 3
%patch $8E09 $90 $90
#No Game Over even with 0 lives -Keen 4
%patch $6687 $EB
%patch $6BA1 $90 $90
Reset Keen's lives when he dies
This patch sets Keen's lives to a certain value each time he dies and skips the GO check. Again this means he will never die; but it has the advantage of being usable with the hit points patch in a later section on this page.
Keen 3
#Set Keen's lives to 2 each time he dies
%patch $8E00 $C7 $06 {$9D46W} [$0002W] $EB $03
No game over
This patch doesn't decrease lives and skips the Game Over entirely. Thus the only way to have a Game Over is to quit the game.
No game over
#Infinite lives - Skip G.O. check -Keen 1
%patch $8041 $E9 $FC9CW
#Infinite lives - Skip G.O. check -Keen 2
%patch $8446 $E9 $FCA7W
#Infinite lives - Skip G.O. check -Keen 3
%patch $8DFE $90 $90 $E9 $FC8CW
#Infinite lives - Skip G.O. check -Keen 4
%patch $667E $EB $0C
%patch $6BA1 $90 $90
#Infinite lives - Skip G.O. check -Keen Dreams
%patch $59E0 $EB $0C
Misc
These patches do not fit into the above categories.
Single bullet gives extra life
This makes the single bullet tile into a 1UP or extra Keen.
Keen 3
#Single bullet gives extra life
%patch $7BD4 {$9D46W}
Keen's lives set to x on level entry
This patch set's Keen's lives to some value each time he enters a level. That is, if he has more or less lives they will be changed to a specific value. This is similar to infinite lives since on dying Keen will exit the level and on reentry regain his lost life. This example sets Keen's lives to 2. See also See also Patch:Level start and Patch:Game stats.
As a side effect God mode does not turn off at the start of levels. This patch is incompatible with the Ankh at level start patch.
Keen 3
#Keen's lives reset to 2 on level start
%patch $81CE $C7 $06 {$9D46W} [$0002W]
Infinite lives and score and ammo set to zero on death
This patch will set Keen's score and ammunition to zero when he dies and as a side effect gives him infinite lives. If the first two bytes are replaced with $90 $90 then the ammo/score reset will also apply when Keen exits a level.
The patch works by setting three values (colored brown) to zero. By changing these other variables can be set to other values.
Keen 3
#Set score and ammo to 0 on death
%patch $8DFE $EB $0C $C7 $06 {$9D48W} [$0000W] $C7 $06 {$9D4AW} [$0000W] $C7 $06
{$9D4CW} [$0000W] $E9 $FC80W $90 $90
Keen has hitpoints (health)
This patch alters things such that Keen has hitpoints or health. This means that when Keen touches an enemy (but not tile!) that should kill him he instead loses 1 hitpoint. When he is out of hitpoints he dies.
The way this patch is set up lives] serve as hitpoints and Keen is given temporary invincibility via the Ankh timer. This means the patch is only feasible for Keen 3. This patch also requires the C T Space Cheat to be disabled, which is what the first line does. (It can be made compatible with the C T Space cheat however.)
On the second line the game checks if Keen has a red keycard; if he does he will die instantly no matter how many hitpoints he has. (The card thus acts as a 'kill switch'.) See Patch:Game stats to alter the brown value that controls this. Setting it and the following blue value to $9D46W $0000W will disable this requirement. (But see end of description.)
On the third line the first set of brown-blue-brown values check to see if Keen has any Ankh time. If he does the code is exited and Keen is unaffected. If he does not however the second set of brown-blue-brown values check to see if he has 1 or less lives. If he does then Keen will exit the code and die. (This must be so because when Keen dies he will lose an additional life.)
On the fourth and final line the 'hurt' code is run. This decreases Keen's life count by 1 (marked in brown) and sets his Ankh time to $0120, giving him about a second of invincibility.
Note that using this patch rapidly reduces to normal gameplay unless there is some way to replenish Keen's lives. A good way of doing this is to use the 'reset Keen's lives on level entry' patch in this link.
After the first segment is an optional 'kill switch' patch. This gives Keen the red keycard when he touches a hazard tile which is the same thing that the first segment uses as a 'kill switch'. With this added to the patch Keen will die instantly when touching hazard tiles. With it absent hazard tiles will work with hitpoints.
Finally there is another optional patch, one that resets Keen's lives to 2 when he dies. This will eliminate the game over when out of lives and will allow Keen to reenter a level at 'full' health. If a game over is still desired then a third optional patch can be used instead; it resets Keen's lives to 2 when he starts a level, meaning that Keen will always start a level with full health, but dying within the level will still cause a game over. Both can be used together.
Keen has hitpoints (health
#Keen has hit points (lives) - Keen 3
%patch $114E $EB $16
%patch $790C $81 $3E {$9D20W} [$0001W] $0F $84 $06 $00 $E9 $954BW
%patch $0E64 $81 $3E {$9946W} [$0000W] {$7F} $12 $81 $3E {$9D46W} [$0001W] {$7E} $0D
$FF $0E {$9D46W} $C7 $06 {$9946W} [$0120W] $E9 $6AD3W $E9 $6A98W
#Hazard tile is insta-kill
%patch $7A32 $E8 $4F $94
%patch $0E84 $C7 $06 {$9D20W} [$0001W] $E8 $6A7CW $C3
#Fell health option 1: Set Keen's lives to 2 each time he dies
%patch $8E00 $C7 $06 {$9D46W} [$0002W] $EB $03
#Fell health option 2: Set Keen's lives to 2 on levels tart
%patch $81CE $C7 $06 {$9D46W} [$0002W]
A 2 Enter cheat gives a life
This patch alters the a 2 enter window so that instead of activating debug mode it gives the player an extra life. This of course disables the F10 cheats, but these can be re-enabled via the nowait switch or by removing the debug condition from the cheats. The text used here also has unlimited space, meaning the window's message can be of any length.
The first line contains the two key checks needed to activate the window (One of the keys has to be 'enter'.) The end of the first line and start of the second line contains the window's height\width variables. The text is called on line 3 and line 4 increases the life counter.
Keen 4
#Debug cheat gives an extra life
%patch $82DF $83 $3E {$C683W} [$00] {$74} $38 $83 $3E {$C64DW} [$00] {$74} $31 $B8 [$0002W]
$50 $B8 [$0009W] $50 $9A $19311070RL $83 $C4 $04 $83 $06
$35 $A5 $02 $B8 [$E8D0W] $50 $9A $19310CF9RL $83 $C4 $02 $9A
$1D060A9BRL $9A $14600EDFRL $FF $06 {$7A6AW} $90 $90
#Text
%patch $3D740 " Get a life!" $00