********** SPRITE ACTIONS ********** This section is involved with how sprites behave; more technically with their action references. This takes some time to explain. 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 animation, animation speed, collision reference 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 a Poison Slug is spawned or wants to slime; 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 Poison Slug is spawned with a action of the first kind, then cycles forever between two actions of the second kind (Crawl 1 and crawl 2) until something happens to it. (It gets shot or poops) 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 your QED suddenly become a Spindred 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 or Keen. Others may cause the sprite to freeze If your game crashes because it's spawned an uncached sprite you'll need to add a sprite to your level. Patches are labelled in brackets with what they do by default. For example the end of the Sparky's walk loop goes back to the start and is labelled (Keep walking) Other patches have $0000W (Do nothing) and mean that the sprite just keeps doing whatever. (Such as the goplats.) Other patches are labelled (Random) and indicate that a sprite does the action randomly, such as the Sparky looking for Keen when walking. 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, if you make a Shikadi spawn a Shocksund when shot, you will need to have BOTH in-level to avoid a cache error, and the spawned Shocksund will act just like a normal one. 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 'steal' space from other sprites and give it to others; if you for example limit the Shocksund to only two walking fames (Via a simple patch) You can use the extra animations (And actions) for it's barking say, or even for another sprite entirely. Keen is very complex and his actions are grounped into the next section, '12.) Actions_Keen' This section uses the same rules as here, but deals only with Keen. Now that that's out of the way, here are the sprite actions: ### #Airboard ### See Goplat ### #Doors ### %patch $31912 $15D4W #Open door %patch $31930 $15F2W #Open door %patch $3194E $0000W #Open door ### #Enemy shot ### #Spawn: %patch $10F0D $1DFEW #Spawn enemy gun - occurs once %patch $10F83 $1E3AW #Spawn enemy gun bullet - occurs every time it shoots %patch $10FBB $1EB2W #Spawn bullet zap when enemy bullet collides with Keen %patch $10FF8 $1EB2W #Spawn bullet zap when enemy bullet collides with ground %patch $3215A $1E1CW #Gun wait %patch $32178 $1DFEW #Gun Make shot %patch $32196 $1E58W #Pink shot %patch $321B4 $1E76W #Pink shot %patch $321D2 $1E94W #Pink shot %patch $321F0 $1E3AW #Pink shot %patch $3220E $1ED0W #Pink shot zaps %patch $3222C $0000W #Pink shot zaps ### #Fuses ### See Q.E.D ### #Goplat ### #Spawn Goplats: %patch $1006E $1B7CW #Spawn u/d/l/r purple goplat %patch $1007D $1B5EW #Spawn u/d/l/r red goplat %patch $106B5 $1C4EW #Spawn info path purple goplat %patch $106C4 $1C30W #Spawn info path red goplat %patch $10E36 $1DA4W #Spawn sneaky red goplat #Move u/d/l/r Red Goplat %patch $31EBA $0000W #Do nothing #Move u/d/l/r purple Goplat %patch $31ED8 $1B9AW #Purple plat %patch $31EF6 $1B7CW #Purple plat #Drop and rise goplat %patch $31F14 $0000W #Red Goplat %patch $31F32 $0000W #Red Goplat %patch $31F50 $0000W #Red Goplat %patch $31F6E $1C12W #Red Goplat #Info path red goplat %patch $31F8C $0000W #Red Goplat #Info path purple goplat %patch $31FAA $1C6CW #Purple plat %patch $31FC8 $1C4EW #Purple plat #Sneaky Goplat %patch $32100 $0000W #Wait %patch $3211E $1DE0W #Flee Keen %patch $3213C $1DA4W #Move back ### #Guns ### See ENEMY SHOT ### #Items ### %patch $31CA2 $1964W #Items %patch $31CC0 $1946W #Items %patch $31CDE $19A0W #Cards? %patch $31CFC $1982W #Cards? %patch $31D1A $0000W #Stuff got %patch $31D38 $19FAW #Vitalin got %patch $31D56 $1A18W #Vitalin got %patch $31D74 $1A36W #Vitalin got %patch $31D92 $0000W #Vitalin got ### #Korath ### #Spawn %patch $13910 $30D2W #Korath walking (When spawned) %patch $13951 $314AW #Korath sit (Random when walking) %patch $13985 $3168W #Korath stunned (When shot) %patch $3342E $30F0W #Korath walking %patch $3344C $310EW #Korath walking %patch $3346A $312CW #Korath walking %patch $33488 $30D2W #Korath walking %patch $334A6 $30D2W #Korath sit %patch $334C4 $0000W #Korath stunned ### #Lil Ampton ### #Spawn: %patch $112BD $21DCW #Lil Ampton walk %patch $11688 $239EW #Stunned Ampton #Do: %patch $11701 $2254W #Little Ampton reaches edge of platform (Turn) %patch $113E7 $2272W #Ampton climb poles (When near a pole) %patch $11349 $2308W #Ampton flick switch (When near switches.) %patch $112D9 $21DCW #Lil Ampton walk (Finnished pole sliding) %patch $32538 $21FAW #Lil Ampton walk %patch $32556 $2218W #Lil Ampton walk %patch $32574 $2236W #Lil Ampton walk %patch $32592 $21DCW #Lil Ampton walk (Keep walking) %patch $325B0 $21DCW #Lil Ampton turn (Go to walk) %patch $325CE $2290W #Lil Ampton start pole slide %patch $325EC $22AEW #Lil Ampton start pole slide (Go to pole slide) %patch $3260A $0000W #Lil Ampton pole slide (Wait for pole end) %patch $32628 $22EAW #Lil Ampton stop pole slide %patch $32646 $21DCW #Lil Ampton stop pole slide (Go to walk) %patch $32664 $2326W #Lil Ampton flip switch %patch $32682 $2344W #Lil Ampton flip switch %patch $326A0 $2362W #Lil Ampton flip switch %patch $326BE $2380W #Lil Ampton flip switch %patch $326DC $21DCW #Lil Ampton flip switch (Go to walk) %patch $326FA $0000W #Stunned Ampton ### #Q.E.D and FUSE ### A Q.E.D is a fuse that a MINE fragment can touch. #Spawn Q.E.D (And fuse!) %patch $139FC $3186W #QED\fuse #What Q.E.D\fuse does: %patch $334E2 $3186W #QED\fuse #Fuse smashed spawned %patch $FF7D $1AE6W #Unknown, related to fuses? %patch $31DCA $1A8CW #Lightening thing %patch $31DE8 $1A6EW #Lightening thing #Explosion, Q.E.D has 2 extra frames %patch $31E06 $1AC8W #QED explosion %patch $31E24 $1AAAW #QED explosion %patch $31E42 $1B04W #QED and fuse explosion %patch $31E60 $1B22W #QED and fuse explosion %patch $31E7E $0000W #QED and fuse explosion ### #Robo Red ### #Spawn: %patch $125EB $2734W #Robo Red move #Do: %patch $126B1 $2734W #Robo Red move (When done shooting) %patch $12648 $2752W #Robo Red pause before shoot (Keen lands near Red) %patch $12683 $2752W #Robo Red pause before shoot (Shot by Keen while moving) %patch $126C7 $27ACW #Robo Red shot (When Red shoots) %patch $12738 $27E8W #Robo Red shot smash (When hits Keen) %patch $12775 $27E8W #Robo Red shot smash (When hits walls) %patch $32A90 $2734W #Robo Red move (Keep moving) %patch $32AAE $2770W #Robo Red pause before shooting %patch $32ACC $278EW #Robo Red shoot (Pause between shots) %patch $32AEA $2770W #Robo Red shoot (Make shot, keep shooting) %patch $32B08 $27CAW #Robo Red shot %patch $32B26 $27ACW #Robo Red shot %patch $32B44 $2806W #Robo Red shot smash %patch $32B62 $0000W #Robo Red shot smash (Vannish) ### #Shelley ### #Spawn: %patch $11998 $2416W #Shelly walk (Spawned) #Do: %patch $11B95 $248EW #Shelley reaches edge of platform (Look to jump) %patch $119E4 $24CAW #Shelley fall (If looking to jump right and sees Keen) %patch $11A0E $24CAW #Shelley fall (If looking to jump left and sees Keen) %patch $11B07 $2524W #Shelly fall (If shot or Keened on ground) %patch $11B16 $2506W #Shelly fall (If shot or Keend in air) %patch $11B3F $2542W #Shelly smash (If hits Keen's head while falling) %patch $11A5A $25BAW #Spawn Shelley right fragment %patch $11A8D $25D8W #Spawn Shelley left fragment %patch $32772 $2434W #Shelly walk %patch $32790 $2452W #Shelly walk %patch $327AE $2470W #Shelly walk %patch $327CC $2416W #Shelly walk (Keep walking) %patch $327EA $24ACW #Shelly prepare to jump %patch $32808 $2416W #Shelly jump (Go to walk if Keen not seen) %patch $32826 $24E8W #Shelly fall %patch $32844 $0000W #Shelly fall (Wait to hit ground) %patch $32862 $0000W #Shelly smash (Wait to vanish) %patch $32880 $0000W #Shelly smash (Wait to vanish) %patch $3289E $2560W #Shelly smash smoke %patch $328BC $257EW #Shelly smash smoke %patch $328DA $259CW #Shelly smash smoke %patch $328F8 $0000W #Shelly smash smoke (Wait to vanish) %patch $32916 $0000W #Shelly fragments (Wait to vanish) %patch $32934 $0000W #Shelly fragments (Wait to vanish) ### #Shikadi ### #Spawn: %patch $12F1B $2D10W #Shikadi stand (Spawn) %patch $12FC3 $2D10W #Shikadi stand (Random when walking) %patch $1306D $2E3CW #Shikadi stunned #Do: %patch $13029 $2E00W #Shikadi polezaps (When passing pole) %patch $130E7 $2E5AW #Shikadi polezap (When Shikadi shoots) %patch $13170 $0000W #Nothing (When polezaps reach end of poles) %patch $3306C $2D2EW #Shikadi stand %patch $3308A $2D4CW #Shikadi stand %patch $330A8 $2D6AW #Shikadi stand %patch $330C6 $2D88W #Shikadi stand (Walk) %patch $330E4 $2DA6W #Shikadi walk %patch $33102 $2DC4W #Shikadi walk %patch $33120 $2DE2W #Shikadi walk %patch $3313E $2D88W #Shikadi walk (Keep walking) %patch $3315C $2E1EW #Shikadi polezaps %patch $3317A $2D88W #Shikadi polezaps (Walk) %patch $33198 $0000W #Shikadi stunned %patch $331B6 $2E78W #Shikadi polezap %patch $331D4 $2E5AW #Shikadi polezap ### #Shikadi Master ### #Spawn: %patch $12AB8 $2AF4W #Shikadi master stand (Spawn) #Do: %patch $12AE7 $2BA8W #Shikadi master teleport (After standing) %patch $12B13 $2B6CW #Shikadi master shoot (Random) %patch $12BA8 $2B6CW #Shikadi master shoot (When Master is shot by Keen) %patch $12B36 $2C20W #Master's shot (When Master shoots) #Teleporting (Produces groundsparks) %patch $12C5D $2AF4W #Shikadi master stand (After teleporting) %patch $12BFF $2C98W #Master sparks (Right) %patch $12C2D $2C98W #Master sparks (Left) #Shots %patch $12E2E $2C98W #Master sparks (Right shot hits ground) %patch $12E5C $2C98W #Master sparks (Left shots hit ground) %patch $32E50 $2B12W #Shikadi master stand %patch $32E6E $2B30W #Shikadi master stand %patch $32E8C $2B4EW #Shikadi master stand %patch $32EAA $2AF4W #Shikadi master stand (Keep standing) %patch $32EC8 $2B8AW #Shikadi master shoot %patch $32EE6 $2AF4W #Shikadi master shoot (Make shot, go to standing) %patch $32F04 $2BC6W #Shikadi master teleport %patch $32F22 $2BE4W #Shikadi master teleport %patch $32F40 $2C02W #Shikadi master teleport %patch $32F5E $2AF4W #Shikadi master teleport (Go to standing) %patch $32F7C $2C3EW #Master's shot %patch $32F9A $2C5CW #Master's shot %patch $32FB8 $2C7AW #Master's shot %patch $32FD6 $2C20W #Master's shot (Go back to start) %patch $32FF4 $2CB6W #Master sparks %patch $33012 $2CD4W #Master sparks %patch $33030 $2CF2W #Master sparks %patch $3304E $2C98W #Master sparks (Go to start) ### #Shikadi Mine ### #Spawn: %patch $11C82 $2644W #Shikadi mine change direction (Spawn) %patch $11FF5 $2662W #Shikadi mine detonate (When Keen is close) %patch $12187 $2662W #Shikadi mine detonate (Must be same as above) %patch $122A6 $2662W #Shikadi mine detonate (Must be same as above) %patch $1240C $2716W #Shikadi mine fragments (When mine explodes) %patch $1244F $2716W #Shikadi mine fragments (When mine explodes) %patch $12490 $2716W #Shikadi mine fragments (When mine explodes) %patch $124D6 $2716W #Shikadi mine fragments (When mine explodes) %patch $12509 $2716W #Shikadi mine fragments (When mine explodes) %patch $1253F $2716W #Shikadi mine fragments (When mine explodes) #When in-range %patch $11FF5 $2662W #Mine detonate (Touches Keen) %patch $12187 $2662W #Mine detonate (In range h) %patch $122A6 $2662W #Mine detonate (In range v) %patch $1205B $2626W #Mine move (Done changing direction) %patch $11FF5 $2662W #Shikadi mine detonate (Unknown) %patch $12187 $2662W #Shikadi mine detonate (When near Keen vertically) %patch $122A6 $2662W #Shikadi mine detonate (When near Keen horizontally) %patch $32964 $0000W #Shikadi mine sit %patch $32982 $2644W #Shikadi mine move %patch $329A0 $2608W #Shikadi mine change direction %patch $329BE $2680W #Shikadi mine detonate %patch $329DC $269EW #Shikadi mine detonate %patch $329FA $26BCW #Shikadi mine detonate %patch $32A18 $26DAW #Shikadi mine detonate %patch $32A36 $26F8W #Shikadi mine detonate %patch $32A54 $0000W #Shikadi mine detonate %patch $32A72 $0000W #Shikadi mine fragments ### #Shocksund ### #Spawn %patch $13296 $2F0EW #Shocksund walk #When shot %patch $133B7 $301CW #Shocksund stunned #Do %patch $132D6 $2E96W #Shocksund sit (Random when walking?) %patch $1331B $2ED2W #Shocksund bark (Randomly) %patch $1332F $2F0EW #Shocksund walk (After sitting) %patch $13525 $2F0EW #Shocksund walk (After jumping) %patch $132EF $2F86W #Shocksund jump (On flat ground) %patch $13474 $2F86W #Shocksund jump (At a platform's edge) %patch $133B7 $301CW #Shocksund stunned #Sitting %patch $331F2 $2EB4W #Shocksund sit %patch $33210 $2E96W #Shocksund sit #Barking %patch $3322E $2EF0W #Shocksund bark %patch $3324C $2F0EW #Shocksund Walk #Walking %patch $3326A $2F2CW #Shocksund walk %patch $33288 $2F4AW #Shocksund walk %patch $332A6 $2F68W #Shocksund walk %patch $332C4 $2F0EW #Shocksund walk #Jumping %patch $332E2 $2F2CW #Shocksund Walk %patch $33300 $2FC2W #Shocksund's shot %patch $3331E $2FA4W #Shocksund's shot %patch $3333C $2FFEW #Shocksund's shot smash %patch $3335A $0000W #Shocksund's shot smash %patch $33378 $0000W #Shocksund stunned ### #Slicestar ### #Spawn: %patch $117B2 $23BCW #Spawn nonbouncing Slicestar %patch $11860 $23DAW #Spawn bouncing Slicestar %patch $11A87 $23F8W #Smashed Slicestar %patch $32718 $0000W #l/r Slicestar (Do nothing) %patch $32736 $23DAW #Bouncy Slicestar (Do nothing) %patch $32754 $0000W #Slicestar smashed ### #Sparky ### #Spawn: %patch $11081 $1F0CW #Spawn Sparky (Walk) %patch $11196 $21BEW #Spawn stunned Sparky #Do: %patch $1108D $20ECW #Sparky charge (After preparing to charge and Keen is present) %patch $11003 $2074W #Sparky prepare to charge (Looking and sees Keen) %patch $110A3 $1F84W #Sparky look for Keen (Random) %patch $11234 $2164W #Sparky reaches edge of platform (Turn) %patch $32268 $1F2AW #Sparky walk %patch $32286 $1F48W #Sparky walk %patch $322A4 $1F66W #Sparky walk %patch $322C2 $1F0CW #Sparky walk (Keep walking) %patch $322E0 $1FA2W #Sparky look %patch $322FE $1FC0W #Sparky look %patch $3231C $1FDEW #Sparky look %patch $3233A $1FFCW #Sparky look %patch $32358 $201AW #Sparky look %patch $32376 $2038W #Sparky look %patch $32394 $2056W #Sparky look %patch $323B2 $1F2AW #Sparky look (Go to walk. [Keen not seen.]) %patch $323D0 $2092W #Sparky prepare to charge %patch $323EE $20B0W #Sparky prepare to charge %patch $3240C $20CEW #Sparky prepare to charge %patch $3242A $2074W #Sparky prepare to charge (Keep preparing) %patch $32448 $210AW #Sparky charge %patch $32466 $2128W #Sparky charge %patch $32484 $2146W #Sparky charge %patch $324A2 $20ECW #Sparky charge (Keep charging) %patch $324C0 $2182W #Sparky turn %patch $324DE $21A0W #Sparky turn %patch $324FC $1F0CW #Sparky turn (Go to walk) %patch $3251A $0000W #Stunned Sparky ### #Sphereful ### #Spawn %patch $13653 $303AW %patch $33396 $3058W #Sphereful %patch $333B4 $3076W #Sphereful %patch $333D2 $3094W #Sphereful %patch $333F0 $303AW #Sphereful (Go back to start) ### #Spindred ### %patch $128D8 $2A7CW #Spawn spindred %patch $32DD8 $2A9AW #Spindred %patch $32DF6 $2AB8W #Spindred %patch $32E14 $2AD6W #Spindred %patch $32E32 $2A7CW #Spindred (Keep on spinning) ### #Spirogrip ### #Spawn Spirogrip %patch $127DC $2824W #Spirogrip back up down (Rise) #Do: %patch $1282F $2A04W #Move down (Stop spinning) %patch $1283E $2A22W #Move left (Stop spinning) %patch $12820 $2A40W #Move up (Stop spinning) %patch $12811 $2A5EW #Move right (Stop spinning) #Spritogrip moves away from a wall it's stuck to: %patch $32B80 $2842W #Spirogrip back up down %patch $32B9E $29C8W #Spriogrip pause down %patch $32BBC $287EW #Spirogrip back up left %patch $32BDA $2914W #Spirogrip pause left %patch $32BF8 $28BAW #Spirogrip back up up %patch $32C16 $298CW #Spirogrip pause up %patch $32C34 $28F6W #Spirogrip back up right %patch $32C52 $2950W #Spirogrip puase right %patch $32C70 $2932W #Spirogrip spin %patch $32C8E $2950W #Spirogrip spin %patch $32CAC $296EW #Spirogrip spin %patch $32CCA $298CW #Spirogrip spin %patch $32CE8 $29AAW #Spirogrip spin %patch $32D06 $29C8W #Spirogrip spin %patch $32D24 $29E6W #Spirogrip spin %patch $32D42 $2914W #Spirogrip spin %patch $32D60 $2824W #Spirogrip move down %patch $32D7E $2860W #Spirogrip move left %patch $32D9C $289CW #Spirogrip move up %patch $32DBA $28D8W #Spirogrip move right ### #Volte Face ### #Spawn: %patch $10B13 $1CCCW #Volte Face %patch $10DE0 $1D44W #Volte Face stunned #Moving %patch $32028 $1CEAW #Volte Face %patch $32046 $1D08W #Volte Face %patch $32064 $1D26W #Volte Face %patch $32082 $1CCCW #Volte Face %patch $320A0 $1CCCW #Volte Face stunned