Patch:Sprite type
This page is a tutorial page on patching sprite types. It contains information on what sprite type is, how to patch it, and a list of the possible types for all Keen games. A sprite's type is the variable the game uses to identify what 'kind' of sprite a sprite is. It has a lot of untapped potential since, while every different sprite (Yorp, Garg, etc) is usually given a different value, most of the time the value goes unused. As an example, in Keen 1 the only properties that matter are 2 (stompable), 10 (kill enemies), 11(kill enemies and Keen) and 15 (freeze Keen)
Patching the sprite's type is quite simple, the type is set whenever a sprite is spawned and remains the same throughout the game. A single patch that changes the value is all that is required:
| Patch: Keen 1 |
|
| Patch: Keen 5 |
|
Sprite type itself is pretty useless when used alone, since in the end it is just setting the value that other code checks. Sprite type is used most often in Patch:Sprite collision, though (at the moment) Keen's sprite collision code is not well understood, so for things solely affecting Keen (What freezes or stuns him, etc) altering a sprite's type is the only way to change this.
Values in games
While not quite hard-coded it is difficult to change what the default values of sprite type do in games. Following is a list of all the default values in the Keen games.
Keen 1: 0 Don't appear 1 Keen (All sprites pass through sprite) 2 Yorp (when stood on becomes stomped Yorp) 3 Garg (Kill Keen) 4 Vorticon (Kill Keen, die when chain is shot) 5 Butler bot (Push Keen) 6 Tank bot (Push Keen, ignore enemy shot type sprite) 8 Chain (Shots hit sprite) 10 Keen's shot (Kill sprites that react to it) 11 Enemy shot (Kill enemies that react to it, and Keen.) 12 Icecubetter (Do nothing) 13 Zap-zot (Shots hit sprite) 14 Chain zap-zot (Same as 13) 15 Icecube (Freeze Keen)
Keen 2: 0 Don't appear 1 Keen (All sprites pass through sprite) 2 Vorticon (Kill Keen) 3 Vortikid (Stun Keen) 4 Vort Elite (Kill Keen, ignore enemy shot type sprites) 5 Scrub (Push Keen, can be stood on) 6 Robot (Same as 4) 7 Platform (Same as 5) 8 Tantalus (Shots hit sprite) 10 Keen's shot (Kill sprites that react to it) 11 Enemy shot (Kill enemies that react to it and Keen. Pass through tank bot) 13 Zap-zot (Shots hit sprite)
Keen 3: 0 Don't appear 1 Keen (All sprites pass through sprite) 2 Vorticon (Kill Keen) 3 Vortikid (Stun Keen) 4 Vortimom (Push Keen, ignore enemy shot type) 5 Meep (Push Keen, ignore Meep shot type) 6 Vortninja (Kill Keen) 7 Foob (Shots hit sprite) 8 Ball (Push Keen, can be stood on) 9 Jack (Same as 6) 11 Nothing 13 Heart\sparks (Do nothing) 15 Keen's shot (Kill sprites that react to it) 16 Enemy shot (Kill Keen and sprites that react to it) 17 Meep shot (Kill Keen) 18 Zap-zot (Shots hit it) 19 MM-zap-zot (Same as 18)
Keen 4: $00 $00 #Don't appear $01 $00 #Misc $02 $00 #Keen $03 $00 #Keen's shot $04 $00 #Gem $05 $00 #Poison slug $06 $00 #Council member $08 $00 #Egg $09 $00 #Mad Mushroom $0A $00 #Arachnut $0B $00 #Skypest $0C $00 #Wormouth $0D $00 #Cloud $0E $00 #Berkeloid $0F $00 #Bounder $10 $00 #Inchworm $11 $00 #The Foot $12 $00 #Lick $13 $00 #Mimrock $14 $00 #Platform $15 $00 #Dopefish $16 $00 #Schoolfish $17 $00 #Sprite $18 $00 #Lindsey $19 $00 #Lightning $1A $00 #Smirky $1B $00 #Bluebird $1E $00 #Wetsuit $1F $00 #Enemy bullet $20 $00 #Mine $21 $00 #Stunned sprite $22 $00 #Keen K flag
Keen 5: $00 $00 #Don't appear $01 $00 #Misc $02 $00 #Keen $03 $00 #Keen's shot $04 $00 #Enemy shot $05 $00 #Items $06 $00 #Platform $07 $00 # $08 $00 # $09 $00 #Sparky/Shelley $0A $00 #Mine $0B $00 #Slicestar $0C $00 #Robo Red $0D $00 #Spirogrip $0E $00 #Ampton $0F $00 #Shooting gun $10 $00 #Volte face $11 $00 # $12 $00 #Spindred $13 $00 #Shikadi Master $14 $00 #Shikadi $15 $00 #Shocksund $16 $00 #Sphereful $17 $00 #Korath $18 $00 #Teleporter $19 $00 #Q.E.D
Keen 6: $00 $00 #Don't appear $01 $00 #Misc $02 $00 #Keen $03 $00 #Keen's shot $04 $00 #Enemy shot $05 $00 #Gem $06 $00 #Moving Plat $07 $00 #Bloog $08 $00 #Blooglet $09 $00 #Unused $0A $00 #Fleex $0B $00 #Unused $0C $00 #Molly $0D $00 #Babobba $0E $00 #Bobba $0F $00 #Unused $10 $00 #Nospike $11 $00 #Gik $12 $00 #Enemy gun $13 $00 #Orbatrix $14 $00 #Bip $15 $00 #Flect $16 $00 #Blorb $17 $00 #Ceilick $18 $00 #Blooguard $19 $00 #??? $1A $00 #Bipship $1B $00 #Sandwich $1C $00 #Rope $1D $00 #Card $1E $00 #??? $1F $00 #??? $20 $00 #Rope $21 $00 #Card $22 $00 #??? $23 $00 #???
Keen Dreams: TODO