Patch:Fleex

From KeenWiki
Jump to navigation Jump to search

This page covers patches relating to the Fleex in Keen 6. The Fleex are blue, many-eyed enemies with clawed hands. They are notable as the designers of the Bloog's buildings.


Sprite Type

Fleex use sprite type 10. This is not used by any other sprite type and does not affect any other sprite type either.

Keen 6

#Fleex sprite type
%patch $11D13 $0A


Sprite Actions

Fleex have a basic action scheme. They are spawned walking and will continue this two frame loop until they randomly chase Keen. Chasing is a four frame sequence that ends with the Fleex walking in Keen's direction.

If the Fleex is shot, it may stun, and remain stunned. If however it has not be hit enough times it will either walk towards Keen or look for Keen, a two step sequence that leads to it chasing in Keen's direction.

Actions:
$2C78W  #Fleex walking 1
$2C96W  #Fleex walking 2
$2CB4W  #Fleex chasing 1
$2CD2W  #Fleex chasing 2
$2CF0W  #Fleex chasing 3
$2D0EW  #Fleex chasing 4
$2D2CW  #Fleex looking 1
$2D4AW  #Fleex looking 2
$2D68W  #Fleex stunned

Keen 6

#When spawned
%patch $11D5C [$2C78W]

#While walking
%patch $339C4 [$2C96W]
%patch $339E2 [$2C78W]

#Look for Keen (Randomly when walking)
%patch $11D8D [$2D2CW]

#While chasing
%patch $33A00 [$2CD2W]
%patch $33A1E [$2CF0W]
%patch $33A3C [$2D0EW]
%patch $33A5A [$2C78W]

#While looking
%patch $33A78 [$2D4AW]
%patch $33A96 [$2CB4W]

#When shot but not stunned
%patch $11E3C [$2C78W] #Walk
%patch $11E19 [$2D2CW] #Look for Keen

#When shot and stunned
%patch $11DED [$2D68W]

#While stunned
%patch $33AB4 [$0000W]


Sprite Behavior

The Fleex has two behaviors, walking and looking. The first is used when the Fleex is walking. It makes the Fleex turn in Keen's direction (chase him) and also randomly search. The second is used when searching and makes the Fleex chase Keen after searching.

Behaviors:
$11CF0083RL #Fleex walk
$11CF00BCRL #Fleex look for Keen

Keen 6

#Walking
%patch $339B8 $11CF0083RL
%patch $339D6 $11CF0083RL

#Chasing
%patch $339F4 $00000000L
%patch $33A12 $00000000L
%patch $33A30 $00000000L
%patch $33A4E $00000000L

#Looking for Keen
%patch $33A6C $00000000L
%patch $33A8A $11CF00BCRL

#Stunned
%patch $33AA8 $08F41765RL


Fleex doesn't look for Keen, just chases

This patch stops the Fleex from randomly looking for Keen when walking. It simply chases Keen and never stops.

Keen 6

#Fleex just chases Keen
%patch $11D82 $EB


Seeking Keen

The Fleex will chase after Keen when walking. It will also randomly go to a 'looking' action, which also seeks Keen.

Keen 6

#Seek Keen when walking:
%patch $11D9F [$FFFFW]
%patch $11DA4 [$0001W]

#Randomly seek Keen when looking:
%patch $11DC5 [$FFFFW]
%patch $11DC0 [$0001W]


Stop Fleex chasing Keen while walking

This patch makes the Fleex search for Keen all the time instead of chasing him while walking. This slows it down considerably. (To make the Fleex just walk back and forth you will need to change its behavior to nothing, see below.)

Stop Fleex chasing Keen while walking

#Stop Fleex chasing Keen while walking
%patch $11D95 $5E $5D $CB


Stop Fleex searching for Keen

This patch stops the Fleex from searching for Keen in any way. This makes it simply chase Keen all the time

Stop Fleex searching for Keen

#Stop Fleex searching for Keen
%patch $11D80 $24


Speed and Jump Height

The Fleex's speed is defined entirely in its animation motion. Interestingly its motion is the same when walking or chasing, but when chasing it animates (and thus moves) faster.

Keen 6 Animation motion

#Walking
%patch $339B4 [$0080W $0000W]
%patch $339D2 [$0080W $0000W]

#Chasing
%patch $339F0 [$0080W $0000W]
%patch $33A0E [$0080W $0000W]
%patch $33A2C [$0080W $0000W]
%patch $33A4A [$0080W $0000W] 

#Looking
%patch $33A68 [$0000W $0000W]
%patch $33A86 [$0000W $0000W]

#Stunned
%patch $33AA4 [$0000W $0000W]


Sprite Collision

The Fleex has a simple collision, it is deadly and stunnable, taking several shots to defeat.


Collision values

The Fleex always uses the same collision, except when stunned. The Fleex takes four shots to defeat.

Keen 6 collision values

#Walking
%patch $339BC $11CF00DDRL #Fleex
%patch $339DA $11CF00DDRL #Fleex

#Chasing
%patch $339F8 $11CF00DDRL #Fleex
%patch $33A16 $11CF00DDRL #Fleex
%patch $33A34 $11CF00DDRL #Fleex
%patch $33A52 $11CF00DDRL #Fleex

#Looking for Keen
%patch $33A70 $11CF00DDRL #Fleex
%patch $33A8E $11CF00DDRL #Fleex

#Stunned
%patch $33AAC $00000000L  #Nothing


Fleex doesn't flash when shot

This patch stops the Fleex from flashing white when shot but not stunned.

Keen 6

#Fleex doesn't flash when shot
%patch $11E03 $EB $03


Sprite strength

The Fleex takes four hits to stun.

Sprite strength

#Fleex's strength
%patch $11D6F [$0004W]


Animations

The Fleex animations are quite simple; the same frames are used when walking or chasing, but notice the animation speeds are lower (that is, faster animation and faster speed) when chasing. The looking animation speeds govern how long the Fleex pauses while looking.

Keen 6 Animations

#Cache
%patch $32450 [$00EFW] #Fleex cache start
%patch $324A0 [$00F5W] #Fleex cache end

#Walking
%patch $339A8 $00F1W $00EFW
%patch $339B2 $0007W        #Animation speed
%patch $339C6 $00F2W $00F0W 
%patch $339D0 $0007W        #Animation speed

#Chasing
%patch $339E4 $00F1W $00EFW #Fleex chase 1
%patch $339EE $0007W        #Animation speed
%patch $33A02 $00F2W $00F0W #Fleex chase 2
%patch $33A0C $0007W        #Animation speed
%patch $33A20 $00F1W $00EFW #Fleex chase 3
%patch $33A2A $0007W        #Animation speed
%patch $33A3E $00F2W $00F0W #Fleex chase 4 (Go to walk)
%patch $33A48 $000AW        #Animation speed

#Looking
%patch $33A5C $00F3W $00F3W
%patch $33A66 $003CW        #Animation speed
%patch $33A7A $00F4W $00F4W
%patch $33A84 $003CW        #Animation speed

#Fleex stunned
%patch $33A98 $00F5W $00F5W
%patch $33AA2 $0000W        #Animation speed


Sprite positioning

The Fleex spawns 24 pixels or 2.5 tiles down from where it is placed. This is vital for making it walk on the ground and so must be changed if the sprite's height is changed.

Keen 6

#Spawn height
%patch $11D2F [$FD80W] #2.5 tiles down


Clipping and foreground

The Fleex uses a foreground variable of 0, which places it behind foreground tiles, possibly useful when it walks into walls.

Fleex foreground variable

#Fleex foreground variable
%patch $11D1D [$0000W]


Probability and randomness

The Fleex has a 50:50 chance of moving right or left when initially spawned.

Keen 6 randomness

#Chance of spawning moving left
%patch $11D3A [$80]


Sprite-tile interaction

The Fleex has its own unique tile interaction when doing anything aside from being stunned. The stunned Fleex uses the 'stunned sprite' tile interaction.

Sprite tile interactions

#Walking
%patch $339C0 $0EFC1A7FRL
%patch $339DE $0EFC1A7FRL

#Chasing
%patch $339FC $0EFC1A7FRL
%patch $33A1A $0EFC1A7FRL
%patch $33A38 $0EFC1A7FRL
%patch $33A56 $0EFC1A7FRL

#Looking for Keen
%patch $33A74 $0EFC1A7FRL
%patch $33A92 $0EFC1A7FRL

#Stunned
%patch $33AB0 $08F419AFRL


Action type

The Fleex's actions are quite basic and thus type 0. As it needs to fall smoothly the stunned Fleex action is type 2.

Sprite action types

#Walking
%patch $339AC [$0000W]
%patch $339CA [$0000W]

#Chasing
%patch $339E8 [$0000W]
%patch $33A06 [$0000W]
%patch $33A24 [$0000W]
%patch $33A42 [$0000W]

#Looking for Keen
%patch $33A60 [$0000W]
%patch $33A7E [$0000W]

#Stunned
%patch $33A9C [$0002W]


Deprotect and stick to ground

The Fleex needs to stick to the ground while walking and thus uses a value of 1 for this variable in its walking actions.

Sprite deprotect, stick

#Walking
%patch $339AE [$0000W $0001W]
%patch $339CC [$0000W $0001W]

#Chasing
%patch $339EA [$0000W $0001W]
%patch $33A08 [$0000W $0001W]
%patch $33A26 [$0000W $0001W]
%patch $33A44 [$0000W $0001W]

#Looking for Keen
%patch $33A62 [$0000W $0001W]
%patch $33A80 [$0000W $0001W]

#Stunned
%patch $33A9E [$0000W $0000W]