Patch:New Game

From KeenWiki
(Redirected from Patch:Game start)
Jump to navigation Jump to search

This page covers patches relating to starting a new game; mostly what the player has when they start, before they have played any levels. Related patches include Patch:Levels and Patch:Level exit. For patches that relate to the game executable itself starting up see Patch:Game initialization, Patch:One Moment Screen (Vorticons) and Patch:Start sequence.


Items player has at game start

These are the items the player has when they appear on the map, just after selecting anew game from the main menu. You can change what and how much of an item Keen gets; values in brown alter what is affected, values in blue are how much of that item is given. This allows you a great deal of freedom as you can give Keen all sorts of things, such as points or valuable items. For what the brown bytes mean see Patch:Game stats.

Note that these patches ordinarily act to 'clear' data from old games in Keen Vorticons and Dreams. For example, if you change the ammo value to give Keen points instead, a player starting a new game may find themselves with the ammunition from their old game if they haven't exited to DOS. This could be a useful bonus, or an annoyance to the patcher. (Notice Keen 2 and 3 reset the ship parts values even though the game does not use these. These are thus 'spare' and can be patched with no adverse effects.)

In Keen Galaxy all values are reset on starting a new game and so will be zero if not patched. Note that this means in Dreams Keen's score has to be set to zero on starting a new game.

All values in the patches below are the default values used by the game.

Keen 1

#Stuff Keen has at game start
%patch $8FFA {$AA8EW} [$0000W] #0 ???
%patch $9006 {$AAC8W} [$0000W] #0 ammo
%patch $900C {$AA9AW} [$0000W] #0 pogo
%patch $9000 {$AAC6W} [$0004W] #4 lives
%patch $9045 {$AA9EW} [$0000W] #0 Yellow  keycards
%patch $904B {$AAA0W} [$0000W] #0 Blue  keycards
%patch $9051 {$AAA2W} [$0000W] #0 Green  keycards
%patch $9057 {$AAA4W} [$0000W] #0 Red  keycards
%patch $9012 {$AA94W} [$0000W] #0 Joystick
%patch $9018 {$AA9CW} [$0000W] #0 Battery
%patch $901E {$AA96W} [$0000W] #0 Vacuum
%patch $9024 {$AA98W} [$0000W] #0 Whiskey

Keen 2

#Stuff Keen has at game start
%patch $8A8E {$9ADCW} [$0004W] #4 lives
%patch $8A94 {$9ADEW} [$0000W] #0 ammo (This line is thus redundant)
%patch $8A9A {$9AB0W} [$0001W] #1 pogo
%patch $8AA0 {$9ADEW} [$0003W] #3 ammo
%patch $8AA6 {$9AAAW} [$0000W] #0 Joystick
%patch $8AAC {$9AB2W} [$0000W] #0 Whiskey
%patch $8AB2 {$9AACW} [$0000W] #0 Vacuum
%patch $8AB8 {$9AAEW} [$0000W] #0 Battery
%patch $8AD9 {$9AB4W} [$0000W] #0 Yellow  keycards
%patch $8ADF {$9AB6W} [$0000W] #0 Blue  keycards
%patch $8AE5 {$9AB8W} [$0000W] #0 Green  keycards
%patch $8AEB {$9ABAW} [$0000W] #0 Red  keycards

Keen 3

#Stuff Keen has at game start
%patch $8A10 {$9D4AW} [$0000W] #No points 1
%patch $8A16 {$9D4CW} [$0000W] #No points 2
%patch $98E4 {$9D46W} [$0004W] #4 Lives
%patch $98F0 {$9D1AW} [$0001W] #1 Pogo
%patch $98F6 {$9D48W} [$0005W] #5 Shots
%patch $98FC {$9D14W} [$0000W] #No joystick
%patch $9902 {$9D1CW} [$0000W] #No battery
%patch $9908 {$9D16W} [$0000W] #No Vacuum
%patch $990E {$9D18W} [$0000W] #No whiskey
%patch $992A {$9D1EW} [$0000W] #0 Yellow keycards
%patch $9930 {$9D20W} [$0000W] #0 Red keycards
%patch $9936 {$9D22W} [$0000W] #0 Green keycards
%patch $993C {$9D24W} [$0000W] #0 Blue keycards

Keen 4

#Stuff Keen has at game start (Defaults)
%patch $5CBB {$7A56W} [$0000W] #Extra Keen at score (High word)
%patch $5CC1 {$7A54W} [$4E20W] #Extra Keen at score (Low word)
%patch $5CC7 {$7A6AW} [$0003W] #Lives (3)
%patch $5CCD {$7A58W} [$0005W] #Ammo (5)

Keen 5

#Stuff Keen has at game start (Defaults)
%patch $5C8F {$6F54W} [$0000W] #Extra Keen at score (High word)
%patch $5C95 {$6F52W} [$4E20W] #Extra Keen at score (Low word)
%patch $5C9B {$6F6AW} [$0003W] #Lives (3)
%patch $5CA1 {$6F56W} [$0005W] #Ammo (5)

Keen 6

#Stuff Keen has at game start (Defaults)
%patch $5A8F {$758EW} [$0000W] #Extra Keen at score (High word)
%patch $5A95 {$758CW} [$4E20W] #Extra Keen at score (Low word)
%patch $5A9B {$75A6W} [$0003W] #Lives (3)
%patch $5AA1 {$7590W} [$0005W] #Ammo (5)

Keen Dreams

#Stuff Keen has at game start (Defaults)
%patch $3C0C {$7124W} [$0000W] #Level (0)
%patch $3C12 {$7116W} [$0000W] #Score (High word)
%patch $3C18 {$7114W} [$0000W] #Score (Low word)
%patch $3C1E {$711AW} [$0000W] #Extra Keen at score (High word)
%patch $3C24 {$7118W} [$4E20W] #Extra Keen at score (Low word)
%patch $3C2A {$7126W} [$0003W] #Lives (3)


Player has different items depending on difficulty

This patch sacrifices the F10-V cheat to allow a player to have differing sets of items when starting a game in easy, normal, or hard difficulty.

The first thing to notice is that there are three variables you can set for all*games of any difficulty. By default these are the Extra Keen At and lives. If you change these in the New Game section then the 'global' values will be overwritten.

The New Game code has four sections. The first checks the difficulty and sends the game to one of three sections. Each of the three sections is made up of six-byte commands that get a value, then set it. In this example ammo is set to 10, 5 or 2 depending on difficulty. In this example only one variable differs between difficulties. To add more simply add another $B8 $xxxxW $A3 $yyyyW to each section. When you do this the value after $74 will increase by 6 and the value after $77 must increase by $C (12) An example of this is shown in the Keen 5 and Keen 6 versions, which change more variables.

Keen 4

#Disable Add VBLs (Free $76DB-$7760)
%patch $76D8 $E9 $0086W

#Stuff all games will have
%patch $5CBB {$7A56W} [$0000W] #Extra Keen at score (High word)
%patch $5CC1 {$7A54W} [$4E20W] #Extra Keen at score (Low word)
%patch $5CC7 {$7A6AW} [$0003W] #Lives (3)

#Call new game code
%patch $5CCB $9A $06BD0B0BRL $5D $CB

#New game code -check difficulty
%patch $76DB $55 $8B $EC $83 $3E {$474AW}  [$02] {$74} $0A {$77} $10

#First section, easy stuff
             $B8 [$000AW]  $A3 {$7A58W}  $5D $CB

#Second section, normal stuff
             $B8 [$0005W]  $A3 {$7A58W}  $5D $CB

#Third section, hard stuff
             $B8 [$0002W]  $A3 {$7A58W}  $5D $CB

Keen 5

#Disable Add VBLs (Free $7690-$7715)
%patch $768D $E9 $0086W

#Stuff all games will have
%patch $5C8F {$6F54W} [$0000W] #Extra Keen at score (High word)
%patch $5C95 {$6F52W} [$4E20W] #Extra Keen at score (Low word)
%patch $5C9B {$6F6AW} [$0003W] #Lives (3)

#Call new game code
%patch $5C9F $9A $06B90B00RL $5D $CB

#New game code -check difficulty
%patch $7690 $55 $8B $EC $83 $3E {$3D66W}  [$02] {$74} $10 {$77} $1C

#First section, easy stuff
             $B8 [$000AW]  $A3 {$6F56W}  $B8 [$0050W]  $A3 {$6F58W}  $5D $CB

#Second section, normal stuff
             $B8 [$0005W]  $A3 {$6F56W}  $B8 [$0028W]  $A3 {$6F58W}  $5D $CB

#Third section, hard stuff
             $B8 [$0002W]  $A3 {$6F56W}  $B8 [$000AW]  $A3 {$6F58W}  $5D $CB

Keen 6

#Disable Add VBLs (Free $74B0-$7535)
%patch $74AD $E9 $0086W

#Stuff all games will have
%patch $5A8F {$758EW} [$0000W] #Extra Keen at score (High word)
%patch $5A95 {$758CW} [$4E20W] #Extra Keen at score (Low word)
%patch $5A9B {$75A6W} [$0003W] #Lives (3)
%patch $5AA1 {$7590W} [$0005W] #Ammo (5)

#Call new game code
%patch $5A9F $9A $069A0B10RL $5D $CB

#New game code -check difficulty
%patch $74B0 $55 $8B $EC $83 $3E {$414AW}  [$02] {$74} $10 {$77} $1C

#First section, easy stuff
             $B8 [$000AW]  $A3 {$7590W}  $B8 [$0050W]  $A3 {$7592W}  $5D $CB

#Second section, normal stuff
             $B8 [$0005W]  $A3 {$7590W}  $B8 [$0028W]  $A3 {$7592W}  $5D $CB

#Third section, hard stuff
             $B8 [$0002W]  $A3 {$7590W}  $B8 [$000AW]  $A3 {$7592W}  $5D $CB


Level game starts in (Vorticons)

This patch causes the player to start the game in a different level than the map. (Level 0) The values of the blue level variable given here will start the game in level 2. As Keen Vorticons was hard-coded to have a map level this has a few side-effects.

The first is that the map is disabled; dying or winning the level returns Keen to the map for a second, whereupon he immediately re-enters the level. (Allowing infinite replays.) Only winning the game or triggering a game over will successfully end the game. Secondly the map appears for a second before the regular level starts. (To smooth this over the modder can simply replace the map screen tiles with black.)

Keen 1

#Keen starts game in level 2
%patch $7E99 $90 $90 $90
%patch $7EBC $90 $90 $90
%patch $7FA1 $EB $29
%patch $7FCC $C7 $06 {$6EC0W}  [$0002W]  $90

Keen 2

#Keen starts game in level 2
%patch $82A1 $90 $90 $90
%patch $82BE $90 $90 $90
%patch $83A0 $EB $29
%patch $83CB $C7 $06 {$6E9CW}  [$0002W]  $90

Keen 3

#Keen starts game in level 2
%patch $8C44 $90 $90 $90
%patch $8C61 $90 $90 $90
%patch $8D6C $EB $2E
%patch $8D9C $C7 $06 {$70ECW}  [$0002W]  $90


No map, normal levels only

This is a modified version of the above patch. Using this Keen will start at level 1, progressing a level each time he exits. Dying causes him to replay the level he died on. When Keen reaches the 'maximum level' he will replay that level infinitely even if he successfully exits it (Only winning or losing the game will allow him to finish.) To adjust the maximum level simply remove 2 from both the brown $AAA8W\$9ADAW\$9D44W (Keen 1\2\3) for each level you wish to remove. (15 levels is $AAA6W\$9AD8W\$9D42W, 14 is $AAA4W\$9AD6W\$9D40W and so on.)

Loading a saved game will also start Keen back at level 1. This alters the speed of Keen when he dies and can cause problems with patches that also alter it.

Keen 1

#Keen starts game in normal level, max is 16
%patch $7E99 $90 $90 $90
%patch $7EBC $90 $90 $90
%patch $7FA1 $83 $3E $5DAAW  $00 $75 $04 $FF $06 {$AAA8W}  $A1 {$AAA8W}  $A3 $6EC0W
                 $C7 $06 $5DAAW  $0000W  $EB $19
%patch $4214 $FE80W
%patch $4219 $A3 $8242W  $A3 $5DAAW

Keen 2

#Keen starts game in normal level, max is 16
%patch $82A1 $90 $90 $90
%patch $82BE $90 $90 $90
%patch $83A0 $83 $3E $5D86W  $00 $75 $04 $FF $06 {$9ADAW}  $A1 {$9ADAW}  $A3 $6E9CW
                 $C7 $06 $5D86W  $0000W  $EB $19
%patch $7056 $FE80W
%patch $705B $A3 $96E2W  $A3 $5D86W

Keen 3

#Keen starts game in normal level, max is 16
%patch $8C44 $90 $90 $90
%patch $8C61 $90 $90 $90
%patch $8D6C $83 $3E $5FD6W  $00 $75 $04 $FF $06 {$9D44W}  $A1 {$9D44W}  $A3 $70ECW
                 $C7 $06 $5FD6W  $0000W  $EB $1E
%patch $78BD $FE80W
%patch $78C2 $A3 $9932W  $A3 $5FD6W


Level game starts in (Galaxy)

This patch causes the player to start the game in a different level than the map. (Level 0) The values of the level variable given here will start the game in the default BWB level (except Keen 5 where the player will start in the High Scores level due to the game lacking a BWB level proper.)

Note that this does not change what the map level is; on exiting levels Keen will return to the map (level 0) and only the map will do such things as mark levels as done.

There is one minor side effect to this patch; the high word of the Extra Keen At score is not set to 0. What this means is that the game cannot start with an Extra Keen At score of more than 65'000 or so without a slightly more complicated patch being used.

Keen 4

#Keen starts game in the BWB
%patch $5CBB {$7A68W} [$0012W]

Keen 5

#Keen starts game in the BWB
%patch $5C8F {$6F68W} [$000FW]

Keen 6

#Keen starts game in the BWB
%patch $5A8F {$75A4W} [$0011W]

Keen dreams

#Keen starts game in the boss level
%patch $3C0C {$7124W} [$000FW]


Sound on starting new game

This patch plays a sound when a new game is started. It may have unintended side-effects when starting a new game after playing an old one, but at present none are known of. In this patch the blue value is the sound played; here it is the same as the 'enter level' sound.

Notice that this rearranges some code to fit the sound. It doesn't alter any default values but does mean that this patch is not compatible with the 'stuff player has at start' patches also on this page. It also removes the possibility of changing some variables (they're set to zero) and limits the patcher to only changing the number of lives (3) and the Extra Keen At score (20'000).

Keen dreams

#Play sound when new game starts
%patch $3C04 $33 $C0 $A3 $70EEW  $A3 $7124W  $A3 $7116W  $A3 $7114W  $A3 $7116W
                 $A3 $711AW  $A3 $711CW  $A3 $711EW  $C7 $06 $7118W  $4E20W
             $C7 $06 $7126W  $0003W  $B8 [$000DW] $50 $9A $10BB1282RL $44 $44 $90


Clearing memory on new game

In Keen Galaxy a 'memory clear' subroutine is run when a new game is started. It has three variables, number of values to change, value to change to and game stat to start clearing at. By default this serves to clear all of the basic game variables (such as what levels are completed) when a new game starts. If this is disabled then a lot of old data from the previous game will 'carry over' into a new one.

Keen 4

#New game memory clear
%patch $5CA7 [$0056W] #Values to change
%patch $5CAE [$7A1AW] #Starting at

Keen 5

#New game memory clear
%patch $5C7B [$0058W] #Values to change
%patch $5C82 [$6F18W] #Starting at

Keen 6

#New game memory clear
%patch $5A7B [$0058W] #Values to change
%patch $5A82 [$7552W] #Starting at


Disable

This disables memory clearing. This means that all of the data from an old game will be carried over into a new game. This allows flagrant manipulation of new games.

Keen 4

#Disable memory clear on new game
%patch $5CA6 $EB $11

Keen 5

#Disable memory clear on new game
%patch $5C7A $EB $11

Keen 6

#Disable memory clear on new game
%patch $5A7A $EB $11


Play story text before every new game

This patch causes the story screen to appear whenever a new game is started. The player can skip the story screen by pressing a key; this causes the game to start sooner. As a side effect the high word of Keen's Extra Keen At score is not set. (By default it is set to 0, which has no effect on gameplay.)

In this patch the story screen is removed from the game demo loop as if it is not the player can press a key during it causing the screen and the following demo to load and be stopped. This is a cosmetic effect and not vital to the patch.

The patch to stop the player going to the main menu is included since otherwise at the start of a new game the player cannot skip the story, getting stuck in the menu if they try. An alternative patch is to use the patch on this page that stops the player from halting the story by pressing any key. This however means the story must be sat through each time a game is started, which could be a trying experience.

Keen 4

#Star wars text appears before new game
%patch $5CB9 $9A $03ED18B8RL     $90

#Pressing any key in the story screen doesn't go to main menu
%patch $5894 $90 $90 $90 $90

#Remove Story screen from demo loop
%patch $3CBD $04D1W

Keen 5

#Star wars text appears before new game
%patch $5C8D $9A $03ED18B2RL     $90

#Pressing any key in the story screen doesn't go to main menu
%patch $588E $90 $90 $90 $90

#Remove Story screen from demo loop
%patch $3CB7 $047BW