Patch:Score
This page contains patches relating to Keen's score. Related patches are Patch:Extra Keen At, Patch:High Scores Patch:Scorebox and Patch:Items. Mostly this page will deal with Keen's in-game score and unusual things happening to it.
Contents
Disable score
These patches disable the score entirely. That is, when Keen gets items he is not given any points at all. This also disables the Extra Keen At code as well.
Patch: Keen 1 |
|
Patch: Keen 2 |
|
Patch: Keen 3 |
|
Set score to zero
These patches set Keen's score to zero when certain things happen.
On dying\exiting level
The first patch here sets keen's score to zero when he dies. changing the first two bytes to $90 will also do this when he exits the level normally. (Unless something else is done with the score, this pretty much renders the score useless.) The second patch will also set keen's ammo to zero, by changing the brown highlighted ammo value using values from Patch:Game stats you can change what else is set to zero. It is also possible to set Keen's score (And other things) to other values by changing the blue highlighted values.
Patch: Keen 3 |
|
Patch: Keen 4 |
|
Dying removes any points obtained in a level
This patch saves Keen's score when he enters a level, then, if he dies, resets the score to what it was. This means Keen can only get points on completing a level (Excluding the teleport to the secret level.) This means only a set number of points can be collected in a playthrough.
It can be seen that the variable stores is the low word of the score, this can be changed to store other things if desired.
Note that the Keen 4\5 patch uses the EGAGRAPH check skip and so is incompatible with any other patches that use this. The last two lines replace the Extra Keen At Score with the stored score for the players benefit, but are not necessary and can be removed. (Those two lines do not stop the player getting EKA bonuses.) Likewise the Keen 5 patch displays the stored score in Keen's scorebox. The Keen 6 patch disables the creature question.
Note that the Vorticons versions of the patch are incompatible with the 'Keen dies instead of recovering ' patch. There is however a tweak to make the two patches compatible. And again in Vorticons only note that the blue $0800Ws are the alignments for Keen's death sprite.
Patch: Keen 1 |
|
Patch: Keen 2 |
|
Patch: Keen 3 |
|
Patch: Keen 4 |
|
Patch: Keen 5 |
|
Patch: Keen 6 |
|
Dying removes points and ammo obtained in a level
This is a slightly more complex and robust version of the patch above that also resets the player's ammo. As a side effect the Extra Keen At mechanism is disabled (Instead EKA tracks the 'secured score') and no sprites appear in the Keens left window. (Because of this an addition to the patch, infinite lives, has been added.)
The patch works as follows; the first patch sets the stored_ammo variable to 0, just as a precaution.
The second section deals with resetting the score to what it was when the level was started. This is done when the 'keens left' window appears when Keen is sent to the map level. This overwrites the lives sprite in the window. On the first line the game checks to see if the stored_score is 0, this happens when a game is restored for example. If this is so then the reset code is skipped and instead the current score is stored at the end of line 2. Otherwise the player has died and first their score then their ammo are reset at the end of line 1\start of line 2 and the score storing code skipped.
The third section rearranges the level loading code so that a call to the score saving code can be added. It is not important how this section functions.
The fourth section is the actual score storing code. It replaces the Extra Keen At code and simply takes the values in score and ammo and stores them in the EKA variable and stored_ammo variable respectively.
The fifth section changes the EKA in the status window so that it now displays the stored score, that is, the score the player will get if they die. Finally the last patch enables infinite lives. This si because of how the rest of the patch changes gameplay, but is not itself necessary.
Patch: Keen 1 |
|
Patch: Keen 2 |
|
Patch: Keen 3 |
|
Score at game start
When a new game is started the score is zero by default. This can be patched to any desired value.
Patch: Keen 4 |
|
Track Score
This is a list of all the times the score value is referenced in Keen games. That is, all of the things the score variable is used for.
Patch: Keen 4 |
%patch $6B0B $7A52W $FF $36 $7A50W %patch $6BB0 $7A52W $FF $36 $7A50W |