From KeenWiki
Jump to: navigation, search

Vitalin is the system used in Keen 5 to allow the player to collect extra lives. There are two collectables that can be acquired; the first is Vitalin, which are tiles that can be collected, 100 giving the player an extra life, the second collectable is the Keg of Vitalin, both a tile and sprite that can be collected to give an extra life directly.

This page covers patches relating to both collectables in three sections, Vitalin, Tank of Vitalin tiles and Tank of Vitalin sprites. Vitalin is an item and its patches relate to item patches. It may also pay to check Patch:Jump conditions and Patch:Game stats to assist in using these patches.


These are 16x16 foreground tiles with a specific property allowing the player to get them. When 100 are obtained an extra life is gained. The following patches relate to both getting a single Vitalin and an extra life.

What the Vitalin give

This is what is increased when the player obtains a Vitalin or Keg. For Vitalin by default the Vitalin counter is incremented by 1, while for the Keg Keen's life counter is increased by 1.

Patch: Keen 5
#What Vitalin increase
%patch $C38A $6F58W
#What Kegs increase
%patch $C102 $6F6AW

What is needed to get 1UP

This is what is required to obtain an extra life. By default this is exactly 100 Vitalin. The game code is set up so that it is impossible for the player to get more than one Vitalin at a time, but if this happened the player might not get an extra life and continue obtaining more Vitalin.

Replacing the $75 with $EB will mean the player never gets an extra life (And can accumulate Vitalin in perpetuity.) Replacing it with $90 $90 will mean the player gets an extra life with every Vitalin.

Patch: Keen 5
#What is needed needed (100 Vitalin)
%patch $C38D $6F58W $3D $0064W $75

Can only get a maximum of x Vitalin, no 1UP

This patch changes the game so that the player can only get a certain number of Vitalin. After this their Vitalin counter does not increase anymore. This effectively puts a 'cap' on Vitalin. (And renders them useless, unless other patches make use of them.)

Patch: Keen 5
#Can only get a maximum of x Vitalin, no 1UP
%patch $C388 $A1 $6F58W $3D $xxxxW $73 $04 $FF $06 $6F58W $5F $5E $5D $CB

What is changed when 1UP obtained

Two things are changed when an extra life is obtained, firstly the player's life counter is incremented by 1, and secondly the Vitalin counter is set to zero, requiring them to obtain another 100 Vitalin.

Patch: Keen 5
#What to change
%patch $C396 $6F58W $0000W
#Set Vitalin to 0
%patch $C3A6 $FF $06 $6F6AW
#Increase Keen's life count

Sounds played

There are two sounds played, one when the Vitalinlet is got, the other when an extra life is gained.

Patch: Keen 5
#Play sounds
%patch $C373 $000AW
#Get Vitalin
%patch $C39B $0011W
#Get 1UP

Patch: Keen 5
#Don't play sounds
%patch $C376 $90 $90 $90 $90 $90
#Get Vitalin
%patch $C39E $90 $90 $90 $90 $90
#Get 1UP

Produce 1UP sprite

When the player obtains an extra life a 1UP sprite is produced to indicate this fact. It moves upwards and has no clipping (So it can move through any tiles without getting stuck.) and moves in an upwards direction appearing in front of all tiles (So even hidden items can be seen when they are obtained.)

Note the 1UP animation $00C2 is used only by this sprite and not by the 'regular' 1UP produced when a [[Patch:Items|sprite or tile item] is obtained.

Patch: Keen 5
#Produce 1UP
%patch $C3BC $0001W
#Object type
%patch $C3C1 $0003W
#Foreground = 3 (In front of everything)
%patch $C3D7 $FFFFW
#Vertical direction (Upwards)
%patch $C3DA $00C2W
%patch $C3E3 $19BEW
#Action 'stuff got'
%patch $C3F6 $0000W
#With clipping = 0

Tank of Vitalin sprite

These are 16x16 foreground tiles with a specific property allowing the player to get them.

Tank of Vitalin sprite

This is an item sprite that gives the player an extra life when the player obtains it.