From KeenWiki
Jump to navigation Jump to search

This page covers patches relating to Molly in Keen 6. She is Mortimer's older sister and also Keen's baby-sitter. She has an important part in the plot of Keen 6. Contacting Molly will cause the game to be won. Related sprites are covered on Patch:Keen 6 map items.

Sprite Type

Molly uses sprite type 12 which is used only by Molly. This may be part of what triggers the ending sequence so changing it may result in the game being unwinnable.

Keen 6

#Molly's sprite type
%patch $1007F $0C

Sprite Actions

Molly's actions are quite simple. She is spawned on the first frame of her struggling loop which is a four frame loop she remains in indefinitely. Note that her third and fourth actions are exactly the same as her first and second, which means these two can be eliminated without any side effects.

$1D60W  #Molly 1
$1D7EW  #Molly 2
$1D9CW  #Molly 3
$1DBAW  #Molly 4

Keen 6

#Molly spawned
%patch $100C8 [$1D60W]

#Struggle loop
%patch $32AAC [$1D7EW]
%patch $32ACA [$1D9CW]
%patch $32AE8 [$1DBAW]
%patch $32B06 [$1D60W]

Sprite Behavior

Molly does not have a behavior by default. She just sits there.


#Molly struggle
%patch $32AA0 $00000000L
%patch $32ABE $00000000L
%patch $32ADC $00000000L
%patch $32AFA $00000000L


Molly does not move at all. As such her animation motion is unused. Interestingly Molly was meant to move, this can be seen by the fact that she is given a random direction to move when spawned.

Molly's initial directions

%patch $100B1 [$0001W] #Initially move right
%patch $100BC [$FFFFW] #Or left
%patch $100B1 [$0001W] #And down

Animation Motion

#Molly struggle
%patch $32A9C [$0000W $0000W]
%patch $32ABA [$0000W $0000W]
%patch $32AD8 [$0000W $0000W]
%patch $32AF6 [$0000W $0000W]

Sprite positioning

Molly is spawned half a tile off the ground by default. This is insufficient however and causes her to clip through the doors she's behind, a notable bug. This is easily fixed however.

Keen 6

#Molly's spawn height
%patch $1009B [$FF80W]

Fix clip bug

This adjust Molly's spawning height to a value that stops her clipping bug occurring in version 1.4 of the game.

Keen 6

#Molly doesn't clip through doors
%patch $1009B [$FEF0W]

Sprite Collision

Molly does not have her own unique collision, instead she uses the shared collision used by Keen 6's special items. This is part of what causes the game to be won when she is contacted and changing it will make the game unwinnable.

Keen 6 collision values

#Molly's collision
%patch $32AA4 $0EFC1053RL #Special item
%patch $32AC2 $0EFC1053RL #Special item
%patch $32AE0 $0EFC1053RL #Special item
%patch $32AFE $0EFC1053RL #Special item


Molly's animations are excessively simple; she has four frames of which the second two are exact copies of the first two.

Keen 6

%patch $3245A [$01B1W] #Molly cache start
%patch $324AA [$01B2W] #Molly cache end

#Molly's animations
%patch $32A90 $01B1W $01B1W
%patch $32A9A $0014W        #Animation speed
%patch $32AAE $01B2W $01B2W
%patch $32AB8 $0028W        #Animation speed
%patch $32ACC $01B1W $01B1W
%patch $32AD6 $0028W        #Animation speed
%patch $32AEA $01B2W $01B2W
%patch $32AF4 $0014W        #Animation speed

Clipping and foreground

Molly has a foreground variable of 0; meaning she appears behind all sprites and foreground tiles.

Keen 6

#Molly foreground variable
%patch $10089 [$0000W]

Give Molly clipping

This patch converts Molly's initial vertical direction into clipping. (It is thus incompatible with her vertical direction patch.) Since vertical direction is not used by default this should have no side effects. The value here gives her a clipping of 1, the same as she is given by default.

Keen 6

#Molly has clipping
%patch $10088 $06 [$0001W]

Sprite-tile interaction

Molly uses a generic tile interaction code to simply display her sprite.

Keen 6 collision values

#Molly's collision
%patch $32AA8 $08F4180ARL #Special item
%patch $32AC6 $08F4180ARL #Special item
%patch $32AE4 $08F4180ARL #Special item
%patch $32B02 $08F4180ARL #Special item

Probability and randomness

Molly was initially meant to move back and forth. Reflecting this she can initially face either left or right with a 50:50 chance of both. This has no effect at all on the default Molly.

Keen 6

#Chance of initially facing left
%patch $100A6 $80

Action type

Molly's actions are very basic and thus type 0.

Sprite action types

%patch $32A94 [$0000W]
%patch $32AB2 [$0000W]
%patch $32AD0 [$0000W]
%patch $32AEE [$0000W]

Deprotect and stick to ground

Molly has no need for either of these variables and so has a value of 0 for both in all of her actions.

Sprite deprotect, stick

%patch $32A96 [$0000W $0000W]
%patch $32AB4 [$0000W $0000W]
%patch $32AD2 [$0000W $0000W]
%patch $32AF0 [$0000W $0000W]

Sprite spawn code

Only partial spawning code for Molly is available.

In the spawning code the last blue highlighted value is the sprite action the sprite uses as it proceeds to act in-level. $C7 $02 $xxxxW sets the sprite activity, $C7 $07 $xxxxW sets the sprite type, $C7 $20 $xxxxW sets the foreground value. Finally $D3 $E0 $05 $xxxx is how far down (Or more usually up) the sprite is spawned from where it is placed. This is necessary for sprites that walk on the ground as they can only be placed in the level at multiples of 16 pixels high while their actual height can be anything.

Molly always starts the level moving down, moving in a random horizontal direction. $C7 $47 $10 $xxxxW is the vertical direction the sprite starts moving in, either $0001W (Facing down), $FFFFW (Facing up) or $0000W (Neither, never used.) $C7 $47 $0E $xxxxW is the horizontal direction.

Keen 6

#Molly spawning code
%patch $1006B $55 $8B $EC $33 $C0 $50 $9A $069A1E25RL     $83 $C4 $02 $8B $1E
              $66 $A9 $C7 $07 [$000CW]  $C7 $47 $02 [$0001W]  $C7 $47 $20 [$0000W]
              $8B $46 $06 $B1 $08 $D3 $E0 $89 $47 $0A $8B $46 $08 $D3 $E0 $05
              [$FF80W] $89 $47 $0C $9A $1CF30034RL      $3D [$0080W]  $7D $0B $8B
              $1E $66 $A9 $C7 $47 $0E [$0001W]  $EB $09 $8B $1E $66 $A9 $C7 $47
              $0E [$FFFFW]  $8B $1E $66 $A9 $C7 $47 $10 [$0001W]  $B8 [$1D60W]  $50
              $53 $9A $08F41219RL     $83 $C4 $04 $5D $CB