Patch:Levels (Vorticons)

From KeenWiki
Jump to navigation Jump to search

This page deals with patches relating to level in Keen Vorticons. It does not cover all patches relating to the map level. For patches relating to the cities that need to be saved in Keen 2 see Patch:Cities. Other patches relating to levels can be found at Patch:Levels. See also Patch:Done markers.

Level format and editing

In Keen Vorticons levels are individual external files loaded by the game as needed. There are a number of editors available of which perhaps the most advanced is Mindbelt. Playing new levels does not require any patching.

32 levels

In Keen Vorticons it is possible to use levels between 30-100 on the map, though only some work and none will be done properly (They will be replayable after exit.) It is also possible that they may be unstable and\or overwrite important stuff. To properly set up levels there is a patch that fits 32 level into the space for the default 16. This affects the item bytes of these levels, each becomes 1 byte long. (So level 1 in Keen 1 is still $AAA6W, but level 2 is $AAA7W and so on.)

Changing the $01 to $00 will allow Keen to replay all the levels as many times as he wants. (See below.) The $20 is how many levels are available, the maximum using this patch is 32, but any number less than this can also be used.

Keen 1

#32 levels:
#Let Keen enter levels if these values are 0
%patch $7D3A  $90 $90 $80 $BF {$AAA6W}  $00
%patch $7FCA  $90 $90 $80 $BF {$AAA5W}  $00
#When starting a new game, make all 32 levels not done
%patch $9065  $90 $90 $C6 $87 {$AAA6W}  $00 $90
%patch $9073  [$20]
#Change things when marking a level as done
%patch $8013  $90 $90 $C6 $87 {$AAA5W}  [$01] $90
%patch $7E4B  [$20]

Keen 2

#32 levels:
#Let Keen enter levels if these values are 0
%patch $8146  $90 $90 $80 $BF {$9ABCW}  $00
%patch $83C9  $90 $90 $80 $BF {$9ABBW}  $00
#When starting a new game, make all 32 levels not done
%patch $8AF9  $90 $90 $C6 $87 {$9ABCW}  $00 $90
%patch $8B07  [$20]
#Change things when marking a level as done
%patch $8412  $90 $90 $C6 $87 {$9ABBW}  [$01] $90
%patch $8253  [$20]

Keen 3

#32 levels:
#Let Keen enter levels if these values are 0
%patch $8AE2  $90 $90 $80 $BF {$9D26W}  $00
%patch $8D9A  $90 $90 $80 $BF {$9D25W}  $00
#When starting a new game, make all 32 levels not done
%patch $9944  $90 $90 $C6 $87 {$9D26W}  $00 $90
%patch $994F  [$20]
#Change things when marking a level as done
%patch $8DE1  $90 $90 $C6 $87 {$9D25W}  [$01] $90
%patch $8BF9  [$20]

Infinite replays

This allows a player to play the level as many times as they want. The level is not marked as completed when Keen exits it. If the Vorticons 32 level patch is being used this must be after it. (It can be built into that patch, see above.) Use only one of the possibilities given at a time, they are mutually exclusive.

Keen 1

#Infinite replays of all levels:
%patch $8019 $00

Keen 3

#Infinite replays of all levels:
%patch $8DE7 $00

#Only levels [$04] and below get marked as done, others are infinite replay
%patch $8BF9 [$04]
%patch $8DA1 $90 $90

Infinite replays of certain levels

This patch allows the player to replay any level that cannot produce a DONE marker. This can be done in several ways. The first is to make its entrance out of 2 or 3 squares, the second is to place a single level entrance square in the top left of the map level. Both will prevent a DONE marker being produced when the level is completed so the player can replay it. This patch is completely compatible with the 32 level patch.

Keen 1

#Can replay any level that doesn't make a DONE marker:
%patch $7FD1 $90 $90

Keen 2

#Can replay any level that doesn't make a DONE marker:
%patch $83D0 $90 $90

Keen 3

#Can replay any level that doesn't make a DONE marker:
%patch $8DA1 $90 $90

Complete levels to win

These patches allow Keen to win the game only if he completes either a specific level or a specific number of levels. (For Keen 3 this is level 16.) For the Keen 1 'level 16 to win' patch you will need to see item bytes. See also Patch:Mangling Machine.

Keen 1

#Complete [x+1] levels to win:
#SIDE EFFECT: Ship parts don't matter
%patch $8020 $83 $BF {$AAA6W} [$0x] $75 $1E $E8 $62 $01 $EB $29

#Complete the game when level 16 is done:
%patch $8022 {$AAC4W} $00 $74 #The byte C4 sets a win condition to level 16, level
%patch $8029 {$AAC4W} $00 $74 #15 is C2, etc. For the 32 levels patch use B5 with
%patch $8030 {$AAC4W} $00 $74 #level 15 as B4, etc. This patch means you can have
%patch $8037 {$AAC4W} $00 $74 #up to four levels as winning conditions

Keen 2

#Only win when exiting level [$0x]
%patch $8436  $83 $3E $3C $80 [$0x] $90 $90 $90 $90

Keen 3

#Only win when exiting level [$xx]
%patch $8DF2 [$00xxW] $75 #Win game
%patch $85D2 [$xx] $75    #MM text sequence

Everything in levels is pulled sideways

This patch creates a 'breeze' in levels; a sort of sideways gravity that pulls everything sideways all the time. Note that this patch will be incompatible with any other patches that use the $55EF line to free up space, such as the 'shoot up\down patch', so check your patchfile before adding this patch.

The value marked in blue is the 'breeze', set here to very low rightwards. Negative values will pull things left.

Keen 1

#Levels have a breeze (Pull ALL sprites and Keen in one direction steadily)
%patch $55EF $EB $4A
%patch $4D1E $E9 $08D0W
%patch $55F1 $B8 $0000W $A3 $823EW  $B8 [$0040W]   $A3 $823CW   $33 $C0 $E9 $F724W

Screen automatically scrolls from left to right

This patch makes the screen scroll left or right, killing Keen when he touches the left edge. The speed of the scrolling can be changed. As a side effect levels 'loop'; there is not left or right level edge, instead going off the right level 'edge' will make Keen appear on the left 'edge' of the level. (However the player will not notice the transition, it is seamless.) The camera will also not follow the player.

Keen can also not pass the right edge of the screen, though he may fall or climb as much as he wants. The right edge is the first blue value in the patch below. (It is set here to the visible edge of the screen, but this is not necessary.)

The remaining blue variables control other aspects oft he game. The right side pushback is how much the right side of the screen pushes Keen back when he tries to leave the right side of the screen. This should be at least $10 more than the scrolling speed. The left side push forward is similar, but should be no more than given here ($40) and should be made smaller if it starts pushing Keen through solid tiles.

The scrolling speed controls how fast and in what direction the screen scrolls. (It is advised you stick with a right scrolling screen.) Finally the two breeze strengths do what they do in the above patch, move objects in the level in a certain direction. The first breeze is positive (right) and the second negative and equal (and left.) In this patch they are set to be equal to the scroll speed, but you can also make them zero.

Keen 1

#Right screen boundary (22 tiles)
%patch $800 $B8 [$0016W]

#add boundary checking to pogo ground
%patch $40E7 $E8 $7B $F2

#update keen movement boundaries
%patch $3368                                 $66 $A1 $2C $82 $66 $3B $06 $4A
             $56 $7F $21 $C7 $06 $3C $82 [$0210W]  $C7 $06 $40 $82 $30 $00 $E8 #Right side pushback
             $15 $F9 $A9 $04 $00 $74 $0D $33 $C0 $A3 $40 $82 $A3 $42 $82 $E8
             $1A $0F $EB $31 $66 $A1 $34 $82 $66 $3B $06 $AC $5D $7C $26 $C7
             $06 $3C $82 $A0 $FF $66 $A1 $AC $5D $66 $A3 $34 $82 $EB $16

#Auto screen scroll
%patch $3458                                 $66 $A1 $D0 $6E $66 [$0040W]  $00 #Left push forward
             $00 $7D $15 $66 $B8 [$0200W]  $00 $00 $66 $01 $06 $D0 $6E $66 $01 #Scroll speed
             $06 $4A $56 $66 $01 $06 $AC $5D $1E $68 $20 $82 $1E $68 $DA $6E
             $B9 $36 $00 $E8 $15 $AE $C7 $06 $3C $82 [$0200W]  $E8 $08 $F8 $A9 #Right breeze strength
             $04 $00 $74 $06 $C7 $06 $3C $82 [$FE00W]  $A1 $3C $82 $66 $98 $66 #Left breeze strength
             $01 $06 $24 $82 $E8 $94 $F5 $66 $A1 $2C $82 $66 $05 $80 $00 $00
             $00 $66 $3B $06 $D0 $6E $7D $0B $33 $C0 $A3 $40 $82 $A3 $42 $82
             $E8 $E9 $0D $1E $68 $DA $6E $1E $68 $20 $82 $B9 $36 $00 $E8 $CA
             $AD $EB $1F