Patch:Ship Parts

From KeenWiki
(Redirected from Patch:Vacuum)
Jump to navigation Jump to search

This page relates to the ship parts in Keen 1. Getting all four ship parts (Battery, Vacuum, Whiskey and Joystick) is required to win the game. The ship parts are also seen (as tiles) in the status window, BWB message window, high scores window and game over high score entry window.


What parts affect

These patches affect what the four ship parts affect. By default they affect four different values in memory set aside especially for ship parts. Values in blue relate to Item bytes. It is possible to alter these in all sorts of locations for various effects. Values in brown are the quantity or size of the effect. Patches also involve jump conditions, usually $74. A knowledge of all these is useful when altering these patches.

All ship parts add 10'000 points to Keen's score; if this is set to 0, no points will be given. Due to how it is coded, the score being affected cannot be changed (It can't for example be patched so Keen gets 20'000 shots with each part.).

Change the score amount that items give Keen when collected

%patch $4471 {$2710W}  #Default is 10'000

Change what ship parts affect and how much

#Have how many and what at game start
#First byte is what, last two are how many (By default Keen is given 4x0 parts)
%patch $9012 {$AA94W}  [$00] #Joystick
%patch $9018 {$AA9CW}  [$00] #Battery
%patch $901E {$AA96W}  [$00] #Vacuum
%patch $9024 {$AA98W}  [$00] #Whiskey

#How many of what item tiles give:
%patch $4448 {$AA94W}  [$01] #Joystick
%patch $4454 {$AA9CW}  [$01] #Battery
%patch $4460 {$AA96W}  [$01] #Vacuum
%patch $446C {$AA98W}  [$01] #Whiskey

#What lights up status window tiles (Default, use lit tile if NOT 0)
%patch $101D {$AA94W}  [$00] $74 #Joystick
%patch $1049 {$AA9CW}  [$00] $74 #Battery
%patch $1075 {$AA96W}  [$00] $74 #Vacuum
%patch $10A1 {$AA98W}  [$00] $74 #Whiskey

#What we need before we can win: (Default: win if all 4 NOT 0)
%patch $8022 {$AA94W}  [$00] $74 #Joystick
%patch $8029 {$AA9CW}  [$00] $74 #Battery
%patch $8030 {$AA96W}  [$00] $74 #Vacuum
%patch $8037 {$AA98W}  [$00] $74 #Whiskey

#What makes the parts appear in the highscores: (Default: Show if NOT 0)
%patch $8C14 {$AA94W}  [$00] $74 #Joystick
%patch $8C38 {$AA9CW}  [$00] $74 #Battery
%patch $8C5E {$AA96W}  [$00] $74 #Vacuum
%patch $8C85 {$AA98W}  [$00] $74 #Whiskey

#What makes the parts appear at the BwB-parts window: (Default appear IF 0)
%patch $AE72 {$AA94W}  [$00] $75 #Joystick
%patch $AE97 {$AA9CW}  [$00] $75 #Battery
%patch $AEBC {$AA96W}  [$00] $75 #Vacuum
%patch $AEE1 {$AA98W}  [$00] $75 #Whiskey


Increase points parts give

As noted above there is a simple patch to change the number of points the parts give. however this patch has a limit of 32'000 points. ($7FFFW.) Increasing this limit requires shuffling the tile code to add a second call to the increase_points code. In this example two calls of 20'000 are made for a total of 40'000 points. (The new maximum is thus 64'000 points.)

Only the last two lines and blue values are of importance here; these are the points added to the player's score. This patch is incompatible with most other patches on this page. (Though they can mostly be inserted into the cod given here.)

Keen 1

#Change tile pointers to increase maximum point limit
%patch $45A4 {$4440W} #Joystick
%patch $45A6 {$4448W} #Battery
%patch $45A8 {$4450W} #Vacuum
%patch $45AA {$4458W} #Whiskey

#New tile code
%patch $4440 $C7 $06 {$AA94W}  [$0001W]  $EB $1F
%patch $4448 $C7 $06 {$AA9CW}  [$0001W]  $EB $17
%patch $4450 $C7 $06 {$AA96W}  [$0001W]  $EB $0F
%patch $4458 $C7 $06 {$AA98W}  [$0001W]  $EB $07
%patch $4467 $B8 [$4E20W]  $50 $E8 $C8E4W  $44 $44
             $B8 [$4E20W]  $50


Parts increase parts counter instead of setting to 1

By default ship parts set a value. That is, no matter how many of something Keen has, when he gets a part, he end up with 1 of it (Or whatever value it's patched to.) This can be considered to be similar to how the C T Space Cheat works, no matter how many shots Keen has, the cheat sets them to 99. The following patches are all separate and make an item add to Keen's score, so that if he has x items he will then have x + 1 If a modder isn't using the ship parts, they are useful for doing such things as making the joystick a second raygun, such as is seen in Keen 3.

Keen 1

#Item counters ADD (Instead of SET):
%patch $4446 $83 $06 {$AA94W}  [$01] $90 #Joystick
%patch $445E $83 $06 {$AA96W}  [$01] $90 #Vacuum
%patch $446A $83 $06 {$AA98W}  [$01] $90 #Whiskey
%patch $4452 $83 $06 {$AA9CW}  [$01] $90 #Battery


Parts levels and removing parts on death

These are the levels the parts are found in by default. If Keen dies in these levels after getting a part, the part will be removed, thus preventing Keen from getting a part and not completing the level. This can come as a shock to modders who find parts they have 'disappearing' when they die in a custom level.

It is possible to make more than one level remove a part on death by altering the brown jumps in the first set of patches, though care is required. Changing the level to something 'impossible' such as level 100 will mean that no level Keen can enter in the game will remove his ship parts. (Or there is a patch to ignore ship part removal entirely.)

This patch can be modified so that Keen loses other things in special levels, like his ammunition. It can also be altered to give Keen things. Only one thing can be changed per level. See also Patch:Ship Parts

Keen 1 parts level stuff

#Parts levels (Part removed if you die in this level)
%patch $4F69 {$0008W} [$74] #Joystick
%patch $4F70 {$0003W} [$74] #Battery
%patch $4F75 {$0004W} [$74] #Vacuum
%patch $4F7C {$0010W} [$74] #Whiskey

#What happens in special levels; set {brown} to value [blue]
%patch $4F8C {$AA94W} [$0000W] #Joystick
%patch $4F84 {$AA9CW} [$0000W] #Battery
%patch $4F94 {$AA96W} [$0000W] #Vacuum
%patch $4F9C {$AA98W} [$0000W] #Whiskey


Don't ever remove Keen's ship parts

This patch disables the part removal; whenever Keen dies he will keep all the parts he's collected, even if he didn't finish a parts level.

<patch title="Keen 1>

  1. Don't ever remove Keen's ship parts

%patch $4F5E $EB $40</syntaxhighlight>


Misc parts patches

Parts give a lot of points instead of parts

This patch adds a score greater than 32'768 when Keen gets a part,but doesn't do anything else; making the Ship Parts basically high value point items. It breaks down if a value less than 32'768 is desired.

Get a very large score for ship parts

#Parts give 40'000 points, not parts
%patch $4440 $83 $7E $F6 $0B $74 $24 #Stop getting parts
             $83 $7E $F6 $0C $74 $1E
             $83 $7E $F6 $0D $74 $18
%patch $4454 $9C $AA $00
%patch $446A $83 $06 {$AACCW}  [$01] $90 #Fix score
%patch $4471 [$9C40W]                 #40'000 = $9C40


Affect ship parts when Keen dies in any level

This patch affects Keen's ship parts when he dies in ANY level, not just the special parts levels. The default patch affects all four parts but this can be changed. Simply deleting $C7 $06 $AAxxW $0000W will remove a ship part from those affected. Changing a value to $0001W will give a ship part.

Affect ship parts when Keen dies in any level

%patch $4F65 $C7 $06 {$AA94W}  [$0000W]  $C7 $06 {$AA96W}  [$0000W]  $C7 $06
             {$AA98W}  [$0000W]  $C7 $06 {$AA9CW}  [$0000W]  $A1 $6C60W  $5F $5E $8B
             $E5 $5D $C3


What is needed to win the game

This is what is required to trigger the ending sequence when Keen exits a level. By default Keen must have all four Ship Parts, that is, the value for these game stats must not be 0. (See also Patch:Jump conditions.) To make a part unnecessary simply replace $74 with $90 $90. If all four parts are treated this way, Keen will win the game on exiting any level.

Keen 1

#What we need before we can win: (Default: win if all 4 NOT 0)
%patch $8022 [$AA94W] {$00} [$74] #Joystick
%patch $8029 [$AA9CW] {$00} [$74] #Battery
%patch $8030 [$AA96W] {$00} [$74] #Vacuum
%patch $8037 [$AA98W] {$00} [$74] #Whiskey


Number of different parts needed to win game

This patch decreases the number of different parts needed to win the game. By default four parts are needed, each line of this patch removes on, starting with the Whiskey. If all four parts are disabled simply exiting a level wins the game.

Keen 1

%patch $8035 $EB $05 #3 parts
%patch $802E $EB $0C #2 parts
%patch $8027 $EB $13 #1 parts
%patch $8020 $EB $1A #No parts