Patch:V Card

From KeenWiki
Jump to: navigation, search

The V Card is a special item in Keen 5 used to open 'V Card doors'. They do nothing but sit and animate like a regular item and as such patches relating to them can be found on the page Patch:Items.

The V-card also has two unused actions of its own, suggesting that it was intended to be a special type of item distinct from the others.Patches for these two actions are included here, but it should be noted that they will not affect anything in the default game.


Don't lose V card on opening a door

This patch prevents Keen from losing any V cards he has when opening 'V Card doors'. This means once he gets a card he can use it as many times as he wants in a level.

Patch: Keen 5
#Don't lose V card on opening a door
%patch $AD12 $EB $04


Don't lose V card on starting a level

This patch prevents Keen from losing any V cards he has when starting a level. His keygems will still be affected. See also Patch:Level start.

Patch: Keen 5
#Don't lose V card on starting a level
%patch $6A2B $EB $04


Don't lose keygems or V card

This patch stops Keen losing not only his keygems but also his V card on leaving a level (but again, not when dying.).

Patch: Keen 5
#Don't lose keygems or V card on starting a level
%patch $6A11 $EB $1E


Have one or more V cards when starting a level

This patch ensures Keen always has a V card when starting any level, including the map. He will be given the card whenever he leaves a level, but will lose it when he dies and retries a level. The value here can be other than 1 if desired.

Patch: Keen 5
#Have a V card on starting a level
%patch $6A2F $0001W


Give\take something instead of a V card on level start

This patch alters what is affected at level start so it is not necessarily a V card. This variable can also be set to other values aside from 0 or 1; in this case keen will start all levels with 10 ammo. Notice that if Keen dies he will lose the V card but not what is given here.

Patch: Give\take something instead of a V card on level start
#Start levels with 10 ammo
%patch $6A2D $6F56W $000AW


V card unused actions

As noted above the V-card has two unusued sprite actions. The following sections contain patches for these but again it should be noted that these will not affect anything in the game itself.


Sprite Actions

There are two central item actions, both do the same thing, they leave an item sitting, waiting to be collected. This mirrors almost exactly the default item actions in all properties. Since the V-card is spawned as a regular item this special V-card loop is never used in the game.

Keen 5 Actions:
$1982W #Card 1
$19A0W #Card 2

Patch: Keen 5
#V-card loop
%patch $31CDE $19A0W %patch $31CFC $1982W


Sprite Behavior

Unlike regular items the V-card has its own special behavior. This lets it fly through the air and land on the ground to become a regular item.

Patch: Keen 5
#Unused V-card behaviors
%patch $31CD2 $0F920545RL %patch $31CF0 $0F920545RL


Behavior code

This is the complete, if short, behavior code for the V-card. On the first line it checks for floors, if it finds them then the Card's action is changed to that of a regular sprite. The purpose of this was to make the V-Card spawn somehow, fly through the air and become a regular item when it hit the ground, much like what the Blooglet gems do in Keen 6.

Patch: Keen 5
#V-Card behavior
%patch $FE65 $55 $8B $EC $56 $8B $76 $06 $83 $7C $36 $00 $74 $05 $C7 $44 $1C $1946W $FF $44 $1E $8B $44 $1E $3B $44 $42 $75 $06 $8B $44 $40 $89 $44 $1E $56 $9A $090B12CERL $83 $C4 $02 $5E $5D $CB


Speed and Jump Height

The V-card was intended to fly through the air, but its unused actions do not have any speed.

Patch: Keen 5
#Unused V-card action speeds
%patch $31CCE $0000W $0000W %patch $31CEC $0000W $0000W


Sprite collision

The unused V-card actions had no sprite collision as getting the card was determined by Keen's collision, as with most items.

Patch: Keen 5
#Unused V-card sprite collision
%patch $31CD6 $00000000L %patch $31CF4 $00000000L


Animations

It seems that the V-card's animations were intended to be set in the same way as item animations in general, so the unused actions have no animations.

Patch: Keen 5
#Unused V-card animations
%patch $31CC2 $0000W $0000W %patch $31CE0 $0000W $0000W


Sprite-tile interaction

The unused V-card actions use a generic 'raw the sprite' tile interaction code that does nothing special. Oddly, while the card was intended to land on floors, this is checked for in its behavior code rather than its tile interaction.

Patch: Keen 5
#Unused V-card tile interactions
%patch $31CDA $090B17B5RL %patch $31CF8 $090B17B5RL