Patch:Keen on poles

From KeenWiki
Jump to: navigation, search

This page contains patches that relate to the player on poles, under what conditions the player grabs or lets go of poles and pole tiles themselves. It covers all the Galaxy and Dreams episodes. Other tile patches can be found under Patch:Tiles Other patches relating to Keen can be found under Patch:Keen (Keen 4), Patch:Keen (Keen 5), Patch:Keen (Keen 6) and Patch:Keen (Keen Dreams).

This page is divided into four sections. The first deals with pole tiles themselves, the second deals with grabbing onto poles, the third with falling off of poles and the fourth with the properties of Keen's pole climbing sprites.

As a side note, altering Keen's pole detection code slightly allows the insertion of level specific text window 'notes' into the game.


Pole tiles

This section deals with pole tiles themselves and not the player's sprite.


Pole tile property

Poles have a 'misc flag' value of 1. This is the only tile property Keen can interact with to start climbing poles. In some games other sprites can interact with it as well.

Unlike most tile types, poles are 'optional' in that whether or not Keen interacts with them is a choice made by players. There are three main situations where the game checks for poles. The first is when the up arrow is pressed. This allows Keen, whatever he's doing, to grip poles he's in front of.

The other two situations involve detecting pole tops and bottoms. For example Keen cannot climb up into a tile if it is not flagged as a pole. This will cause him to stop at pole tops. In Keen Dreams an additional check is needed for pole bottoms, but this was eliminated in the Galaxy games.

Patch: Pole tile property
#Pole tile property -Keen 4
%patch $B8FC $0001W $75
#Keen can grip this tile
%patch $C7C6 $0001W $74
#Keen can climb up this tile
%patch $C866 $0001W $74
#Keen can climb down this tile
#Pole tile property -Keen 5
%patch $ABDE $0001W $75
#Keen can grip this tile
%patch $BBE4 $0001W $74
#Keen can climb up this tile
%patch $BC84 $0001W $74
#Keen can climb down this tile
%patch $11385 $0001W $75
#Ampton can grip this tile
%patch $113B3 $0001W $75
#Ampton can climb up this tile
%patch $114C4 $0001W $75
#Ampton can climb down this tile
%patch $11529 $0001W $75
#Ampton can grip this tile
%patch $115B7 $0001W $75
#Ampton can climb up this tile
%patch $11611 $0001W $74
#Ampton can climb down this tile
#Pole tile property -Keen 6
%patch $AB12 $0001W $75
#Keen can grip this tile
%patch $B9C7 $0001W $74
#Keen can climb up this tile
%patch $BA67 $0001W $74
#Keen can climb down this tile
#Pole tile property -Keen Dreams
%patch $6C6A $0001W $75
#Keen can grip this tile
%patch $7368 $0001W $74
#Keen can climb up this tile
%patch $7380 $0001W $74
#Keen can climb down this tile
%patch $73ED $0001W $74
#When detecting pole bottoms
%patch $8FF6 $0001W $75
#Apel can grip this tile
%patch $9096 $0001W $74
#Apel can climb up this tile
%patch $90E6 $0001W $74
#When Apel grips poles


Starting\stopping pole climbing

This section deals with patches that relate to the conditions under which the player will start or stop interacting with poles.


Player cannot interact with poles at all

The first set of patches simply disables any interaction between the player and poles. The pole related code still exists, but the player cannot utilize it because they cannot start pole climbing. (Other sprites can also react to poles, such as the Little Ampton..)

The second patch is more specific, it stops Keen from being able to grab poles while jumping or falling.

Patch: Disable poles entirely
#Disable poles entirely -Keen 4
%patch $B8A0 $33 $C0 $5E $8B $E5 $5D $CB
#Disable poles entirely -Keen 5
%patch $AB82 $33 $C0 $5E $8B $E5 $5D $CB
#Disable poles entirely -Keen 6
%patch $AAB6 $33 $C0 $5E $8B $E5 $5D $CB

Patch: Disable grabbing poles while jumping\falling
#Disable grabbing poles while jumping\falling -Keen 4
%patch $C4BC $EB
#Disable grabbing poles while jumping\falling -Keen 5
%patch $B8DA $EB
#Disable grabbing poles while jumping\falling -Keen 6
%patch $B6BD $EB


Disable jumping on poles

These patches disable Keen's ability to jump off poles and\or shoot on poles. This means he can only leave poles if knocked off or at the top\bottom of poles.

Patch: Keen 4
#Disable jumping off poles (Frees $C682-$C6D2)
%patch $C680 $EB
#Disable shooting and jumping on poles (Frees $C64F-$C6D2)
%patch $C641 $5E $5D $CB

Patch: Keen 5
#Disable jumping off poles (Frees $BAA0-$BAF0)
%patch $BA9E $EB
#Disable shooting and jumping on poles (Frees $BA6D-$BAF0)
%patch $BA5F $5E $5D $CB

Patch: Keen 6
#Disable jumping off poles (Frees $B883-$B8D3)
%patch $B881 $EB
#Disable shooting and jumping on poles (Frees $B850-$B8D3)
%patch $B842 $5E $5D $CB


Keen's pole climbing sprites

This section of the page deals with the properties of the player's pole climbing sprites and is divided into sections for each property. All four games involving pole climbing are included in each section.


Sprite Actions

There are two unique situations where Keen will start climbing up a pole, these lead to a 3-action loop. The loop will stop in two situations; when Keen reaches a pole top or when he stops pressing the up key. Doing either will return him to his 'sit on poles' action.

Likewise there are two situations where Keen can start climbing down poles, leading to a 4-action loop. This will only stop when the down key is no longer pressed or Keen falls off of the bottom of a pole.

When on a pole Keen will keep going to his sitting action if nothing is pressed. Obscurely, Keen can 'walk off' of a pole if he's level with the ground and presses the left or right arrow keys. This will make him fall off the pole onto the ground.

Keen can jump off of a pole, this sends him to the first jumping action. Keen can also shoot up, down and horizontally on poles. Each direction involves a start point, a shooting check to check if Keen is already shooting and two actions to make the shot, returning Keen to sitting on a pole after.

Finally Keen can move down a pole that goes all the way to the floor. At the bottom he will dismount the pole and go to his 'look down' action.


Keen 4

When on poles and thus using his second sprite collision Keen can be disturbed by Platforms or Bounders; in both cases he will revert to his falling action.

Actions
$0EF0W #Keen going still on a pole
$0F0EW #Keen going up a pole
$0F2CW #Keen going up a pole
$0F4AW #Keen going up a pole
$0F68W #Keen going down a pole
$0F86W #Keen going down a pole
$0FA4W #Keen going down a pole
$0FC2W #Keen going down a pole
$0FE0W #Keen shooting horizontally on a pole 1
$0FFEW #Keen shooting horizontally on a pole 2
$101CW #Keen shoots up on pole 1
$103AW #Keen shoots up on pole 2
$1058W #Keen shooting down on a pole 1
$1076W #Keen shooting down on a pole 2

Patch: Keen 4
#Sitting on a pole
%patch $2FD7C $0EF0W
#Head up on a pole
%patch $C6F0 $0F0EW %patch $C8B1 $0F0EW
#Keen going up a pole loop
%patch $2FD9A $0F2CW %patch $2FDB8 $0F4AW %patch $2FDD6 $0F0EW
#Keen stops going up a pole
%patch $C7D3 $0EF0W
#At top of pole
%patch $C7F3 $0EF0W
#Up key no longer pressed
#Keen start going down a pole
%patch $C700 $0F68W %patch $C7FF $0F68W
#Keen stops going down a pole
%patch $C879 $11A2W
#Fall off of pole bottom
%patch $C8BD $0EF0W
#Down key no longer pressed
#Keen going down a pole loop
%patch $2FDF4 $0F86W %patch $2FE12 $0FA4W %patch $2FE30 $0FC2W %patch $2FE4E $0F68W
#Keen jump off of pole
%patch $C6BB $1166W
#Keen walk off of a pole
%patch $C762 $11A2W
#Keen go to looking down at bottom of poles
%patch $D8C4 $0C3EW
#Start shooting horizontally
%patch $C672 $0FE0W
#Shooting horizontally check
%patch $CA82 $0FE0W
#Shooting horizontally on a pole sequence
%patch $2FE6C $0FFEW %patch $2FE8A $0EF0W
#Start shooting up
%patch $C66B $101CW
#Shooting up check
%patch $CAC5 $101CW
#Shooting up on a pole sequence
%patch $2FEA8 $103AW %patch $2FEC6 $0EF0W
#Start shooting down
%patch $C679 $1058W
#Shooting down check
%patch $CB06 $1058W
#Shooting down on a pole sequence
%patch $2FEE4 $1076W %patch $2FF02 $0EF0W
#Be disturbed by
%patch $CE54 $11A2W
#Platforms
%patch $CE8C $11A2W
#Bounders


Keen 5

When on poles and thus using his second sprite collision Keen can be disturbed by Platforms and will revert to his falling action.

Actions
$0DCEW #Keen still on a pole
$0DECW #Keen going up a pole
$0E0AW #Keen going up a pole
$0E28W #Keen going up a pole
$0E46W #Keen going down a pole
$0E64W #Keen going down a pole
$0E82W #Keen going down a pole
$0EA0W #Keen going down a pole
$0EBEW #Keen shooting horizontally on a pole start
$0EDCW #Keen shooting horizontally on a pole
$0EFAW #Keen shoots up on pole start
$0F18W #Keen shoots up on pole
$0F36W #Keen shooting down on a pole start
$0F54W #Keen shooting down on a pole

Patch: Keen 5
#Sitting on a pole
%patch $3112A $0DCEW
#Head up on a pole
%patch $BB0E $0DECW %patch $BCCF $0DECW
#Keen going up a pole loop
%patch $31148 $0E0AW %patch $31166 $0E28W %patch $31184 $0DECW
#Keen stops going up a pole
%patch $BBF1 $0DECW
#At top of pole
%patch $BC11 $0DECW
#Up key no longer pressed
#Keen start going down a pole
%patch $BB1E $0F68W %patch $BC1D $0F68W
#Keen stops going down a pole
%patch $BC97 $1080W
#Fall off of pole bottom
%patch $BCDB $0DECW
#Down key no longer pressed
#Keen going down a pole loop
%patch $311A2 $0E64W %patch $311C0 $0E82W %patch $311DE $0EA0W %patch $311FC $0E46W
#Keen jump off of pole
%patch $BAD9 $1044W
#Keen walk off of a pole
%patch $BB80 $1080W
#Keen go to looking down at bottom of poles
%patch $CC88 $0AFEW
#Start shooting horizontally
%patch $BA90 $0EBEW
#Shooting horizontally check
%patch $BEA0 $0EBEW
#Shooting horizontally on a pole sequence
%patch $3121A $0EDCW %patch $31238 $0DCEW
#Start shooting up
%patch $BA89 $0EFAW
#Shooting up check
%patch $BEE3 $0EFAW
#Shooting up on a pole sequence
%patch $31256 $0F18W %patch $31274 $0DCEW
#Start shooting down
%patch $BA97 $0F36W
#Shooting down check
%patch $BF24 $0F36W
#Shooting down on a pole sequence
%patch $31292 $0F54W %patch $312B0 $0DCEW


Keen 6

When on poles and thus using his second sprite collision Keen can be disturbed by Platforms and will revert to his falling action.

Actions
$0D68W #Keen sit on a pole
$0D86W #Keen moving up a pole
$0DA4W #Keen moving up a pole
$0DC2W #Keen moving up a pole
$0DE0W #Keen moving down a pole
$0DFEW #Keen moving down a pole
$0E1CW #Keen moving down a pole
$0E3AW #Keen moving down a pole
$0E58W #Keen shoot horizontally on a pole 1
$0E76W #Keen shoot horizontally on a pole 2
$0E94W #Keen shoot up on a pole 1
$0EB2W #Keen shoot up on a pole 2
$0ED0W #Keen shoot down on a pole 1
$0EEEW #Keen shoot down on a pole 2

Patch: Keen 6
#Sitting on a pole
%patch $31AB4 $0D68W
#Head up on a pole
%patch $B8F1 $0D86W %patch $BAB2 $0D86W
#Keen going up a pole loop
%patch $31AD2 $0DA4W %patch $31AF0 $0DC2W %patch $31B0E $0D86W
#Keen stops going up a pole
%patch $B9D4 $0D68W
#At top of pole
%patch $B9F4 $0D68W
#Up key no longer pressed
#Keen start going down a pole
%patch $B901 $0DE0W %patch $BA00 $0DE0W
#Keen stops going down a pole
%patch $BA7A $101AW
#Fall off of pole bottom
%patch $BABE $0D68W
#Down key no longer pressed
#Keen going down a pole loop
%patch $31B2C $0DFEW %patch $31B4A $0E1CW %patch $31B68 $0E3AW %patch $31B86 $0DE0W
#Keen jump off of pole
%patch $B8BC $0FDEW
#Keen walk off of a pole
%patch $B963 $101AW
#Keen go to looking down at bottom of poles
%patch $CA3B $0AF2W
#Start shooting horizontally
%patch $B873 $0E58W
#Shooting check
%patch $BC83 $0E58W
#Shooting horizontally on a pole sequence
%patch $31BA4 $0E76W %patch $31BC2 $0D68W
#Start shooting up
%patch $B86C $0E94W
#Shooting check
%patch $BCC6 $0E94W
#Shooting up on a pole sequence
%patch $31BE0 $0EB2W %patch $31BFE $0D68W
#Start shooting down
%patch $B87A $0ED0W
#Shooting check
%patch $BD07 $0ED0W
#Shooting down on a pole sequence
%patch $31C1C $0EEEW %patch $31C3A $0D68W


Keen Dreams

Keen's actions in Dreams are more simple than that of Keen Galaxy. There is only one situation where he will grab a pole, by pressing up while in front of it. When Keen reaches the top or bottom of poles he'll turn into his sitting action, and stop moving. However the code for the bottom of poles is unused (he'll fall off of them instead), even though it is present.

Actions
$118AW #Keen sit on pole
$11A8W #Keen climb up pole 1
$11C6W #Keen climb up pole 2
$11E4W #Keen climb up pole 3
$1202W #Keen climb down pole 1
$1220W #Keen climb down pole 2
$123EW #Keen climb down pole 3
$125CW #Keen climb down pole 4
$127AW #Keen pole-throw horizontally 1
$1298W #Keen pole-throw horizontally 2
$12B6W #Keen pole-throw horizontally 3
$12D4W #Keen pole-throw up 1
$12F2W #Keen pole-throw up 2
$1310W #Keen pole-throw up 3
$132EW #Keen pole-throw down 1
$134CW #Keen pole-throw down 2
$136AW #Keen pole-throw down 3

Patch: Keen Dreams
#Sitting on a pole
%patch $24BF8 $150EW
#Keen grip pole when pressing up
%patch $6C90 $118AW
#Keen going up a pole loop
%patch $24C16 $118AW %patch $24C34 $11C6W %patch $24C52 $11E4W %patch $24C70 $11A8W
#Keen stops going up a pole
%patch $7374 $118AW
#At top of pole
#Keen start going down a pole
%patch $B901 $0DE0W %patch $BA00 $0DE0W
#Keen stops going down a pole
%patch $7389 $118AW
#Keen stop moving at pole bottom (Unused)
%patch $73FF $1568W
#Fall off of pole bottom
%patch $7445 $118AW
#Down key no longer pressed
#Keen going down a pole loop
%patch $24C8E $1220W %patch $24CAC $123EW %patch $24CCA $125CW %patch $24CE8 $1202W
#Keen jump off of pole
%patch $B8BC $0FDEW
#Keen walk off of a pole
%patch $B963 $101AW
#Start shooting horizontally
%patch $727C $127AW
#Shooting check
%patch $74A7 $1298W
#Shooting horizontally on a pole sequence
%patch $24D06 $1298W %patch $24D24 $12B6W %patch $24D42 $118AW
#Start shooting up on pole
%patch $7275 $12F2W
#Shooting check
%patch $7506 $12F2W
#Shooting up on a pole sequence
%patch $24D60 $12F2W %patch $24D7E $1310W %patch $24D9C $118AW
#Start shooting down
%patch $7283 $132EW
#Shooting check
%patch $7528 $134CW
#Shooting down on a pole sequence
%patch $24DBA $134CW %patch $24DD8 $136AW %patch $24DF6 $118AW


Sprite Behavior

These are the values used by Keen's pole actions. There are several behaviors by Keen. Each responds to a different set of commands and conditions. Keen has a behavior for moving up or down poles as well as sitting still on them. When shooting on poles the first action of shooting uses Keen's shooting behavior while the second frame has no behavior (and so just sits there.)

Patches that alter how Keen behaves on pole tiles (For example whether he can shoot or jump while pole climbing) have their own section at the top of this page. These patches relate only to sprite action values.


Keen 4

Behaviors:
$0B800ED3RL #Keen on pole (Sit and wait for arrows to climb pole or shoot)
$0B800F89RL #Keen go up poles (Climb with arrow up or sit on pole)
$0B80101CRL #Going down poles (Climb down with arrow or sit on pole)
$0B801195RL #Shooting (Spawn Keen's shot in arrow direction)

Patch: Keen 4
#Keen sit on poles
%patch $2FD70 $0B800ED3RL
#Keen climb up poles
%patch $2FD8E $0B800F89RL %patch $2FDAC $0B800F89RL %patch $2FDCA $0B800F89RL
#Keen slide down poles
%patch $2FDE8 $0B80101CRL %patch $2FE06 $0B80101CRL %patch $2FE24 $0B80101CRL %patch $2FE42 $0B80101CRL
#Keen on pole shoot horizontally
%patch $2FE60 $0B801195RL %patch $2FE7E $00000000L
#Keen on pole shoot up
%patch $2FE9C $0B801195RL %patch $2FEBA $00000000L
#Keen on pole shoot down
%patch $2FED8 $0B801195RL %patch $2FEF6 $00000000L


Keen 5

Behaviors:
$0AAF1001RL #Keen on pole (Sit and wait for arrows to climb pole or shoot)
$0AAF10B7RL #Keen go up poles (Climb with arrow up or sit on pole)
$0AAF114ARL #Going down poles (Climb down with arrow or sit on pole)
$0AAF12C3RL #Shooting (Spawn Keen's shot in arrow direction)

Patch: Keen 5
#Keen on pole
%patch $3111E $0AAF1001RL
#Keen move up pole
%patch $3113C $0AAF10B7RL %patch $3115A $0AAF10B7RL %patch $31178 $0AAF10B7RL
#Keen move down pole
%patch $31196 $0AAF114ARL %patch $311B4 $0AAF114ARL %patch $311D2 $0AAF114ARL %patch $311F0 $0AAF114ARL
#Keen on pole shoot horizontally
%patch $3120D $0AAF12C3RL
#Keen shoot
%patch $3122C $00000000L
#Nothing
#Keen on pole shoot up
%patch $3124A $0AAF12C3RL
#Keen shoot
%patch $31268 $00000000L
#Nothing
#Keen on pole shoot down
%patch $31286 $0AAF12C3RL
#Keen shoot
%patch $312A4 $00000000L
#Nothing


Keen 6

Behaviors:
$0AA20EB4RL #Keen on pole (Sit and wait for arrows to climb pole or shoot)
$0AA20F6ARL #Keen go up poles (Climb with arrow up or sit on pole)
$0AA20FFDRL #Going down poles (Climb down with arrow or sit on pole)
$0AA21176RL #Shooting (Spawn Keen's shot in arrow direction)

Patch: Keen 6
#Keen on pole
%patch $31AA8 $0AA20EB4RL
#Keen move up pole
%patch $31AC6 $0AA20F6ARL %patch $31AE4 $0AA20F6ARL %patch $31B02 $0AA20F6ARL
#Keen move down pole
%patch $31B20 $0AA20FFDRL %patch $31B3E $0AA20FFDRL %patch $31B5C $0AA20FFDRL %patch $31B7A $0AA20FFDRL
#Keen on pole shoot horizontally
%patch $31B98 $0AA21176RL
#Keen shoot
%patch $31BB6 $00000000L
#Nothing
#Keen on pole shoot up
%patch $31BD4 $0AA21176RL
#Keen shoot
%patch $31BF2 $00000000L
#Nothing
#Keen on pole shoot down
%patch $31C10 $0AA21176RL
#Keen shoot
%patch $31C2E $00000000L
#Nothing


Keen Dreams

Behaviors:
$05E81408RL #Keen on pole (Sit and wait for arrows to climb pole or shoot)
$05E814ABRL #Keen go up poles (Climb with arrow up or sit on pole)
$05E81530RL #Going down poles (Climb down with arrow or sit on pole)
$05E815D8RL #Shooting (Spawn Keen's shot in arrow direction)

Patch: Keen Dreams
#Keen on pole
%patch $24C0A $05E81408RL
#Keen move up pole
%patch $24C28 $05E814ABRL %patch $24C46 $05E814ABRL %patch $24C64 $05E814ABRL
#Keen move down pole
%patch $24C82 $05E81530RL %patch $24CA0 $05E81530RL %patch $24CBE $05E81530RL %patch $24CDC $05E81530RL
#Keen on pole shoot horizontally
%patch $24CFA $00000000L
#Nothing
%patch $24D18 $05E815D8RL
#Keen shoot
%patch $24D36 $00000000L
#Nothing
#Keen on pole shoot up
%patch $24D54 $00000000L
#Nothing
%patch $24D72 $05E815D8RL
#Keen shoot
%patch $24D90 $00000000L
#Nothing
#Keen on pole shoot down
%patch $24DAE $00000000L
#Nothing
%patch $24DCC $05E815D8RL
#Keen shoot
%patch $24DEA $00000000L
#Nothing


Speed

Keen's climbing and descending pole speed is determined entirely by his animation motion and animation speed. Therefore, the faster Keen animates the faster he will climb poles. By default his downwards speed is three times that of his upwards and animation speeds are identical.

Keen does not move when shooting on poles.

Patch: Keen 4
#Keen on pole is still
%patch $2FD6C $0000W $0000W
#Keen climb poles speed
%patch $2FD8A $0000W $0008W %patch $2FDA8 $0000W $0008W %patch $2FDC6 $0000W $0008W
#Keen slide down poles speed
%patch $2FDE4 $0000W $0018W %patch $2FE02 $0000W $0018W %patch $2FE20 $0000W $0018W %patch $2FE3E $0000W $0018W
#Keen on pole shoot horizontally speed
%patch $2FE5C $0000W $0000W %patch $2FE7A $0000W $0000W
#Keen on pole shoot up speed
%patch $2FE98 $0000W $0000W %patch $2FEB6 $0000W $0000W
#Keen on pole shoot down speed
%patch $2FED4 $0000W $0000W %patch $2FEF2 $0000W $0000W

Patch: Keen 5
#Keen on pole is still
%patch $3111A $0000W $0000W
#Keen climb poles speed
%patch $31138 $0000W $0008W %patch $31156 $0000W $0008W %patch $31174 $0000W $0008W
#Keen slide down poles speed
%patch $31192 $0000W $0018W %patch $311B0 $0000W $0018W %patch $311CE $0000W $0018W %patch $311EC $0000W $0018W
#Keen on pole shoot horizontally speed
%patch $3120A $0000W $0000W %patch $31228 $0000W $0000W
#Keen on pole shoot up speed
%patch $31246 $0000W $0000W %patch $31264 $0000W $0000W
#Keen on pole shoot down speed
%patch $31282 $0000W $0000W %patch $312A0 $0000W $0000W

Patch: Keen 6
#Keen on pole is still
%patch $31AA4 $0000W $0000W
#Keen climb poles speed
%patch $31AC2 $0000W $0008W %patch $31AE0 $0000W $0008W %patch $31AFE $0000W $0008W
#Keen slide down poles speed
%patch $31B1C $0000W $0018W %patch $31B3A $0000W $0018W %patch $31B58 $0000W $0018W %patch $31B76 $0000W $0018W
#Keen on pole shoot horizontally speed
%patch $31B94 $0000W $0000W %patch $31BB2 $0000W $0000W
#Keen on pole shoot up speed
%patch $31BD0 $0000W $0000W %patch $31BEE $0000W $0000W
#Keen on pole shoot down speed
%patch $31C0C $0000W $0000W %patch $31C2A $0000W $0000W

Patch: Keen Dreams
#Keen on pole is still
%patch $24BE8 $0000W $0000W
#Keen climb poles speed
%patch $24C06 $0000W $0000W %patch $24C24 $0000W $0008W %patch $24C42 $0000W $0008W %patch $24C60 $0000W $0008W
#Keen slide down poles speed
%patch $24C7E $0000W $0018W %patch $24C9C $0000W $0018W %patch $24CBA $0000W $0018W %patch $24CD8 $0000W $0018W
#Keen on pole shoot horizontally speed
%patch $24CF6 $0000W $0000W %patch $24D14 $0000W $0000W %patch $24D32 $0000W $0000W
#Keen on pole shoot up speed
%patch $24D50 $0000W $0000W %patch $24D6E $0000W $0000W %patch $24D8C $0000W $0000W
#Keen on pole shoot down speed
%patch $24DAA $0000W $0000W %patch $24DC8 $0000W $0000W %patch $24DE6 $0000W $0000W


Sprite Collision

These are the values of the sprite actions Keen uses when climbing poles. Pole climbing Keen uses his second sprite collision also used by other actions such as gripping ledges. See the linked page for patches that affect that collision code.

Patch: Keen 4 sprite collision values
#Keen sit on poles
%patch $32B74 $0B801632RL
#Keen climb up poles
%patch $32B92 $0B801632RL %patch $32BB0 $0B801632RL %patch $32BCE $0B801632RL
#Keen slide down poles
%patch $32BEC $0B801632RL %patch $32C0A $0B801632RL %patch $32C28 $0B801632RL %patch $32C46 $0B801632RL
#Keen on pole shoot horizontally
%patch $32C64 $0B801632RL %patch $32C82 $0B801632RL
#Keen on pole shoot up
%patch $32CA0 $0B801632RL %patch $32CBE $0B801632RL
#Keen on pole shoot down
%patch $32CDC $0B801632RL %patch $32CFA $0B801632RL

Patch: Keen 5 sprite collision values
#Keen sit on poles
%patch $31122 $0AAF167FRL
#Keen go up pole
%patch $31140 $0AAF167FRL %patch $3115E $0AAF167FRL %patch $3117C $0AAF167FRL
#Keen go down pole
%patch $3119A $0AAF167FRL %patch $311B8 $0AAF167FRL %patch $311D6 $0AAF167FRL %patch $311F4 $0AAF167FRL
#Keen on pole shoot horizontally
%patch $31212 $0AAF167FRL %patch $31230 $0AAF167FRL
#Keen on pole shoot up
%patch $3124E $0AAF167FRL %patch $3126C $0AAF167FRL
#Keen on pole shoot down
%patch $3128A $0AAF167FRL %patch $312A8 $0AAF167FRL

Patch: Keen 6 sprite collision values
#Keen sit on poles
%patch $31AAC $0AA2154CRL
#Keen going up a pole
%patch $31ACA $0AA2154CRL %patch $31AE8 $0AA2154CRL %patch $31B06 $0AA2154CRL
#Keen going down a pole
%patch $31B24 $0AA2154CRL %patch $31B42 $0AA2154CRL %patch $31B60 $0AA2154CRL %patch $31B7E $0AA2154CRL
#Keen on pole shoot horizontally
%patch $31B9C $0AA2154CRL %patch $31BBA $0AA2154CRL
#Keen on pole shoot up
%patch $31BD8 $0AA2154CRL %patch $31BF6 $0AA2154CRL
#Keen on pole shoot down
%patch $31C14 $0AA2154CRL %patch $31C32 $0AA2154CRL

Patch: Keen Dreams sprite collision values
#Keen sit on poles
%patch $24C0E $05E817FCRL
#Keen going up a pole
%patch $24C2C $05E817FCRL %patch $24C4A $05E817FCRL %patch $24C68 $05E817FCRL
#Keen going down a pole
%patch $24C86 $05E817FCRL %patch $24CA4 $05E817FCRL %patch $24CC2 $05E817FCRL %patch $24CE0 $05E817FCRL
#Keen on pole shoot horizontally
%patch $24CFE $05E817FCRL %patch $24D1C $05E817FCRL %patch $24D3A $05E817FCRL
#Keen on pole shoot up
%patch $24D58 $05E817FCRL %patch $24D76 $05E817FCRL %patch $24D94 $05E817FCRL
#Keen on pole shoot down
%patch $24DB2 $05E817FCRL %patch $24DD0 $05E817FCRL %patch $24DEE $05E817FCRL


Animations

Pole related animations are cached with Keen's main animations whenever he is placed in a level. They can be broken into several groups. The first is Keen sitting on a pole, the second is climbing a pole, the first frame of which is the same as sitting on a pole. The third group is moving down a pole which consists of four unique animations.

Then there are three shooting on poles groups. Each uses the same animation(s) for its first and second frames and has different animations for whether Keen is facing left or right.

Patch: Keen 4
#Keen sitting on a pole
%patch $2FD60 $00BBW $00B4W %patch $2FD6A $0000W
#Wait for key press
#Keen going up a pole
%patch $2FD7E $00BBW $00B4W %patch $2FD88 $0008W %patch $2FD9C $00BCW $00B5W %patch $2FDA6 $0008W %patch $2FDBA $00BDW $00B6W %patch $2FDC4 $0008W
#Keen going down a pole
%patch $2FDD8 $00B7W $00B7W %patch $2FDE2 $0008W %patch $2FDF6 $00B8W $00B8W %patch $2FE00 $0008W %patch $2FE14 $00B9W $00B9W %patch $2FE1E $0008W %patch $2FE32 $00BAW $00BAW %patch $2FE3C $0008W
#Keen on pole shoot horizontally
%patch $2FE50 $00C2W $00C3W %patch $2FE5A $0009W
#Pause before shooting
%patch $2FE6E $00C2W $00C3W %patch $2FE78 $0006W
#Pause before going back
#Keen on pole shoot up
%patch $2FE8C $00BEW $00BFW %patch $2FE96 $0009W
#Pause before shooting
%patch $2FEAA $00BEW $00BFW %patch $2FEB4 $0006W
#Pause before going back
#Keen on pole shoot down
%patch $2FEC8 $00C1W $00C0W %patch $2FED2 $0009W
#Pause before shooting
%patch $2FEE6 $00C1W $00C0W %patch $2FEF0 $0006W
#Pause before going back

Patch: Keen 5
#Keen sitting on a pole
%patch $3110E $00A6W $009FW
#Sit on pole
%patch $31118 $0000W
#Wait for Keypress
#Keen going up a pole
%patch $3112C $00A6W $009FW %patch $31136 $0008W %patch $3114A $00A7W $00A0W %patch $31154 $0008W %patch $31168 $00A8W $00A1W %patch $31172 $0008W
#Keen going down a pole
%patch $31186 $00A2W $00A2W %patch $31190 $0008W %patch $311A4 $00A3W $00A3W %patch $311AE $0008W %patch $311C2 $00A4W $00A4W %patch $311CC $0008W %patch $311E0 $00A5W $00A5W %patch $311EA $0008W
#Keen on pole shoot horizontally
%patch $311FE $00ADW $00AEW %patch $31208 $0009W
#Pause before shot
%patch $3121C $00ADW $00AEW %patch $31226 $0006W
#Pause before stop shooting
#Keen on pole shoot up
%patch $3123A $00A9W $00AAW %patch $31244 $0009W
#Pause before shot
%patch $31258 $00A9W $00AAW %patch $31262 $0006W
#Pause before stop shooting
#Keen on pole shoot down
%patch $31276 $00ACW $00ABW %patch $31280 $0009W
#Pause before shot
%patch $31294 $00ACW $00ABW %patch $3129E $0006W
#Pause before stop shooting

Patch: Keen 6
#Keen sitting on a pole
%patch $31A98 $006DW $0066W %patch $31AA2 $0000W
#Wait for key press
#Keen going up a pole
%patch $31AB6 $006DW $0066W %patch $31AC0 $0008W %patch $31AD4 $006EW $0067W %patch $31ADE $0008W %patch $31AF2 $006FW $0068W %patch $31AFC $0008W
#Keen going down a pole
%patch $31B10 $0069W $0069W %patch $31B1A $0008W %patch $31B2E $006AW $006AW %patch $31B38 $0008W %patch $31B4C $006BW $006BW %patch $31B56 $0008W %patch $31B6A $00C$W $006CW4 %patch $31B74 $0008W
#Keen on pole shoot horizontally
%patch $31B88 $0074W $0075W %patch $31B92 $0009W
#Pause before shooting
%patch $31BA6 $0074W $0075W %patch $31BB0 $0006W
#Pause before going back
#Keen on pole shoot up
%patch $31BC4 $0070W $0071W %patch $31BCE $0009W
#Pause before shooting
%patch $31BE2 $0070W $0071W %patch $31BEC $0006W
#Pause before going back
#Keen on pole shoot down
%patch $31C00 $0073W $0072W %patch $31C0A $0009W
#Pause before shooting
%patch $31C1E $0073W $0072W %patch $31C28 $0006W
#Pause before going back

Patch: Keen Dreams
#Keen sitting on a pole
%patch $24BFA $0091W $008AW %patch $24C04 $0000W
#Wait for key press
#Keen going up a pole
%patch $24C18 $0091W $008AW %patch $24C22 $0008W %patch $24C36 $0092W $008BW %patch $24C40 $0008W %patch $24C54 $0093W $008CW %patch $24C5E $0008W %patch $24C72 $008DW $008DW %patch $24C7C $0008W
#Keen going down a pole
%patch $24C90 $008EW $008EW %patch $24C9A $0008W %patch $24CAE $008FW $008FW %patch $24CB8 $0008W %patch $24CCC $0090W $0090W %patch $24CD6 $0008W
#Keen on pole shoot horizontally
%patch $24CEA $0094W $0096W %patch $24CF4 $0008W
#Pause before shooting
%patch $24D08 $0095W $0097W %patch $24D12 $0001W %patch $24D26 $0095W $0097W %patch $24D30 $000AW
#Pause before going back
#Keen on pole shoot up
%patch $24D44 $0098W $009DW %patch $24D4E $0008W
#Pause before shooting
%patch $24D62 $0099W $009EW %patch $24D6C $0001W %patch $24D80 $0099W $009EW %patch $24D8A $000AW
#Pause before going back
#Keen on pole shoot down
%patch $24D9E $009FW $009AW %patch $24DA8 $0008W
#Pause before shooting
%patch $24DBC $00A0W $009BW %patch $24DC6 $0001W %patch $24DDA $00A0W $009BW %patch $24DE4 $000AW
#Pause before going back


Sounds

There are several sounds that relate to Keen being on poles. The first is played when Keen jumps off a pole, it can also be considered a jump sound. The second is played when Keen moves left or right at the top of a pole and falls off. The third is played when Keen moves down off the bottom of a pole. All three sounds can be blocked.

Patch: Keen 4
#Keen on poles sounds
%patch $C690 $02
#Keen jump off pole sound
%patch $C76A $14
#Keen move l/r off a pole top sound
%patch $C86B $14
#Keen moves of pole end sound
#Don't play sounds
%patch $C68F $EB $0A
#Don't play Keen jump off pole sound
%patch $C769 $EB $0A
#Don't play Keen move l/r off a pole top sound
%patch $C86A $EB $0A
#Don't play Keen moves of pole end sound

Patch: Keen 5
#Keen on poles sounds
%patch $BAAE $02
#Keen jump off pole sound
%patch $BB88 $14
#Keen move l/r off a pole top sound
%patch $BC89 $14
#Keen moves of pole end sound
#Don't play sounds
%patch $BAAD $EB $0A
#Don't play Keen jump off pole sound
%patch $BB87 $EB $0A
#Don't play Keen move l/r off a pole top sound
%patch $BC88 $EB $0A
#Don't play Keen moves of pole end sound

Patch: Keen 6
#Keen on poles sounds
%patch $B891 $02
#Keen jump off pole sound
%patch $B96B $14
#Keen move l/r off a pole top sound
%patch $BA6C $14
#Keen moves of pole end sound
#Don't play sounds
%patch $B890 $EB $0A
#Don't play Keen jump off pole sound
%patch $B96A $EB $0A
#Don't play Keen move l/r off a pole top sound
%patch $BA6B $EB $0A
#Don't play Keen moves of pole end sound

Patch: Keen Dreams
#Keen on poles sounds
%patch $7204 $02
#Keen jump off pole sound
%patch $7314 $19
#Keen move l/r off a pole top sound
%patch $73F2 $19
#Keen moves of pole end sound
#Don't play sounds
%patch $7203 $EB $09
#Don't play Keen jump off pole sound
%patch $7313 $EB $09
#Don't play Keen move l/r off a pole top sound
%patch $73F1 $EB $09
#Don't play Keen moves of pole end sound


Clipping

Keen's clipping is set to 0 when he jumps onto poles, allowing him to move vertically through solid ground with poles going through it. It must be restored to a value of 1 when he leaves a pole. This can happen in several ways.

The first is by moving down a pole onto solid ground, which can happen if Keen is on a pole that goes right to the floor.

Patch: Pole clipping
#Pole clipping -Keen 4
%patch $B921 $0000W
#No clipping when grabbing a pole
%patch $D8C1 $0001W
#Clipping restored when moving down to ground.
#Pole clipping -Keen 5
%patch $AC03 $0000W
#No clipping when grabbing a pole
#Pole clipping -Keen 6
%patch $AB37 $0000W
#No clipping when grabbing a pole
#Pole clipping -Keen Dreams
%patch $6C8B $0000W
#No clipping when grabbing a pole


Sprite-tile interaction

Keen uses two different tile interactions when on poles. The first is used for Keen 'floating' in various situations and is used when Keen is sitting on a pole or moving up it. The second is unique and used for Keen moving down a pole and involves checks that let him fall off of pole bottoms.

Patch: Keen 4
#Sitting on poles
%patch $2FD78 $0B801A7BRL
#Move up poles
%patch $2FD96 $0B801A7BRL %patch $2FDB4 $0B801A7BRL %patch $2FDD2 $0B801A7BRL
#Move down poles
%patch $2FDF0 $0B802071RL %patch $2FE0E $0B802071RL %patch $2FE2C $0B802071RL %patch $2FE4A $0B802071RL
#Shoot l/r on poles
%patch $2FE68 $0B801A7BRL %patch $2FE86 $0B801A7BRL
#Shoot up on poles
%patch $2FEA4 $0B801A7BRL %patch $2FEC2 $0B801A7BRL
#Shoot down on poles
%patch $2FEE0 $0B801A7BRL %patch $2FEFE $0B801A7BRL

Patch: Keen 5
#Sitting on poles
%patch $31126 $0AAF1A9FRL
#Move up poles
%patch $31144 $0AAF1A9FRL %patch $31162 $0AAF1A9FRL %patch $31180 $0AAF1A9FRL
#Move down poles
%patch $3119E $0AAF2145RL %patch $311BC $0AAF2145RL %patch $311DA $0AAF2145RL %patch $311F8 $0AAF2145RL
#Shoot l/r on poles
%patch $31216 $0AAF1A9FRL %patch $31234 $0AAF1A9FRL
#Shoot up on poles
%patch $31252 $0AAF1A9FRL %patch $31270 $0AAF1A9FRL
#Shoot down on poles
%patch $3128E $0AAF1A9FRL %patch $312AC $0AAF1A9FRL

Patch: Keen 6
#Sitting on poles
%patch $31AB0 $11171955RL
#Move up poles
%patch $31ACE $11171955RL %patch $31AEC $11171955RL %patch $31B0A $11171955RL
#Move down poles
%patch $31B28 $11171FC8RL %patch $31B46 $11171FC8RL %patch $31B64 $11171FC8RL %patch $31B82 $11171FC8RL
#Shoot l/r on poles
%patch $31BA0 $11171955RL %patch $31BBE $11171955RL
#Shoot up on poles
%patch $31BDC $11171955RL %patch $31BFA $11171955RL
#Shoot down on poles
%patch $31C18 $11171955RL %patch $31C36 $11171955RL

Patch: Keen Dreams
#Sitting on poles
%patch $24C12 $05E81ABARL
#Move up poles
%patch $24C30 $05E81ABARL %patch $24C4E $05E81ABARL %patch $24C6C $05E81ABARL
#Move down poles
%patch $24C8A $05E81ABARL %patch $24CA8 $05E81ABARL %patch $24CC6 $05E81ABARL %patch $24CE4 $05E81ABARL
#Shoot l/r on poles
%patch $24D02 $05E81ABARL %patch $24D20 $05E81ABARL %patch $24D3E $05E81ABARL
#Shoot up on poles
%patch $24D5C $05E81ABARL %patch $24D7A $05E81ABARL %patch $24D98 $05E81ABARL
#Shoot down on poles
%patch $24DB6 $05E81ABARL %patch $24DD4 $05E81ABARL %patch $24DF2 $05E81ABARL


Action type

Keen's pole action types are interesting. When sitting still on a pole he must react quickly to input but isn't moving and so is type 2. When moving up poles he also must react quickly, but also move, so these actions are type 4. When moving down poles he must move smoothly but doesn't react quickly using type 1 actions.

When shooting on a pole Keen doesn't need to move or react so uses type 0 actions.

Patch: Keen 4
#Sitting on poles
%patch $2FD64 $0002W
#Move up poles
%patch $2FD82 $0004W %patch $2FDA0 $0004W %patch $2FDBE $0004W
#Move down poles
%patch $2FDDC $0001W %patch $2FDFA $0001W %patch $2FE18 $0001W %patch $2FE36 $0001W
#Shoot l/r on poles
%patch $2FE54 $0000W %patch $2FE72 $0000W
#Shoot up on poles
%patch $2FE90 $0000W %patch $2FEAE $0000W
#Shoot down on poles
%patch $2FECC $0000W %patch $2FEEA $0000W

Patch: Keen 5
#Sitting on poles
%patch $31112 $0002W
#Move up poles
%patch $31130 $0004W %patch $3114E $0004W %patch $3116C $0004W
#Move down poles
%patch $3118A $0001W %patch $311A8 $0001W %patch $311C6 $0001W %patch $311E4 $0001W
#Shoot l/r on poles
%patch $31202 $0000W %patch $31220 $0000W
#Shoot up on poles
%patch $3123E $0000W %patch $3125C $0000W
#Shoot down on poles
%patch $3127A $0000W %patch $31298 $0000W

Patch: Keen 6
#Sitting on poles
%patch $31A9C $0002W
#Move up poles
%patch $31ABA $0004W %patch $31AD8 $0004W %patch $31AF6 $0004W
#Move down poles
%patch $31B14 $0001W %patch $31B32 $0001W %patch $31B50 $0001W %patch $31B6E $0001W
#Shoot l/r on poles
%patch $31B8C $0000W %patch $31BAA $0000W
#Shoot up on poles
%patch $31BC8 $0000W %patch $31BE6 $0000W
#Shoot down on poles
%patch $31C04 $0000W %patch $31C22 $0000W

Patch: Keen Dreams
#Sitting on poles
%patch $24BFE $0002W
#Move up poles
%patch $24C1C $0004W %patch $24C3A $0004W %patch $24C58 $0004W
#Move down poles
%patch $24C76 $0001W %patch $24C94 $0001W %patch $24CB2 $0001W %patch $24CD0 $0001W
#Shoot l/r on poles
%patch $24CEE $0000W %patch $24D0C $0000W %patch $24D2A $0000W
#Shoot up on poles
%patch $24D48 $0000W %patch $24D66 $0000W %patch $24D84 $0000W
#Shoot down on poles
%patch $24DA2 $0000W %patch $24DC0 $0000W %patch $24DDE $0000W


Deprotect and stick to ground

Keen has no need for either of these variables and so uses a value of 0 for both in all of its actions.

Patch: Keen 4
#Sitting on poles
%patch $2FD66 $0000W $0000W
#Move up poles
%patch $2FD84 $0000W $0000W %patch $2FDA2 $0000W $0000W %patch $2FDC0 $0000W $0000W
#Move down poles
%patch $2FDDE $0000W $0000W %patch $2FDFC $0000W $0000W %patch $2FE1A $0000W $0000W %patch $2FE38 $0000W $0000W
#Shoot l/r on poles
%patch $2FE56 $0000W $0000W %patch $2FE74 $0000W $0000W
#Shoot up on poles
%patch $2FE92 $0000W $0000W %patch $2FEB0 $0000W $0000W
#Shoot down on poles
%patch $2FECE $0000W $0000W %patch $2FEEC $0000W $0000W

Patch: Keen 5
#Sitting on poles
%patch $31114 $0000W $0000W
#Move up poles
%patch $31132 $0000W $0000W %patch $31150 $0000W $0000W %patch $3116E $0000W $0000W
#Move down poles
%patch $3118C $0000W $0000W %patch $311AA $0000W $0000W %patch $311C8 $0000W $0000W %patch $311E6 $0000W $0000W
#Shoot l/r on poles
%patch $31204 $0000W $0000W %patch $31222 $0000W $0000W
#Shoot up on poles
%patch $31240 $0000W $0000W %patch $3125E $0000W $0000W
#Shoot down on poles
%patch $3127C $0000W $0000W %patch $3129A $0000W $0000W

Patch: Keen 6
#Sitting on poles
%patch $31A9E $0000W $0000W
#Move up poles
%patch $31ABC $0000W $0000W %patch $31ADA $0000W $0000W %patch $31AF8 $0000W $0000W
#Move down poles
%patch $31B16 $0000W $0000W %patch $31B34 $0000W $0000W %patch $31B52 $0000W $0000W %patch $31B70 $0000W $0000W
#Shoot l/r on poles
%patch $31B8E $0000W $0000W %patch $31BAC $0000W $0000W
#Shoot up on poles
%patch $31BCA $0000W $0000W %patch $31BE8 $0000W $0000W
#Shoot down on poles
%patch $31C06 $0000W $0000W %patch $31C24 $0000W $0000W

Patch: Keen Dreams
#Sitting on poles
%patch $24C00 $0000W $0000W
#Move up poles
%patch $24C1E $0000W $0000W %patch $24C3C $0000W $0000W %patch $24C5A $0000W $0000W
#Move down poles
%patch $24C78 $0000W $0000W %patch $24C96 $0000W $0000W %patch $24CB4 $0000W $0000W %patch $24CD2 $0000W $0000W
#Shoot l/r on poles
%patch $24CF0 $0000W $0000W %patch $24D0E $0001W $0000W %patch $24D2C $0000W $0000W
#Shoot up on poles
%patch $24D4A $0000W $0000W %patch $24D68 $0001W $0000W %patch $24D86 $0000W $0000W
#Shoot down on poles
%patch $24DA4 $0000W $0000W %patch $24DC2 $0001W $0000W %patch $24DE0 $0000W $0000W