# Patch:Levels (Galaxy)

(Redirected from Patch:Levels (Dreams))
Jump to: navigation, search

This page deals with patches relating to levels in Keen galaxy and Dreams. As this is a complex topic there are a number of other pages relating to level patching:

## Editing levels

A number of editors exist to edit Keen Galaxy levels. The oldest of these is the original, TED5. The newest and most advanced is Abiathar. In order to play modified Keen Galaxy levels patching is required. A 'map header' file must be patched into the executable. The name of the game maps themselves can be changed, but this is not necessary. Following are patches relating to patching custom levels in Keen Galaxy.

Keen Dreams has a slightly different setup, requiring the patching of both a maphead and (depending on editor being used.) a mapdict file.

 Patch: Patch new levels into Keen Galaxy #Keen 4 : %maphead maphead.ck4 #Keen 5 : %maphead maphead.ck5 #Keen 6 : %maphead maphead.ck6

 Patch: Keen Galaxy game maps filename #Keen 4 : %patch $1334F$3AE2W #Text called from %patch $32952 "GAMEMAPS.CK4"$00 #Keen 5 : %patch $142EC$3238W #Text called from %patch $33578 "GAMEMAPS.CK5"$00 #Keen 6 : %patch $12E80$34E2W #Text called from %patch $34212 "GAMEMAPS.CK6"$00

## Level names

Level names are a type of text patch. Details on changing them can be found on the Level Entry Window page.

## Lowest and highest levels accessible from map

There are two limits as to what levels the player can access from the main map. The first is the lowest level (By default level 0, meaning you can access the map from the map.) and the second is the highest level (by default level 18, even if this many levels aren't provided by the game.) The difference between these two values is the number of levels accessible on the map. See also Patch:Jump conditions. Keen Dreams works slightly differently but the concept is the same.

 Patch: Range of levels Keen can enter from the map #Range of levels Keen can enter from the map in Keen 4 %patch $DF56$C000W $76 #Minimum %patch$DF5D $C012W$77 #Maximum #Range of levels Keen can enter from the map in Keen 5 %patch $D2BB$C000W $76 #Minimum %patch$D2C2 $C012W$77 #Maximum #Range of levels Keen can enter from the map in Keen 6 %patch $D01A$C000W $76 #Minimum %patch$D221 $C012W$77 #Maximum #Range of levels Keen can enter from the map in Keen Dreams %patch $6A46$03 $7C #Minimum +3 %patch$6A4B $12$7F #Maximum +3

### Extra levels

There are two limits to the number of levels in Keen Galaxy and Dreams. The first is a 'soft' limit' a simple check used to see if a level on the map can be entered. This is easily changed, allowing Keen to enter other levels. However the game will immediately crash if the level involved does not also have a valid name, level entry text and song. The second limit is a 'hard' limit of 25 levels determined by how the game's memory is set up. This is almost impossible to change. As such the following patch has additional sections setting up the level texts and songs. The extra levels will use the High Score level's name, entry and music. The example patch allows 24 levels in Keen 4 (The maximum possible without a more complex patch.)

For what the long lists mean see level text and Patch:Music. Note that adding extra levels does not affect the Bean-With-Bacon-Megarocket level numbers, this means the extra levels will likely be BWB-type. (Replayable) unless the BWB level(s) patch is altered.

 Patch: Keen 4 #Allow 24 levels in Keen 4 v1.4: #First increase the number of levels we can access from the map to maximum (+6) %patch $DF5D$18 #Number of levels enterable ($18 = 24) %patch$8CA4 $18 #Number of level song entries (24, see below) #Give extra levels valid stuff: #Level name pointers: %patch$30764 $1F040000RL #Map$1F050000RL #Level 1 $1F060000RL #Level 2$1F070000RL #Level 3 $1F090000RL #Level 4...$1F0B0000RL $1F0C0000RL$1F0D0000RL $1F0E0000RL$1F0F0000RL $1F100000RL$1F110000RL $1F130000RL$1F150000RL $1F180000RL$1F1A0000RL $1F1B0000RL$1F1C0000RL $1F1D0000RL #Bwb Rocket$1F1C0000RL #Hall of fame $1F1C0000RL$1F1C0000RL $1F1C0000RL$1F1C0000RL $1F1C0000RL #Level entrance text pointers %patch$307C8 $1F1F0000RL #Map$1F210000RL #Level 1 $1F240000RL #Level 2$1F260000RL #Level 3... $1F290000RL$1F2D0000RL $1F300000RL$1F330000RL $1F350000RL$1F380000RL $1F3A0000RL$1F3D0000RL $1F400000RL$1F430000RL $1F470000RL$1F4B0000RL $1F4E0000RL$1F510000RL $1F540000RL #Bwb Rocket$1F510000RL #Hall of fame $1F510000RL$1F510000RL $1F510000RL$1F510000RL $1F510000RL #This is the music played in each level: # VALUE LEVEL MUSIC PLAYED LEVEL No %patch$2F206 $0000W #Map (Shadowlands) 0$0004W #Border Village (Kick in the Pants) 1 $0003W #Slug Village (Slug Village) 2$0003W #Perilous Pit (Slug Village) 3 $0002W #Cave of Descendants (Too Hot) 4$0002W #Chasm of Chills (Too Hot) 5 $0004W #Crystalus (Kick in the Pants) 6$0003W #Hiliville (Slug Village) 7 $0001W #Sand Yego (Eat your Veggies) 8$0001W #Miragia (Eat your Veggies) 9 $0001W #Lifwater Oasis (Eat your Veggies) 10$0002W #Pyramid of Moons (Too Hot) 11 $0002W #Pyramid of Shadows (Too Hot) 12$0002W #Pyramid of Ancients (Too Hot) 13 $0002W #Pyramid of Forbidden (Too Hot) 14$0002W #Isle of Tar (Too Hot) 15 $0002W #Isle of Fire (Too Hot) 16$0001W #Well of Wishes (Eat your Veggies) 17 $0003W #Bwb Megarocket (Slug Village) 18$FFFFW #High scores (No music, "Fanfare") 19 $FFFFW #Extra level 1 (No music, "Fanfare") 20$FFFFW #Extra level 2 (No music, "Fanfare") 21 $FFFFW #Extra level 3 (No music, "Fanfare") 22$FFFFW #Extra level 4 (No music, "Fanfare") 23 $FFFFW #Extra level 5 (No music, "Fanfare") 24 #### Keen 5  Patch: Keen 5 #Allow 24 levels in Keen 5 v1.4: #First increase the number of levels we can access from the map to maximum (+6) %patch$D2C2 $18 #Number of levels enterable ($18 = 24) %patch $8C20$18 #Number of level song entries (24, see below) #Level name pointers: %patch $31AB4$20040000RL #Map $20050000RL #Level 1$20070000RL #Level 2 $20080000RL #Level 3...$200A0000RL $200C0000RL$200E0000RL $20100000RL$20120000RL $20140000RL$20160000RL $20180000RL$201A0000RL $201C0000RL$201D0000RL $201E0000RL$20100000RL #High scores $00000000L #Extra level 1$00000000L #Extra level 2 $00000000L #Extra level 3$00000000L #Extra level 4 $00000000L #Extra level 5$00000000L #Extra level 6 $00000000L #Extra level 7$00000000L #Extra level 8 $00000000L #Extra level 9 #Level entrance text pointers %patch$31B18 $201F0000RL #Map$20220000RL #Level 1 $20250000RL #Level 2$20280000RL #Level 3... $202B0000RL$202E0000RL $20310000RL$20340000RL $20370000RL$203A0000RL $203D0000RL$20400000RL $20440000RL$20470000RL $204A0000RL$204D0000RL $00000000L #Extra level 1$00000000L #Extra level 2 $00000000L #Extra level 3$00000000L #Extra level 4 $00000000L #Extra level 5$00000000L #Extra level 6 $00000000L #Extra level 7$00000000L #Extra level 8 $00000000L #Extra level 9 #This is the music played in each level: # VALUE LEVEL MUSIC PLAYED LEVEL No %patch$3067A $000BW #Map (Omegamatic) 0$0005W #Ion Ventilation System (Wednesday on the Beach) 1 $0007W #Security Center (Security Center) 2$0009W #Defense Tunnel Vlook (Be Sphereful) 3 $000AW #Energy Flow Systems (Make it Tighter) 4$0009W #Defense Tunnel Burrh (Be Sphereful) 5 $000AW #Regulation Control Center (Make it Tighter) 6$0009W #Defense Tunnel Sorra (Be Sphereful) 7 $000AW #Neutrino Burst Injector (Make it Tighter) 8$0009W #Defense Tunnel Teln (Be Sphereful) 9 $000AW #Brownian Motion Inducer (Make it Tighter) 10$0003W #Gravitational Damping Hub (Snooping) 11 $000DW #Quantum Explosion Dynamo (QED) 12$0004W #Korath III Base (Bagpipes) 13 $000CW #Ending\Level 14 (Fanfare) 14$0002W #High Scores (High Scores) 15 %patch $3069C$0001W #Scrolling Story\ L16 (Armageddon Machine) 16 $0000W #Game Over\ L17 (Came In) 17$0008W #Help\ L18 (Help) 18 $0002W #Extra level 1 (High Scores) 19$0002W #Extra level 2 (High Scores) 20 $0002W #Extra level 3 (High Scores) 21$0002W #Extra level 4 (High Scores) 22 $0002W #Extra level 5 (High Scores) 23 #### Keen 6  Patch: Keen 6 #Allow 24 levels in Keen 6 v1.4: #First increase the number of levels we can access from the map to maximum (+6) %patch$D221 $18 #Number of levels enterable ($18 = 24) %patch $8A88$18 #Number of level song entries (24, see below) #Level entrance pointers %patch $32516$1EF40000RL #Level 0 $1EF5000BRL #Level 1$1EF7000DRL #Level 2 $1EF9000BRL #Level 3$1EFC0007RL #Level 4 $1EFF0005RL #Level 5$1F010001RL #Level 6 $1F040003RL #Level 7$1F060007RL #Level 8 $1F08000FRL #Level 9$1F0B0000RL #Level 10 $1F0F0001RL #Level 11$1F100006RL #Level 12 $1F11000BRL #Level 13$1F130000RL #Level 14 $1F140005RL #Level 15$1F15000ARL #Level 16 $20100000RL #High scores$00000000L #Extra level 1 $00000000L #Extra level 2$00000000L #Extra level 3 $00000000L #Extra level 4$00000000L #Extra level 5 $00000000L #Extra level 6$00000000L #Extra level 7 #Level name pointers %patch $324B2$1F16000FRL #Level 0 $1F17000CRL #Level 1$1EF8000DRL #Level 2 $1F190001RL #Level 3$1EFD000FRL #Level 4 $1F000007RL #Level 5$1F1A0002RL #Level 6 $1F050006RL #Level 7$1F07000ERL #Level 8 $1F0A0001RL #Level 9$1F1B0006RL #Level 10 $1F0F000DRL #Level 11$1F110002RL #Level 12 $1F120007RL #Level 13$1F13000CRL #Level 14 $1F150001RL #Level 15$1F15000ARL #Level 16 $20100000RL #High scores$00000000L #Extra level 1 $00000000L #Extra level 2$00000000L #Extra level 3 $00000000L #Extra level 4$00000000L #Extra level 5 $00000000L #Extra level 6$00000000L #Extra level 7 #This is the music played in each level: # VALUE LEVEL MUSIC PLAYED LEVEL No %patch $3103E$0005W #Map (Aliens Ate My Babysitter) 0 $0003W #Bloogwaters Crossing (Faster) 1$0001W #Guard Post One (Brer Tar) 2 $0008W #First Dome of Darkness (Mamba Snake) 3$0008W #Second Dome of Darkness (Mamba Snake) 4 $0008W #Bloogdome (Mamba Snake) 5$0007W #Bloogton Manufacturing (Metal) 6 $0002W #Bloogton Tower (To the Future) 7$0007W #Bloogfoods, Inc. (Metal) 8 $0001W #Guard Post 2 (Brer Tar) 9$0003W #Bloogville (Faster) 10 $0002W #BASA (To the Future) 11$0001W #Guard Post 3 (Brer Tar) 12 $0004W #Bloogbase Recreational District(Space Funk) 13$0004W #Bloogbase Management District (Space Funk) 14 $0006W #Bloog Control Center (Ominous) 15$0002W #Blooglab Space Station (To the Future) 16 $0000W #Bean-with-Bacon Megarocket (A World of Wonderment) 17$0000W #High Scores (A World of Wonderment) 18 $0002W #Extra level 1 (High Scores) 19$0002W #Extra level 2 (High Scores) 20 $0002W #Extra level 3 (High Scores) 21$0002W #Extra level 4 (High Scores) 22 $0002W #Extra level 5 (High Scores) 23 ## Infinite replays of some or all levels 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. These levels are known as 'BWB levels' as the only level this is noticeable in by default is the BWB. The patch uses jump conditions.  Patch: Keen 4 #BwB levels: all levels above 17 %patch$60FD $11$77

 Patch: Keen 5 #BwB levels: all levels above 17 %patch $60B3$11 $77  Patch: Keen 6 #BwB levels: all levels above 16 %patch$5ECD $10$77

## Complete levels to win

Keen Galaxy has a 2-level demo trial parameter (/DEMO switch). By tweaking this code a little bit, it can be used to end the game after a certain level is beaten. If you want to make a "trial demo" of your own, you can patch this in as well. More than one level can be the 'win' level, see Patch:Jump conditions. The last line is not necessary and should be omitted except when making a trial demo.

 Patch: Keen 4 #MAKE GAME END AFTER LEVEL X #Always check to see if level X was beat, even if not in demo mode. %patch $6B4E$90 $90 #Specify level that must be beaten to win game (default is 2) %patch$6B54 $02$75 #Win the game instead of going to high scores %patch $6B57$EB $99 #Enable "2 level demo" parameter by default (Not necessary) %patch$3E90 $90$90

## Tile replacement

By default when Keen completes a level all of the tiles that have a specific infoplane (sprite) value on them will be replaced with tile 0, essentially deleting them from the level. This is used to make obstacles on the map that vanish on level completion.

### Marker sprite

By default the marker sprite value is $D0xx. The level number is taken away from the sprite value and if it equals$D000 the tile is replaced. Changing the jump To $EB will stop any tiles being replaced  Patch: Marker sprite #D0xx Marker sprite - Keen 4 %patch$6120 $D000W$75 #D0xx Marker sprite - Keen 5 %patch $60D6$D000W $75 #D0xx Marker sprite - Keen 6 %patch$5EF0 $D000W$75

### Replacement tile

By default the replacement tile is tile 0, which in effect deletes the tile. This is not necessarily the case however and the replacement tile can be any valid tile.

 Patch: Replacement tile #D0xx Replacement tile - Keen 4 %patch $6130$0000W #D0xx Replacement tile - Keen 5 %patch $60E6$0000W #D0xx Replacement tile - Keen 6 %patch $5F00$0000W

## What level is the map

These patches alter what level the map is. There are several aspects to this which potentially allows multiple map levels.

### Level game starts in

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.

 Patch: Keen 4 #Keen starts game in the BWB %patch $5CBB$7A68W $0012W  Patch: Keen 5 #Keen starts game in the BWB %patch$5C8F $6F68W$000FW

 Patch: Keen 6 #Keen starts game in the BWB %patch $58AF$75A4W $0011W  Patch: Keen dreams #Keen starts game in the boss level %patch$3C0C $7124W$000FW

### Level Keen returns to on completing a level

This patch changes what level the player returns to when he completes any level. (Including level 0, the default map.) By default this is level 0, but it can be any other game level if desired. If the starting level is not changed, (See above) then the game will in effect have a 'starting map' that may never be accessed again after a level is entered.

This doesn't affect what level Keen goes to when he rescues a Council Member however. (See below.)

### No map, just go to next level

This patch alters the 'complete level' code so that Keen will not return to the map but instead moves to the next level A side effect of this is that Keen can complete level 0 and go to level 1. (No map.) Levels are not marked as done, but this has no effect in the default game.

This also means the 'one moment' window will not appear when exiting the original map level. (Level 0.) It is compatible with most other patches on this wiki. Note that Keen will go to the map (Level 0) if he rescues a Council Member.

### Connect two levels in Keen 4

This patch connects two levels in Keen 4, that is to say, when Keen wins a certain level, instead of proceeding to the map level he proceeds to the next level. (In this patch the connected levels are level 2 and level 3.) This patch can be expanded so that several levels work this way, allowing Keen to enter a level and then proceed along a 'chain' of levels before at some point returning to the map.

The first line contains the linked level (here level 2) and conditions (here only level 2). Everything else is 'complete level' code moved to fit the patch and should not be altered. The exception is the final line, %patch $6AF0$33; this line makes the patch also apply to the Council Member rescues; without the line Council members will return Keen to the map, with the line they can send him to the next level.

Note that on returning to the map only the latest completed level will have its flag appear in the holder, since only one flag can be placed per map appearance. Other completed levels will not be marked as done until Keen appears on the map a second time (Loads a game, dies, wins a level, etc.) but will not be reenterable.