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.


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.

Patch: Keen 4
#Pole tile property check when starting pole climbing
%patch $B8FC $0001W $75

Patch: Keen 5
#Pole tile property check when starting pole climbing
%patch $ABDE $0001W $75


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 patch 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.)

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

Patch: Keen 4
#Disable poles entirely
%patch $B8A0 $33 $C0 $5E $8B $E5 $5D $CB
#Disable grabbing poles while jumping\falling
%patch $C4BC $EB

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


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


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

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.

For a complete list of Keen's actions see Patch:Keen (Keen 4)#Sprite_Actions.

Patch: Keen 4
#Be disturbed by
%patch $CE54 $11A2W
#Platforms
%patch $CE8C $11A2W
#Bounders


Sprite Behavior

This section contain patches that relate to what Keen can do while on poles.


Behavior values

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.)

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
%patch $3111D $0AAF1001RL 
#Keen on pole
%patch $3113C $0AAF10B7RL
#Keen move up pole
%patch $3115A $0AAF10B7RL
#Keen move up pole
%patch $31178 $0AAF10B7RL
#Keen move up pole
%patch $31196 $0AAF114ARL
#Keen move down pole
%patch $311B4 $0AAF114ARL
#Keen move down pole
%patch $311D2 $0AAF114ARL
#Keen move down pole
%patch $311F0 $0AAF114ARL
#Keen move down pole
#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


Disable shooting or jumping on poles

These patches disable Keen's ability to jump off poles, shoot on poles or both. (Keen can leave poles by turning left\right at the top of poles or moving off the bottom, so disabling jumping does not lock him onto poles permanently.) See also Patch:Keen shooting (Galaxy). Keen can still shoot while doing other things.

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


Speed

Keen's climbing and descending pole speed is determined entirely by his animation motion and animation speed. The faster Keen animates the faster he will climb poles. (This is what differentiates his slow climbs from his rapid descents.)

Patch: Keen 4
#Keen climb poles speed
%patch $2FD8A $0000W $0008W %patch $2FDA8 $0000W $0008W %patch $2FDC6 $0000W $0008W
#Keen slide down poles speed
%patch $2FDE4 $0000W $0008W %patch $2FE02 $0000W $0008W %patch $2FE20 $0000W $0008W %patch $2FE3E $0000W $0008W


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 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 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 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


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 on a pole; Stay still
%patch $2FD60 $00BBW $00B4W %patch $2FD6A $0000W
#Wait for key press
#Keen going up a pole
%patch $2FD7E $00BBW $00B4W %patch $2FD88 $0008W
#Animation speed
%patch $2FD9C $00BCW $00B5W %patch $2FDA6 $0008W
#Animation speed
%patch $2FDBA $00BDW $00B6W %patch $2FDC4 $0008W
#Animation speed
#Keen going down a pole
%patch $2FDD8 $00B7W $00B7W %patch $2FDE2 $0008W
#Animation speed
%patch $2FDF6 $00B8W $00B8W %patch $2FE00 $0008W
#Animation speed
%patch $2FE14 $00B9W $00B9W %patch $2FE1E $0008W
#Animation speed
%patch $2FE32 $00BAW $00BAW %patch $2FE3C $0008W
#Animation speed
#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
#Sit on pole
%patch $3110E $00A6W $009FW
#Sit on pole
%patch $31118 $0000W
#Wait for Keypress
#Go up pole
%patch $3112C $00A6W $009FW
#Go up pole
%patch $31136 $0008W
#Animation speed
%patch $3114A $00A7W $00A0W
#Go up pole
%patch $31154 $0008W
#Animation speed
%patch $31168 $00A8W $00A1W
#Go up pole
%patch $31172 $0008W
#Animation speed
#Go down pole
%patch $31186 $00A2W $00A2W
#Go down pole
%patch $31190 $0008W
#Animation speed
%patch $311A4 $00A3W $00A3W
#Go down pole
%patch $311AE $0008W
#Animation speed
%patch $311C2 $00A4W $00A4W
#Go down pole
%patch $311CC $0008W
#Animation speed
%patch $311E0 $00A5W $00A5W
#Go down pole
%patch $311EA $0008W
#Animation speed
#Keen on pole shoot horizontally
%patch $311FE $00ADW $00AEW
#Pole shoot l/r
%patch $31208 $0009W
#Pause before shot
%patch $3121C $00ADW $00AEW
#Pole shoot l/r
%patch $31226 $0006W
#Pause before stop shooting
#Keen on pole shoot up
%patch $3123A $00A9W $00AAW
#Pole shoot up
%patch $31244 $0009W
#Pause before shot
%patch $31258 $00A9W $00AAW
#Pole shoot up
%patch $31262 $0006W
#Pause before stop shooting
#Keen on pole shoot down
%patch $31276 $00ACW $00ABW
#Pole shoot down
%patch $31280 $0009W
#Pause before shot
%patch $31294 $00ACW $00ABW
#Pole shoot down
%patch $3129E $0006W
#Pause before stop shooting


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