Page 1 of 1

What the parts are worth

Posted: Thu Sep 18, 2008 12:57 pm
by levellass
Found while looking for Tulip's patch.

The four part items (And several other tiles like the pogo) have the possibility of giving Keen something else besides the spaceship parts, anything from ammunition to a pogo to allowing him to skip levels.

At the same time, what is marked as having 'got' a part can be changed too; you can get a highscore entry for finishing level 16 for example instead of having got the whiskey. This is controlled as follows:

EDIT: Added a bit more detail

Code: Select all

#Type table for following patches:
$94: Joystick  $96: Vaccum      $98: Whiskey  $9A: Pogo       
$9C: Battery   $9E: Yellow card $A0; Red card $A2: Green card 
$A4: Blue card $A6: Level 1     $A8: Level 2  $AA: Level 3
$AC: Level 4   $AE: Level 5     $B0: Level 6  $B2: Level 7
$B4: Level 8   $B6: Level 9     $B8: Level 10 $BA: Level 11
$BC: Level 12  $BE: Level 13    $C0: Level 14 $C2: Level 15
$C4: Level 16  $C6: Lives       $C8: Ammo     $CA: Points

#Condition table for following patches: (Got IF value is...)
$72: Equal or more   $74: Not
$75: Equals          $77: Equal or less


-------------------------------------------------------------------------------
#This patch stops various items SETTING Keen's value to x and instead makes them ADD
#x to his current value. These are VITAL for some fun things such as making the Joystick
#another raygun (That gives 10 shots say)

#Item counters ADD (Instead of SET):
%patch $4446 $83 $06 $94 $AA $01 $90 #Joystick
%patch $445E $83 $06 $96 $AA $01 $90 #Battery
%patch $446A $83 $06 $98 $AA $01 $90 #Vaccum
%patch $4452 $83 $06 $9C $AA $01 $90 #Whiskey
%patch $44AB $90 $83 $06 $9A $AA $01 #Pogo
-------------------------------------------------------------------------------


#Change what the items are worth/do
#Here the first byte is the type the last (Usually $74) is the condition

#Have how many and what at game start
#First byte is what, last two are how many (By default Keen is given 4x0 parts)
%patch $9012 $94 $AA $00 #joystick 
%patch $9018 $9C $AA $00 #battery 
%patch $901E $96 $AA $00 #vacum 
%patch $9024 $98 $AA $00 #everclear 
%patch $9006 $C8 $AA $0A #ammunition

#How many of what item tiles give:
%patch $4448 $94 $AA $01 #Joystick
%patch $4454 $9C $AA $01 #Battery
%patch $4460 $96 $AA $01 #Vacum
%patch $446C $98 $AA $01 #Everclear
%patch $44A2 $C8 $AA $05 #Raygun

#What lights up status window tiles (Default, use lit tile if NOT 0)
%patch $101D $94 $AA $00 $74 #Joystick
%patch $1049 $9C $AA $00 $74 #Battery
%patch $1075 $96 $AA $00 $74 #Vacum
%patch $10A1 $98 $AA $00 $74 #Whiskey

#What we need before we can win: (Default: win if all 4 NOT 0)
%patch $8022 $94 $AA $00 $74 #Joystick
%patch $8029 $9C $AA $00 $74 #Battery
%patch $8030 $96 $AA $00 $74 #Vacum
%patch $8037 $98 $AA $00 $74 #Whiskey

#What makes the parts appear in the highscores: (Default: Sho if NOT 0)
%patch $8C14 $94 $AA $00 $74 #Joystick
%patch $8C38 $9C $AA $00 $74 #Battery
%patch $8C5E $96 $AA $00 $74 #Vacum
%patch $8C85 $98 $AA $00 $74 #Whiskey

#What makes the parts appear at the BwB-parts window: (Default appear IF 0)
%patch $AE72 $94 $AA $00 $75 #Joystick
%patch $AE97 $9C $AA $00 $75 #Battery
%patch $AEBC $96 $AA $00 $75 #Vacum
%patch $AEE1 $98 $AA $00 $75 #Whiskey

So for example, setting the Joystick to $A8 means that when it is got, level 2 is automatically done and Keen can skip it. (But the joystick is not given!) Setting it to $CA $AA $64 makes it a 100 point item. You can make parts give you several keycards, or take a pogo or even make it so a level is 'undone' and can be played again.

I have also added patches to let you change the conditions, so you can win if you have x or more of something instead of the default win ONLY with x.

I hope this fires up people's creativity :)

Posted: Wed May 27, 2009 10:16 am
by Benvolio
#What makes the parts appear in the highscores:
%patch $8C14 $94 #Joystick
%patch $8C38 $9C #Battery
%patch $8C5E $96 #Vacum
%patch $8C85 $98 #Whiskey
I've a question... what makes the parts NOT appear in the high scores?? That would be a useful patch for my purposes!

Posted: Sat May 30, 2009 11:30 am
by levellass
Simple enough, change the values! So for example, if we want NONE of the items to ever appear, we simply make the value something Keen will not have, in this example, the blue card:

Code: Select all

#No parts appear in high scores:
%patch $8C14 $A4 #Joystick
%patch $8C38 $A4 #Battery
%patch $8C5E $A4 #Vacum
%patch $8C85 $A4 #Whiskey 
A related patch can make a part appear only if Keen gets it twice, ten times, etc.

Posted: Sat May 30, 2009 10:24 pm
by Benvolio
Thanks a million, it is now pitifully obvious to me all of a sudden, despite my lack of programming ability!