Patch:Ending sequence (Keen 3)

From KeenWiki
(Redirected from Patch:Finale(Keen 3))
Jump to navigation Jump to search

The finale, or ending sequence in Keen 3 covers everything from after Keen destroys the Patch:Mangling Machine to being returned to the main menu This can be divided into two sections, the award level and the end text. This page is divided into sections in a similar manner and also contains a section affecting the whole sequence.


Disable

This patch disables the entire ending sequence. Instead when Keen wins the game he is taken directly to the finale screen with its text wind. ('The end... for now.')

No award level, go straight to finale image

#No award level, go straight to finale image
%patch $5A52 $E9 $029AW


Award level

In this part of the ending sequence Keen appears in a level like the main gameplay. Several text boxes appear explaining he will be given an award for saving the Vorticons and not killing them all. There are then several flashes and the level is exited, leading to the next sequence.

The level contains a number of sprite images and has a few tile replacements occur in it. The level used is level 81.


The level itself

This patch dictates what level is used for the ending sequence. It is unlikely you will want to change this, but it may prove unexpectedly useful.

Ending level

#Level used for end
%patch $5A53 [$0051W]


Don't change level until later in end sequence

The following patches stop the level changing to the finale level until later on in the ending sequence. this is done by disabling 'clear screen' calls and as a side effect, nothing is erased. (So if a text window appears onscreen any following windows must be the same size or larger.)

As a result the ending sequence will appear over the boss level screen at the point Keen triggers it, complete with Keen and any remaining sprites. When the screen is cleared all changes will appear at once. (So if screen clearing is delayed until the start of a Vorticon press flash the screen will appear with the tiles changed.)

All lines up to the point required are needed, so deleting the first line will render all following lines useless. If the level change is delayed until the finale screen then the high score\game over prompt will appear over the changed level after the finale image has vanished.

Keen 3

#Don't change level to ending level until...
%patch $5AA2 $90 $90 $90 #After first textbox
%patch $5AE9 $90 $90 $90 #After second
%patch $5B25 $90 $90 $90 #Third
%patch $5B61 $90 $90 $90 #Fourth
%patch $5BA2 $90 $90 $90 #First flash start
%patch $5BC0 $90 $90 $90 #First flash end
%patch $5BE4 $90 $90 $90 #Second flash start
%patch $5C03 $90 $90 $90 #Second flash end
%patch $5C27 $90 $90 $90 #Third flash start
%patch $5C46 $90 $90 $90 #Third flash end
%patch $5C69 $90 $90 $90 #Fourth flash start
%patch $5C87 $90 $90 $90 #Fourth flash end
%patch $5CAB $90 $90 $90 #Fifth flash start
#%patch $5CCA $90 $90 $90 #Fifth flash end (Finale)


Sprites placed in level

These patches govern what sprite images are displayed in the level. The locations of the sprites are in 16ths of a pixel, meaning one tile is $0100. This means no sprite can be placed further down\left than 16,16 in the level. Because Keen's sprite is sprite 0, it cannot be changed. (There is no variable for it.)

Either or both sprites can be removed from the level.

Ending level sprites

#Vorticon sprite, 67 at 6,15 in level
%patch $5A74 [$0043W] #Vorticon sprite used
%patch $5A7A [$6000W] #Vertical location in pixels
%patch $5A81 [$E000W] #Horizontal location in pixels

#Keen's sprite, 0 at 6.5,16.5 in level
%patch $5A91 [$6800W] #Vertical location in pixels
%patch $5A98 [$F800W] #Horizontal location in pixels

#Don't show...
%patch $5A73 $EB $16 #Don't show Vorticon
%patch $5A8B $EB $15 #Don't show Keen


Finale conversation

These patches control the text boxes that appear in the level. Each box has five variables to it; its height, width, time it remains to be read, where its text is read from and the text itself. (See Patch:Text patches.) The time remaining is in 144ths of a second (The default time, in seconds is displayed on the patch.) The size of the textbox *and* its location are the same, they are references to locations on the screen for the four sides of the text box in 8x8 squares. Thus to make a textbox start at 3,2 its top and left side will need values of $0006 and $0004.

A small utility to make entirely custom conversations can be downloaded here: https://dl.dropboxusercontent.com/u/3940020/FINTEXT3.zip It allows a patcher to avoid this entire section.

First textbox

%patch $5AA9 [$0017W] #Bottom side location
%patch $5AAD [$002BW] #Right side location
%patch $5AB1 [$0012W] #Top side location
%patch $5AB5 [$0004W] #Left side location
%patch $5ADF [$0078W] #Time visible (0.83s)
%patch $5ABF [$2B4DW] #First Line of text read from:
%patch $5AC7 [$2B75W] #Second Line of text read from:
%patch $5ACF [$2B9BW] #Third Line of text read from:
%patch $5AD7 [$2BC3W] #Third Line of text read from:

#Text
%patch $1C36D "With Mortimer McMire out of the       " $0A  $00
%patch $1C395 "picture, and his brain-wave belts no" $0A  $00
%patch $1C3BB "longer controlling them, the Vorticons" $0A  $00
%patch $1C3E3 "are freed of their mental enslavement." $0A  $00

#First window doesn't appear
%patch $5AA8 $EB $42

Second textbox

%patch $5AED [$0016W] #Bottom side location
%patch $5AF1 [$002BW] #Right side location
%patch $5AF5 [$0012W] #Top side location
%patch $5AF9 [$0004W] #Left side location
%patch $5B1B [$0078W] #Time visible (0.83s)
%patch $5B03 [$2BEBW] #First Line of text read from:
%patch $5B0B [$2C13W] #Second Line of text read from:
%patch $5B13 [$2C3BW] #Third Line of text read from:

#Text
%patch $1C40B "'Commander Keen, in honor of your     " $0A  $00
%patch $1C433 "meritorious service in freeing us from" $0A  $00
%patch $1C45B "the Grand Intellect's mental chains,'" $0A  $00

#Second window doesn't appear
%patch $5AEC $EB $3A

Third textbox

%patch $5B29 [$0016W] #Bottom side location
%patch $5B2D [$002BW] #Right side location
%patch $5B31 [$0012W] #Top side location
%patch $5B35 [$0004W] #Left side location
%patch $5B57 [$0078W] #Time visible (0.83s)
%patch $5B3F [$2C62W] #First Line of text read from:
%patch $5B47 [$2C8AW] #Second Line of text read from:
%patch $5B4F [$2CB2W] #Third Line of text read from:

#Text
%patch $1C482 "'I and the other Vorticons you haven't" $0A $00
%patch $1C4AA "slaughtered want to award you the     " $0A  $00
%patch $1C45B "Big V, our highest honor.'" $0A  $00

#Third window doesn't appear
%patch $5B28 $EB $3A

Thanks textbox

%patch $5B65 [$0014W] #Bottom side location
%patch $5B69 [$001EW] #Right side location
%patch $5B6D [$0012W] #Top side location
%patch $5B71 [$0011W] #Left side location
%patch $5B83 [$0078W] #Time visible (0.83s)
%patch $5B7B [$2CCEW] #First Line of text read from

#Text
%patch $1C4EE "'Thank you!'" $0A $00

#Fourth window doesn't appear
%patch $5B64 $EB $23


The Vorticon Press

This sequence involves a number of 'flashes' (Actually palette changes) that result in several tiles being changed. This gives the impression of the Vortipress taking Keen's photograph. There are five Vortipres in the level, they can be numbered 1-5 from left to right. (Which is the scheme used here.) Their head tiles are at 1,6; 3,6; 6,6; 17,3 and 18,3 in the level.

The Vortipress 'flash' in this order, 4,1,2,5,3. Each flash is a section of code with seven alterable (Blue) variables. The first two are the h and v positions of the camera flash tile, the third is the tile to use for the flash, the fourth and fifth are the h and v positions of the 'return to normal' tile, the sixth is the 'return to normal tile' and the seventh is the pause between the flash and the next flash.

As an example, the code at $5B8A for the first flash (Vortipress 4) is as follow; place flash tile 003A at 0005,0013 then return to normal using tile 0048 at 0005,0013, then wait 14/144 of a second (0.14s) before the next flash.

If the flash and return tiles are not at the same place then you will be able to see both tiles in the level. If the return tile is not the same as the tile the flash tile replaced then the Vortipress will look different after the flash. Finally replacing $A1 $34 with $EB $1A in the third line of a flash patch will stop the second tile being placed at all.

Note that if using the following patches each flash patch must be included in its entirety or errors will occur.

Vortipress flashes

#First flash (Vortipress 4)
%patch $5B8A $A1 $34 $6E $BA [$0005W]  $F7 $EA $05 [$0013W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003AW]  $E8 $E8 $A6 $E8 $60 $FE
             $A1 $34 $6E $BA [$0005W]  $F7 $EA $05 [$0013W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$0048W]  $E8 $CA $A6
             $B8 [$0014W]  $50 $E8 $8E $6F $59

#Second flash (Vortipress 1)
%patch $5BCB $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0003W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003CW]  $E8 $A7 $A6 $E8 $1F $FE $90
             $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0003W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003DW]  $E8 $88 $A6 $90
             $B8 [$000AW]  $50 $E8 $4B $6F $59

#Third flash (Vortipress 2)
%patch $5C0E $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0005W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003CW]  $E8 $64 $A6 $E8 $DC $FD $90
             $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0005W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003DW]  $E8 $45 $A6 $90
             $B8 [$0005W]  $50 $E8 $08 $6F $59

#Fourth flash (Vortipress 5)
%patch $5C51 $A1 $34 $6E $BA [$0005W]  $F7 $EA $05 [$0014W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003AW]  $E8 $21 $A6 $E8 $99 $FD
             $A1 $34 $6E $BA [$0005W]  $F7 $EA $05 [$0014W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$0048W]  $E8 $03 $A6
             $B8 [$000AW]  $50 $E8 $C7 $6E $59

#Fifth flash (Vortipress 3)
%patch $5C92 $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0008W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003CW]  $E8 $E0 $A5 $E8 $58 $FD $90
             $A1 $34 $6E $BA [$0008W]  $F7 $EA $05 [$0008W]  $D1 $E0 $C4 $1E $74
             $6E $03 $D8 $26 $C7 $07 [$003DW]  $E8 $C1 $A5 $90
             $B8 [$000FW]  $50 $E8 $84 $6E $59


Skip one or more flashes

These are patches for reducing the number of flashes, right down to removing them entirely. The patches always start by removing the earliest flashes first, if the remaining flashes are in the wrong position, they can be changed to fit.

Skip flashes

#Number of flashes to have: (Use only ONE patch)
%patch $5B8A $E9 $003EW #4 flashes
%patch $5B8A $E9 $0081W #3 flashes
%patch $5B8A $E9 $00C4W #2 flashes
%patch $5B8A $E9 $0105W #1 flash
%patch $5B8A $E9 $0148W #No flashes


Flash palettes

This patch controls what palette all flashes use. The palette is changed twice; first when the flash starts, and then again when it ends, changing the palette back to the 'normal' game palette. See also Patch:Palette.

Flash palettes

#Flash palettes
%patch $5A15 $2852W #Flash as Vortipress take pictures
%patch $5A44 $2597W #Return to normal palette after


Flashes are instant

This patch affects all flashes, and makes it such that they occur much quicker. It eliminates the brief pause they take to occur. This is separate from the pause between flashes which can be patched above.

Flashes are instant

#Flashes are instant
%patch $5A3B $90 $90 $90


Flash sounds

This patch controls what sound is played when all flashes occur. It is also possible to remove the sound entirely.

Flash sounds

#Vortipress snapshot sound
%patch $5A2D $19

#Vortipress snapshot sound disabled
%patch $5A2C $EB $06


Finale screen

This screen appears after the level sequence ends. It is a fullscreen picture. There is a pause before it appears (See last patch above.) When the finale image is loaded there will be another pause before the end textbox appears. The name of the finale file is a text string just like the text in the window patches above. It must be a valid DOS filename to be loaded, it is not case sensitive and must have the extension. (See also Patch:Files and filenames.)

A new level is loaded for the finale and end texts to be displayed over, by default this is the Vortipress level, but it doesn't have to be. It will only really be visible at the game winning 'game over, high score' screen before Keen is returned to the main Menu.

Finale screen

#Finale image
%patch $5CF0 [$2CDCW] #Read finale name from here
%patch $5CFB [$0051W] #Finale level
%patch $5D16 [$0190W] #Pause before end textbox appears (2.77s)

#File that holds finale image
%patch $1C4FC "finale.ck3"


Wait before finale screen

This patch controls the wait after the Vortipress flashes end before the finale screen appears.

Finale screen wait

#How long to wait after flashes before finale screen
%patch $5CD6 [$0078W]  #(0.83s)


Pause at finale screen before textbox appears

This is the pause that allows the player to look at the finale screen before the 'The end' textbox appears and fills with text.

Pause at finale screen before textbox appears

#Pause at finale screen before textbox appears
%patch $5D16 [$0190W]


The 'The End' text box

This box appears over the finale screen. When Keen presses a key he goes to the end text proper. There is a long pause before it appears (See last patch above.)

Tanks textbox

%patch $5D1E [$0018W] #Bottom side location
%patch $5D22 [$001DW] #Right side location
%patch $5D26 [$0014W] #Top side location
%patch $5D2A [$0012W] #Left side location
%patch $5D34 [$2CE7W] #First Line of text read from:
%patch $5D3C [$2CFDW] #Second Line of text read from:

#Text
%patch $1C507 "The End..." $00
%patch $1C512 " For now!" $00


Endtext window

This fullscreen window appears after the finale image. By default nothing can be seen behind it and it displays a large amount of story text (See Patch:End text.) If the endtext window is made shorter the finale level can be seen behind it. (Making it more useful.) It also appears with a 'congratulations' sound followed by the same sound as when Keen first meets Mortimer McMire. Both sounds can be blocked.

End text textbox

#Endtext window
%patch $5D7D [$16] #Congratulations sound
%patch $5D88 [$2C] #Mortimer sound
%patch $5D68 [$16] #Endtext window bottom
%patch $5D90 [$16] #Endtext scrolling window bottom (Must match above value.)

Don't play sounds

#Don't play sounds
%patch $5D7C $EB $06 #Congratulations sound
%patch $5D87 $EB $06 #Mortimer sound


External links