From KeenWiki
Jump to: navigation, search

Elevators are used in Keen 5 on the world map (Omegamatic). They transport Keen up or down various levels of the Omegamatic and consist of a 2x2 door that can be either opened or closed, and animates when Keen enters it. There are two elevator "shafts"; the fist one gets Keen from the lower level 1/2 area to the main hub, the second ("main elevator shaft") leads to the Gravitational Damping Hub and Q.E.D.

Elevator shafts are "activated" by completing certain levels via destroying fuses (which have a different "level done" value compared to a normally exited level). When this happens, certain tiles on the map are changed, allowing Keen to use the elevator.

See also Patch: Fuses.

Ignore elevators

This patch skips over the map elevator code. This means that elevator doors never change from how they appear on the map originally (Unless of course keen goes through some.) Destroying the fuses will do nothing and being in different parts of the map will not cause the doors to appear different.

Patch: Keen 5
#Ignore elevators entirely (Don't place their starts in map level, or
#take notice of when fuse levels are done OR keen's map pos
%patch $F431 $90 $90


There are four fuses needed to activate the main elevator shaft, in different levels. Some of these patches require knowledge of Patch: Jump conditions. By default, all four fuses need to be broken. The fuse levels are more complicated to control and some experimentation may help. (The value needed is a location in memory and is 28 + [2 * level number].)

Patch: Keen 5
#Fuses required to activate main shaft:
#($74 = need fuse broke, $75 = need fuse whole, $90 $90 = ignore fuse)
%patch $F473 $74
#Level 4
%patch $F47A $74
#Level 6
%patch $F481 $74
#Level 8
%patch $F488 $74
#Level 10

Patch: Keen 5
#Levels elevator activating fuses are found:
%patch $F470 $24
#Level 4 (28 + 8 = 36)
%patch $F477 $28
#Level 6 (28 + 12 = 40)
%patch $F47E $2C
#Level 8 (28 + 16 = 44)
%patch $F485 $30
#Level 10 (28 + 20 = 48)

Door locations

Under the conditions above, elevator doors will have tiles replaced. Even without fuses and thelike, the doors are set each time the map is loaded. This can be a problem if you have changed the location of the elevator in-level and/or do not want to use them. Door tiles are taken from the top left of the level, (0,0) through (7,1). As such, to make the elevators not affect anything, a location of (-1,-1) will NOT work. Instead, (-2,-2) (FFFE $FFFE) or (2,0) is preferred. Or put them somewhere out of the way nobody will notice.

It is also possible to change what level tile replacements occur. If elevator stuff isn't being used on the map (Serviceable elevators can be made without the fuse\position stuff.) then the code can be used in other levels. This allows small differences to be made in a (or every) level depending on whether Keen has broken fuses. In the patch $74 is a jump condition and level 0 is the map. (Do elevator stuff is level IS map.)

Patch: Keen 5
#Change level elevator stuff happens on
%patch $F430 $00 $74
#First elevator start
%patch $F451 $4C $00 %patch $F455 $18 $00
#First elevator destination
%patch $F460 $37 $00 %patch $F464 $16 $00
#Main elevator start
%patch $F497 $37 $00 %patch $F49B $1A $00
#Main elevator destination
%patch $F4B2 $1E $00 %patch $F4B6 $18 $00


When Keen completes a level above the first elevator door, that door is set to open when he arrives on the map. This is so he can get back down to the lower level if he wants to (why though?). If this is disabled, the door will stay in its default position of "closed" and Keen will not be able to get back to the bottom level. This may be useful for non-standard map design.

Patch: Keen 5
#First elevator shaft doesn't care where Keen is on map
%patch $F431 $90 $90