Patch:Viva

From KeenWiki
Jump to: navigation, search

Viva is the system used in Keen 6 to allow the palyer to collect extra lives. There are two collectables that can be acquired; the first is Viva, which are tiles that can be collected, 100 giving the player an extra life, the second collectable is the Queen Viva, 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, Viva, Queen Viva tiles and Queen Viva sprites. Viva 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.


Viva

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 Viva and an extra life.


What the Viva give

This is what is increased when the player obtains a Viva. By default the Viva counter is incremented by 1.

Patch: Keen 6
#What to increase
%patch $C16F $FF $06 $7592W


What is needed to get 1UP

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

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

Patch: Keen 6
#What is needed needed (100 Viva)
%patch $C174 $7592W $3D $0064W $75


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

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

Patch: Keen 6
#Can only get a maximum of x Viva, no 1UP
%patch $C16F $A1 $7592W $3D $xxxxW $73 $04 $FF $06 $7592W $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 Viva counter is set to zero, requiring them to obtain another 100 Viva.


Patch: Keen 6
#What to change
%patch $C17D $7592W $0000W
#Set Viva to 0
%patch $C18D $FF $06 $75A6W
#Increase Keen's life count


Sounds played

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

Patch: Keen 6
#Play sounds
%patch $C15A $000AW
#Get Viva
%patch $C182 $0011W
#Get 1UP

Patch: Keen 6
#Don't play sounds
%patch $C15D $90 $90 $90 $90 $90
#Get Viva
%patch $C185 $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.)

Patch: Keen 6
#Produce 1UP
%patch $C1A3 $0001W
#Object type
%patch $C1A8 $0003W
#Foreground = 3 (In front of everything)
%patch $C1BE $FFFFW
#Vertical direction (Upwards)
%patch $C1CA $1F28W
#Produce 1UP
%patch $C1DD $0000W
#With clipping = 0


Queen Viva sprite

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


Queen Viva sprite

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