Patch:Gameplay (Keen 1)

From KeenWiki
Jump to navigation Jump to search

This page contains patches that affect the gameplay of Keen 1, that is, patches that alter how the *entire* game is played via keypresses, interface or options. Examples are split screen or making space the fire key. Patches that alter the game by changing something less general will have their own pages, for example patches that affect how the player sprite moves and acts are found on Patch:Keen (Keen 1)

Patches for what the player has and what happens when a new game is started are covered at Patch:Game start.


Space to fire, enter for status box

This patch allows Keen to fire when pressing the space key, and uses the enter key to bring up the status window. This is much more convenient than the two-button firing usually employed. The values used are scancodes and it is possible to make any two keys status and shoot.

The keys used can be altered by changing the values in blue using the Patch:Scancodes page. The first two lines change the space key (Scancode $39, value $39 + $502C = $5065) to enter (Scancode $1C, value $1C + $502C = $5048) The remaining lines change alt+ctrl presses into space.

Using this patch it is possible to disable shooting and\or the status screen by setting their values to 0 ($502C)

The original patch page is located at http://andy.durdin.net/keen/modding/viewtopic.php?t=433

Keen 1

#Change the controls to: Space, shoot; Enter, status. 
%patch $1251  [$5048W]
%patch $7FA3  [$5048W]
%patch $3B23  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00
%patch $3C4E  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00
%patch $3DB9  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00
%patch $3DCC  $90 $90 
%patch $3E6D  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00
%patch $3FFC  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00
%patch $40AA  $90 $90 $90 $90 $90 $90 $90 $80 $3E [$5065W]  $00


Change game smoothness (Framerate)

This patch alters the game's framerats. The primary result of this is that if the value is lower then the game will run more smoothly, if it is higher then the game will be more choppy and disjointed.

There are however side effects; at lower values certain actions (Such as Keen's walking speed on the map) speed up dramatically while others (such as all sprite's jump and fall speeds.) are decreased. For gameplay this is rather like the air becoming thicker. Tweaks to gravity can fix this however.

Keen 1

#Change game framerate
%patch $26A [$06]


Tune a value with arrow keys

This patch allows the player to alter a value by pressing the up/down arrows. This allows for example, Keen to tune how far up\down his raygun shot moves when he shoots it. Note that the variable resets when the up/down key is no longer being pressed.

There are a number of different variables to alter, so two examples of the patch are given here, one to alter the jetpack pogo's thrust, the second to affect the angle of Keen's raygun shot.

The value to be altered is referenced twice, at the start and the end of the tuning code. This should not be altered unless you know what you're doing. The amount that value changes is controlled by five values. The first two are the minimum and maximum values possible, the second two is how much the value changes each arrow-key press and the third is the 'reset value'; what the value is when no keys are being pressed.

The up key is the brown $7F, the down key the brown $7C in the tuner section of the patch. Swapping these two (And the minimum and maximum values!) will swap what the up and down keys do to the value.

To change values in a different segment (assuming you know what this means) simply change the brown $2E in the tuner section. The same can be done with the jump table, but again this is complex.

In the first (Pogo) example the thrust can vary between +-32, changing by 4 per press. It is normally -14 (Slightly upwards.) In the second example the raygun shot's vertical speed can be 0 (default) +64 (Maximum) or -64 (Minimum.) Since the change rate is also 64, it can have no 'in between' values here, just up, along or down.

The Keen:Modding thread for this patch can be found at: http://keenmodding.org/viewtopic.php?t=1229

Keen 1 tune jetpack pogo patch

################ Tuner Patch ###############
#Make space for patch
%patch $55EF $EB $4A #Skip diagonal key checking
%patch $4A45 $C3     #And Vorticon death border flash

#Jump table
%patch $4A48 $00 $56 $00 $56 $14 $56 $0A $56             
             $0A $56 $0A $56 $14 $56 $00 $56
             $14 $56

#This is the jump to $55F1
%patch $3F49 $E9 $16A5W

#Tuning code
%patch $55F1 $2E $A1
             {$3F5BW}		#What we're altering 1
             $8B $1E $CA $7F       
             $D1 $E3 {$2E} $FF $A7
             $4A48W 		#Location of jump table
             $3D [$0020W]		#Max value
             {$7F} $16 $05	#7F = up key
             $0004W  $EB $0D	#Increase rate
             $3D [$FFC0W]		#Minimum value
             {$7C} $0C $05	#7C = down key
             [$FFFCW] $EB $03	#Decrease rate
             $B8 [$FFF2W] $2E $A3 #Default value (When no keys pressed)
             {$3F5BW}		#What we're altering 2 (Must match 1)
             $E9 $E932W

Keen 1 tune raygun shot angle patch

################ Tuner Patch ###############
#Make space for patch
%patch $55EF $EB $4A #Skip diagonal key checking
%patch $4A45 $C3     #And Vorticon death border flash

#Jump table
%patch $4A48 $00 $56 $00 $56 $14 $56 $0A $56             
             $0A $56 $0A $56 $14 $56 $00 $56
             $14 $56

#This constitutes the jump to $55F1
%patch $55EF $90 $90

#Tuning code
%patch $55F1 $2E $A1
             {$46EEW}		#What we're altering 1
             $8B $1E $CA $7F       
             $D1 $E3 {$2E} $FF $A7
             $4A48W 		#Location of jump table
             $3D [$0040W]		#Max value
             {$7F} $16 $05	#7F = up key
             $0040W  $EB $0D	#Increase rate
             $3D [$FFC0W]		#Minimum value
             {$7C} $0C $05	#7C = down key
             [$FFC0W] $EB $03	#Decrease rate
             $B8 [$0000W] $2E $A3 #Default value (When no keys pressed)
             {$46EEW}		#What we're altering 2 (Must match 1)
             $E9 $001DW