********** KEEN ACTIONS ********** Since Keen's actions are so complex, they are stored here for convenience. Here, like the previous section you can alter what Keen does, but unlike the previous section, Keen is far more complicated; he often waits for keys to be pressed, or collides with things or has to have seperate actions for lots of things. (Turning while wlaking down a hill for example.) There are about 20 unknown or poorly known actions, 17 of them belong to Keen. If you don't know what it does, experiemnt, if you find out, contact me. Some actions you'll find easy to edit, others will be more slippery and complex. It is not wise to make Keen turn into a sprite, he might not turn back, but you can use as many death actions as you like. (Making Keen die say if he gets bored.) There are many subrotuines and such that tell sprites how to act, these are hard to alter, but you can see simple patches for them in other sections, for example the speed patches in section 2.) However, the greatest part of what makes a sprite what it is is kept in a small 30 character long string that defines the sprite's animations, animation speed, collision action and more. There are literally hundreds of these strings and they are all stored one after the other amongst text and error lists. Rather than have a lot of 'goto' instructions in game, sprites use simple references to these. The references start with $2EE70 as 'zero' Since the reference defines the string, and the string defines almost everything else, you can change how a sprite acts by changing these. There are two kinds used, first those used to change a sprite, such as when Keen is spawned or wants to shoot; these are stored in the sprite action proper. They occur randonly or when certain things happpen. The second kind are stored in the strings later on in the program; each string has a reference at the end that tells the sprite what to do next. So for example, the Keen is spawned with a action of the first kind, then cycles forever as 'standing' the second kind until something happens to him. (He moves, shoots, jumps...) You will thus notice in the lists following a lot of individual spawning actions, followed by long lists of 'looping' actions. All can be edited into anything you want, but try to remember to make sense; actions cycle on purpose and you don't want to have Keen suddenly become a skypest and vannish now do you? Now on to editing these actions; for a list of what action does what, look at the previous section; it can get pretty complicated, but usually you can get a 'feel' for how things work; not all actions can be used everywhere, some can be used only on the map, or only with items. Others may cause the Keen to freeze. You shouldn't get uncached sprites with Keen, so long as you don't use 'enemy' actions for him. There are two bits of shorthand you should know; any patch with 'start' or 'spawn' in it means that the game uses this to create a start from nothing; it's where a action 'begins' Any patch with [Random] in it means that the game randomly does this, though this is rare. Some actions are marked [Minor] meaning that though they are used, it is only occasionally to surprise you. To change a action, simply find the entry on the action list you want and replace the default action with this. Remember to think things through though, for example, loops usually start somewhere, move on step by step, then at the last step go back to the beginning, and so on and so on... so be careful not to break a loop accidently or get yourself into troubble. You can erase actions easily enough (Replace 'Keen bored' with 'Keen stand' to stop him being bored say.) and use this elsewhere (To give him four pole animations say.) It takes a bit of skill, but once you get the hang of it you can shuffle actions with ease. Keen's actions are divided into several sections in this order: Map Keen, Standing and walking, Looking, Jumping and pogoing, Climbing and poles, Shooting, Swimming, and Misc. The final section, Move Screen is for patches that stop the screen moving whe Keen does something (Like grip a ledge or look up/down) ### #Map Keen ### %patch $DF10 $EC $14 #Spawn Map Keen [Appear on map] %patch $E033 $EC $14 #Map Keen standing still [Turning on map] %patch $E107 $EC $14 #Map Keen standing still [After Foot drops off] %patch $3044A $00 $00 #Map Keen [Do nothing, wait for keypress] %patch $30378 $0A $15 #Map Keen bored [Wave] %patch $30396 $28 $15 #Map Keen waving when bored 1 %patch $303B4 $46 $15 #Map Keen waving when bored 2 %patch $303D2 $64 $15 #Map Keen waving when bored 3 %patch $303F0 $82 $15 #Map Keen waving when bored 4 %patch $3040E $EC $14 #Map Keen waving when bored 5 [Goes to still MapKeen] %patch $DE9F $92 $14 #Spawn Map Keen riding foot [Ride] %patch $3031E $B0 $14 #Map Keen riding foot 1 %patch $3033C $92 $14 #Map Keen riding foot 2 [Keeps riding foot] %patch $3042C $A0 $15 #Start moving %patch $DFB0 $A0 $15 #Map Keen moving [Keen moving] %patch $30C88 $1A $1E #Walking Keen change direction 1 [Also used while walking] %patch $30CA6 $38 $1E #Walking Keen change direction 2 %patch $30CC4 $56 $1E #Walking Keen change direction 3 %patch $30CE2 $74 $1E #Walking Keen change direction 4 %patch $30D00 $92 $1E #Walking Keen change direction 5 %patch $30D1E $B0 $1E #Walking Keen change direction 6 %patch $30D3C $CE $1E #Walking Keen change direction 7 %patch $30D5A $FC $1D #Walking Keen change direction 8 [Go to 1] %patch $3035A $CE $14 #Start swimming [At water's edge] %patch $E25B $CE $14 #Map Keen swimming 1 [Keep swimming] %patch $E2CD $CE $14 #Map Keen swimming 2 [Change direction] %patch $E2B5 $CE $14 #Map Keen swimming [Stop swimming when on land] %patch $E2BA $A0 $15 #Map Keen walking [Start walking on land] ### #Standing and walking ### %patch $B844 $8C $09 #Spawn Keen [Stand] %patch $BA76 $94 $10 #Stop walking [Stand] %patch $BBC3 $8C $09 #Keyblock [E.g press l and r at same time, Stand still] %patch $2F818 $8C $09 #Keen standing [Keep standing] %patch $BF7E $94 $10 #Keen start walking 1 [Minor] %patch $BFA0 $D0 $10 #Keen start walking 2 [Minor] %patch $BFC3 $B2 $10 #Keen start walking 3 [Minor] %patch $BFCA $EE $10 #Keen start walking 4 [Minor] %patch $2FF20 $B2 $10 #Keen walking 1 %patch $2FF3E $D0 $10 #Keen walking 2 %patch $2FF5C $EE $10 #Keen walking 3 %patch $2FF7A $94 $10 #Keen walking 4 [Go to 1] %patch $BE24 $98 $0C #Keen looking down while walking [Stop walking, look down] %patch $BE40 $8C $09 #Keen looks up while walking [Keep walking, screen shifts] %patch $BEC7 $A6 $0D #Keen shooting up while walking [Pause, shoot up] %patch $BED1 $6A $0D #Keen shooting while walking [Keep walking, shoot] %patch $BF1D $66 $11 #Keen jumping while walking [Jump] %patch $BF36 $0C $11 #Impossible pogo [Pogo while walking] %patch $D38A $A2 $11 #Keen walk off an edge [Fall] %patch $D845 $2A $11 #Keen walk off an edge [Fall, also used when Keen pogoing hits ground] %patch $D415 $8C $09 #Keen walks against walls [Stand] %patch $D423 $8C $09 #Keen walks against left wall [Stand] ### #Looking ### %patch $BB76 $02 $0C #Keen start looking up %patch $BCD5 $8C $09 #Keen start looking up 2 [Minor] %patch $BE40 $8C $09 #Keen starts looking up while walking %patch $2FA8E $20 $0C #Keen looking up [Screen doesn't shift] %patch $2FAAC $00 $00 #Keen looks up while up is pressed %patch $BB8D $3E $0C #Keen starts looks down %patch $BE24 $98 $0C #Keen starts looking down while walking %patch $D8C4 $3E $0C #Keen starts looking down [Something to do with map Keen?] %patch $2FACA $5C $0C #Keen looks down [Screen doesn't shift] %patch $2FAE8 $7A $0C #Keen looks down %patch $2FB06 $00 $00 #Keen looks down while down is pressed %patch $2FB24 $8C $09 #Keen stops looking down [Screen doesn't shift] %patch $2FB42 $A2 $11 #Keen stops looking down [Screen moves back up] %patch $2FB60 $00 $00 #Keen keeps looking down ### #Jumping and pogoing [In that order] ### %patch $BB01 $66 $11 #Keen start jumping while standing %patch $BDDB $A2 $11 #Keen start jumping down off a ledge %patch $BF1D $66 $11 #Keen start jumping while walking %patch $C6BB $66 $11 #Keen start jumping on a pole %patch $2FFF2 $84 $11 #Keen jumping 1 %patch $30010 $A2 $11 #Keen jumping 2 [Fall if not hitting ground] %patch $3002E $C0 $11 #Keen jumping 3 [Falling] %patch $3004C $A2 $11 #Keen jumping 4 [Keep falling] %patch $BB29 $0C $11 #Keen start pogoing %patch $BF36 $0C $11 #Keen start pogoing while walking [Impossible pogo] %patch $C4AC $2A $11 #Keen pogoing while jumping\falling %patch $D845 $2A $11 #Pogo Keen hits ground [Keep pogoing, also used when Keen walks slowly off an edge] %patch $2FF98 $2A $11 #Keen pogoing 1 %patch $2FFB6 $48 $11 #Keen pogoing 2 %patch $2FFD4 $00 $00 #Keen pogoing 3 [Falling, wait to land] %patch $C409 $A2 $11 #Keen falling [Animate slowly] %patch $C410 $C0 $11 #Keen falling [Animate slowly] %patch $C03C $8C $09 #Keen turning while jumping [Stand] %patch $C628 $A2 $11 #Keen stop pogoing while pogoing [Fall] %patch $D2CD $2A $11 #No clipping cheat [Fall, used 'normally' sometimes] %patch $D53B $94 $10 #Keen lands on ground [Pause, stand] %patch $D54A $8C $09 #Keen falls off edge or falls past pole end [Stand, then fall] ### #Climbing and poles [Pole shooing is under 'Shooting'] ### %patch $2FD7C $F0 $0E #Keen on a pole [Stay still] %patch $C6F0 $0E $0F #Keen start going up a pole %patch $C8B1 $0E $0F #Keen start going up a pole [Unknown] %patch $2FD9A $2C $0F #Keen going up a pole 1 %patch $2FDB8 $4A $0F #Keen going up a pole 2 %patch $2FDD6 $0E $0F #Keen going up a pole 3 [Go to 1] %patch 26 $F0 $0E #Keen start going down a pole 1 %patch $C700 $68 $0F #Keen start going down a pole 2 %patch $C7D3 $F0 $0E #Keen start going down a pole [When at top of pole] %patch $C7F3 $F0 $0E #Keen start going down a pole [Change direction from going up] %patch $C8BD $F0 $0E #Keen start going down a pole [Press u+d at same time] %patch $C7FF $68 $0F #Keen start going down a pole [Unknown] %patch $2FDF4 $86 $0F #Keen going down a pole 1 %patch $2FE12 $A4 $0F #Keen going down a pole 2 %patch $2FE30 $C2 $0F #Keen going down a pole 3 %patch $2FE4E $68 $0F #Keen going down a pole 4 [Go to 1] %patch $C6BB $66 $11 #Keen jumping off a pole Special jump up] %patch $C762 $A2 $11 #Keen Turning while on pole [Change animation l/r] %patch $C879 $A2 $11 #Keen Falling off pole [Fall] ### #Shooting [l/r then u/d; on ground, then in air, on poles then Keen's shot] ### #l/r while standing: %patch $BAC0 $6A $0D #Keen start shooting %patch $BED1 $6A $0D #Keen start shooting while walking %patch $C99F $6A $0D #Keen start shooting [Minor] %patch $CA42 $56 $12 #Keen start shooting [Unknown] %patch $2FBF6 $88 $0D #Keen shooting l/r 1 %patch $2FC14 $8C $09 #Keen shooting l/r 2 [Go back to standing] #Shooting up while standing: %patch $BAB8 $A6 $0D #Keen start shooting up %patch $BEC7 $A6 $0D #Keen start shooting up while walking %patch $CA62 $A6 $0D #Confirm shoot upwards [Can't do so if this is changed] %patch $D50F $6A $0D #Keen start shooting down while turning on a hill %patch $D520 $38 $12 #Keen start shooting up while turning on a hill 1 %patch $D525 $A6 $0D #Keen start shooting up while turning on a hill 2 %patch $2FC32 $C4 $0D #Keen shooting up 1 %patch $2FC50 $02 $0C #Keen shooting up 2 [Go to looking up] #l/r while in air [Jumping or pogoing] %patch $C488 $DE $11 #Keen start shooting [Jumping] %patch $C604 $DE $11 #Keen start shooting [Pogoing] %patch $D50A $DE $11 #Keen start shooting [Unknown] %patch $3006A $FC $11 #Keen shoot l/r in air 1 %patch $30088 $1A $12 #Keen shoot l/r in air 2 %patch $300A6 $A2 $11 #Keen shoot l/r i air 3 [Go to falling] #Up in air %patch $C480 $38 $12 #Keen start shooting [Jumping] %patch $C5FC $38 $12 #Keen start shooting [Pogoing] %patch $CA21 $B0 $12 #Confirm shoot [Can't if this is changed] %patch $300C4 $56 $12 #Keen shooting up in air 1 %patch $300E2 $74 $12 #Keen shooting up in air 2 %patch $30100 $A2 $11 #Keen shooting up in air 3 [Go to falling] #Down in air %patch $C490 $92 $12 #KKeen start shooting [Jumping] %patch $C60C $92 $12 #Keen start shooting [Pogoing] %patch $C9E2 $FC $11 #Confirm shoot [Can't if this is changed] %patch $3011E $B0 $12 #Keen shoot down 1 %patch $3013C $CE $12 #Keen shoot down 2 %patch $3015A $A2 $11 #Keen shoot down 3 [Go to falling] #l/r on a pole %patch $C672 $E0 $0F #Keen start shooting %patch $CA82 $E0 $0F #Confirm shoot [Can't if this is changed] %patch $2FE6C $FE $0F #Keen shooting on a pole 1 %patch $2FE8A $F0 $0E #Keen shooting on a pole 2 [Go to still on pole] #u/d on a pole %patch $C66B $1C $10 #Keen shoots up on pole %patch $CAC5 $1C $10 #Confirm shoot [Can't if this is changed] %patch $2FEA8 $3A $10 #Keen shoots up on pole 1 %patch $2FEC6 $F0 $0E #Keen shoots up on pole 2 [Go to still on pole] %patch $C679 $58 $10 #Keen shooting down on a pole %patch $CB06 $58 $10 #Confirm shoot [Can't if this is changed] %patch $2FEE4 $76 $10 #Keen shooting down on a pole 1 %patch $2FF02 $F0 $0E #Keen shooting down on a pole 2 #Keen's shot %patch $E614 $38 $17 #Spawn Keen's shot %patch $305C4 $56 $17 #Keen's bullet 1 %patch $305E2 $74 $17 #Keen's bullet 2 %patch $30600 $92 $17 #Keen's bullet 3 %patch $3061E $38 $17 #Keen's bullet 4 [Go back to 1] %patch $E63F $B0 $17 #Spawn smashed shot %patch $3063C $CE $17 #Keen's bullets zaps %patch $3065A $00 $00 #Keen's bullets zaps [Disappear] ### #Swimming ### %patch $F625 $EC $19 #Spawn Keen swimming (Starts Well of wishes) %patch $F8F1 $28 $1A #Spawn Keen swimming [unknown] %patch $F8F8 $46 $1A #Spawn Keen swimming [unknown] %patch $F8FF $28 $1A #Spawn Keen swimming [unknown] %patch $30878 $0A $1A #Keen swims 1 %patch $30896 $EC $19 #Keen swims 2 %patch $308D2 $0A $1A #Keen swims 3 %patch $308D2 $EC $19 #Keen swims 4 [Go to 1] %patch $12411 $B0 $36 #Keen eaten by Dopefish [Disappear] %patch $3255A $CE $36 #Keen disappears after being eaten %patch $12255 $CE $36 #Keen disappeared [Restart level] %patch $3253C $CE $36 #Keen dead [Restart level] %patch $CC3C $2E $0D #Keen dies (Well of wishes) %patch $CC4E $4C $0D #Dead Keen is 'killed' (Well of Wishes) %patch $2FBBA $2E $0D #Keen die swimming sprawled (Exits level if offscreen.) %patch $2FBD8 $4C $0D #Keen die swimming clutched (Exits level if offscreen.) ### #Misc ### %patch $BC06 $AA $09 #Keen bored [Look up] %patch $2F836 $8C $09 #Keen looking up when bored [Go back to standing] %patch $BC3A $C8 $09 #Keen very bored [Shrug-blink] %patch $2F854 $E6 $09 #Keen shrugs 1 [Look at player] %patch $2F872 $04 $0A #Keen shrugs 2 [Blink] %patch $2F890 $22 $0A #Keen shrugs 3 [Look at player] %patch $2F8AE $40 $0A #Keen shrugs 4 [Blink 2] %patch $2F8CC $5E $0A #Keen shrugs 5 [Look at player] %patch $2F8EA $8C $09 #Keen shrugs 6 [Shrug, go back to standing] %patch $BC4F $D6 $0A #Keen EXTREMELY bored [Sit and read book] %patch $2F962 $F4 $0A #Keen reads book 1 [Sit down] %patch $2F980 $12 $0B #Keen reads book 2 %patch $2F99E $30 $0B #Keen reads book 3 %patch $2F9BC $4E $0B #Keen reads book 4 %patch $2F9DA $6C $0B #Keen reads book 5 [Start flipping pages] %patch $2F9F8 $8A $0B #Keen reads book 6 %patch $2FA16 $4E $0B #Keen reads book 7 [Keep flipping pages] %patch $BC95 $A8 $0B #Keen stops reading book [When key pressed] %patch $2FA34 $C6 $0B #Keen stops reading book 1 %patch $2FA52 $E4 $0B #Keen stops reading book 2 %patch $2FA70 $8C $09 #Keen stops reading book 3 [Go back to standing] %patch $BC32 $7C $0A #Keen starts mooning %patch $2F908 $9A $0A #Keen moons 1 %patch $2F926 $B8 $0A #Keen moons 2 %patch $2F944 $8C $09 #Keen moons 3 [Go back to standing] %patch $CC7E $10 $0D #Keen dies %patch $CC6C $F2 $0C #Dead Keen is 'killed' %patch $2FB7E $F2 $0C #Keen dies sprawled (Exits level if offscreen.) %patch $2FB9C $10 $0D #Keen dies clutched (Exits level if offscreen.) %patch $B994 $3C $0E #Keen turns away from screen when flicking switches %patch $2FCAA $00 $0E #Keen turns away from screen [Doors, switches and gemholders] %patch $B99B $E2 $0D #Keen starts finishing flicking switches %patch $2FC6E $00 $0E #Keen finishes flicking switches 1 %patch $2FC8C $8C $09 #Keen finishes flicking switches 2 [Go to standing] %patch $D19D $1E $0E #Keen lines up with gem holder [Vital] %patch $D1E8 $1E $0E #Keen places gem, start door %patch $D1D3 $3C $0E #Keen turns away while placing gem %patch $2FCAA $00 $0E #Keen turns away from screen [Doors, switches and gemholders] %patch $C349 $EC $17 #Remove door when door has opened %patch $BA09 $3C $0E #Keen starts to enter doors [Turn away from screen] %patch $2FCAA $00 $0E #Keen turns away from screen [Doors, switches and gemholders] %patch $BA16 $5A $0E #Keen starts walking into doors %patch $2FCC8 $00 $00 #Keen walks into doors 1 %patch $2FCE6 $78 $0E #Keen walks into doors 2 %patch $2FD04 $96 $0E #Keen walks into doors 3 %patch $2FD22 $B4 $0E #Keen walks into doors 4 %patch $2FD40 $D2 $0E #Keen walks into doors 5 %patch $2FD5E $8C $09 #Keen walks into doors 6 [Produce standing Keen at new door] %patch $87BF $EC $12 #Keen starts gripping ledge left %patch $D752 $EC $12 #Keen starts gripping ledge left 2 %patch $D67B $EC $12 #Keen starts gripping ledge right %patch $30178 $0A $13 #Keen gripping ledge %patch $30196 $00 $00 #Keen gripping ledge [Hang on until arrow pushed] %patch $C98A $A2 $11 #Keen lets go when ledge gripping [Fall] %patch $C8FB $28 $13 #Keen sarts pulling himself up from ledgegripping %patch $301B4 $46 $13 #Keen pulls himself up from ledgegripping 1 %patch $301D2 $64 $13 #Keen pulls himself up from ledgegripping 2 %patch $301F0 $82 $13 #Keen pulls himself up from ledgegripping 3 %patch $3020E $A0 $13 #Keen pulls himself up from ledgegripping 4 %patch $3022C $8C $09 #Keen pulls himself up from ledgegripping 5 [Standing] %patch $CE54 $A2 $11 #Unknown Keen %patch $CE8C $A2 $11 #Unknown Keen %patch $D2CD $2A $11 #No clipping cheat fall through ground [Occasionally used 'normally'] %patch $D53B $94 $10 #Keen lands on ground %patch $D54A $8C $09 #Keen falls off edge or falls past pole end %patch $FAAA $DF $1D #Keen after finishes level [Exit] %patch $131C3 $BB $3A #Keen after finishes level [Exit, unknwon use] ### #Move Screen ### Using these patches will make the screen center on Keen during an action; for example when Keen looks up/down the screen doesn't center on him, but using the patches will mean he can't look up or down, because the screen will remain centered on him. %patch $874C $00 $00 #Can't look up %patch $8782 $00 $00 #Can't look down %patch $87BF $00 $00 #Ledgegripping %patch $87C9 $00 $00 #Keen pulls himself up from ledgegripping 1 %patch $87D3 $00 $00 #Keen pulls himself up from ledgegripping 2 %patch $87DD $00 $00 #Keen pulls himself up from ledgegripping 3 %patch $87E7 $00 $00 #Keen pulls himself up from ledgegripping 4 %patch $8F7E $00 $00 #Walking 1 (Doesn't do anthing?) %patch $8FA0 $00 $00 #Walking 2 (Crashes game) %patch $8FC3 $00 $00 #Walking 3 (Doesn't do anthing?) %patch $8FCA $00 $00 #Walking 4 (Doesn't do anthing?) %patch $C409 $00 $00 #Falling (Speed Keen's falling animation) %patch $C410 $00 $00 #Falling (Speed Keen's falling animation)