********** 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 $23A70 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 Carrot Courier is spawned or wants to jump; 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 Carrot Courier is spawned with a action of the first kind, then cycles forever between four actions of the second kind (Walk 1, walk 2...) until something happens to it. (It gets shot or 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 your slug 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 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. (For example if you make your slug turn into a skypest when shot, all levels with slugs must also have a skypest in them, or you must patch the cache.) There are two bits of shorthand you should know; any patch with 'spawn' in it means that the game uses this to create a sprite from nothing; it's where a sprite 'starts' Any patch with [Random] in it means that the game randomly changes a sprite to do this, like slug sliming. 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 mimrock spawn a slug, all difficulties of mimrock will do this and will act *exactly* like a slug, if you patch the slug, the mimrocks will also be affected. 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 make the Bounderbounce only up and down (This can be done by altering one of its spawning actions) the two l/r bounding strings can be used by another sprite, say, to add another two animation frames to the inchworm. (You will of course have to patch the animatiosn, animation speeds, etc or your inchworm will become a bounder!) Keen is very complex and his actions are grounped into the next section, '11.)action_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: ### #??? ### %patch $24640 $0000W #??? ### #Apple ### %patch $25BEA $217CW #Walk 1 %patch $25C08 $219AW #Walk 2 %patch $25C26 $215EW #Walk 3 %patch $25C44 $21D6W #Poleclimb up 1 %patch $25C62 $21B8W #Poleclimb up 2 (Goto 1) %patch $25C80 $2212W #poleclimb d 1 %patch $25C9E $2230W #poleclimb d 2 %patch $25CBC $224EW #poleclimb d 3 %patch $25CDA $21F4W #poleclimb d 4 (Goto 1) %patch $25CF8 $0000W #Apple fall? ### #Asparagusto ### %patch $256A4 $1C36W #Run 1 %patch $256C2 $1C54W #Run 2 %patch $256E0 $1C72W #Run 3 %patch $256FE $1C18W #Run 4 (Goto 1) %patch $2571C $0000W #Asparagusto ??? ### #Boobus Bombs ### %patch $2469A $0C2CW #Sit 1 %patch $246B8 $0C0EW #Sit 2 %patch $246D6 $0C68W #Thrown 1 %patch $246F4 $0C86W #Thrown 2 %patch $24712 $0CA4W #Thrown 3 %patch $24730 $0CC2W #? 1 %patch $2474E $0CE0W #? 2 %patch $2476C $0000W #? 3 (Vanish) ### #Boobus Tuber ### %patch $25E60 $23F2W #Walk 1 %patch $25E7E $2410W #Walk 2 %patch $25E9C $242EW #Walk 3 %patch $25EBA $23D4W #Walk 4 (Goto 1) %patch $25ED8 $0000W #Jump (Wait to land) %patch $25EF6 $246AW #Boobus die 1 %patch $25F14 $2488W #Boobus die 2 %patch $25F32 $0000W #Boobus die 3 (Vanish, takes long time) %patch $25F50 $24E2W #Boobus death smoke 1 (Bang) %patch $25F6E $2500W #Boobus death smoke 2 (Bang 2) %patch $25F8C $251EW #Boobus death smoke 3 %patch $25FAA $253CW #Boobus death smoke 4 %patch $25FC8 $255AW #Boobus death smoke 5 %patch $25FE6 $0000W #Boobus death smoke 6 (Vanish) ### #Broccoli ### %patch $2544C $19DEW #Run 1 %patch $2546A $19FCW #Run 2 %patch $25488 $1A1AW #Run 3 %patch $254A6 $19C0W #Run 4 (Goto 1) %patch $254C4 $1A56W #Headslam 1 %patch $254E2 $1A74W #Headslam 2 %patch $25500 $1A92W #Headslam 3 %patch $2551E $1AB0W #Headslam 4 %patch $2553C $1ACEW #Headslam 5 %patch $2555A $1AECW #Headslam 6 %patch $25578 $1B0AW #Headslam 7 %patch $25596 $1B28W #Headslam 8 %patch $255B4 $19C0W #Headslam 9 (Goto run) ### #Carrot ### %patch $2560E $1BA0W #Carrot run 1 %patch $2562C $1BBEW #Carrot run 2 %patch $2564A $1BDCW #Carrot run 3 %patch $25668 $1B82W #Carrot run 4 (Goto 1) %patch $25686 $0000W #Carrot jump (Wait to land) ### #Chips ### See FRENCHY ### #Door ### %patch $251BE $1732W #Door sit (Keep sitting) %patch $251DC $0000W #Door open (Vannish) ### #Flower power ### %patch $2465E $0BF0W #Sit 1 %patch $2467C $0BD2W #Sit 2 %patch $2478A $0D1CW #Blinking 1 %patch $247A8 $0CFEW #Blinking 2 ### #Frenchy ### %patch $258A2 $1E34W #Walk 1 %patch $258C0 $1E52W #Walk 2 %patch $258DE $1E70W #Walk 3 %patch $258FC $1E16W #Walk 4 (Goto 1) %patch $2591A $1EACW #Charge 1 %patch $25938 $1ECAW #Charge 2 %patch $25956 $1EE8W #Charge 3 %patch $25974 $1E8EW #Charge 4 (Goto 1) %patch $25992 $1F24W #Spit chip 1 %patch $259B0 $1F42W #Spit chip 2 %patch $259CE $1E16W #Spit chip 3 (Goto walk) %patch $259EC $1F7EW #Chip 1 %patch $25A0A $1F60W #Chip 2 (Goto 1) ### #Grape ### %patch $2573A $0000W #Grape fall (Wait to land) %patch $25758 $1CEAW #Grape rise (Goto sit) %patch $25776 $0000W #Grape sit (Wait for Keen) ### #Melon ### %patch $25A28 $1FBAW #l/r 1 %patch $25A46 $1FD8W #l/r 2 (Make pip) %patch $25A64 $1F9CW #l/r 3 (Goto 1) %patch $25A82 $2014W #d 1 %patch $25AA0 $2032W #d 2 (Make pip) %patch $25ABE $1FF6W #d 3 (Goto 1) %patch $25ADC $206EW #l/r pip 1 %patch $25AFA $2050W #l/r pip 2 (Goto 1) %patch $25B18 $20AAW #d pip 1 %patch $25B36 $208CW #d pip 2 (Goto 1) ### #Melon minecart ### %patch $25866 $1DF8W #1 %patch $25884 $1DDAW #2 (Goto 1) ### #Pea and Peapod ### %patch $25D16 $0000W #Pea spat out (Wait to land) %patch $25D34 $22C6W #Pea Walk 1 %patch $25D52 $22E4W #Pea Walk 2 %patch $25D70 $2302W #Pea Walk 3 %patch $25D8E $22A8W #Pea Walk 4 (Goto 1) %patch $25DAC $233EW #Peapod walk 1 %patch $25DCA $235CW #Peapod walk 2 %patch $25DE8 $237AW #Peapod walk 3 %patch $25E06 $2320W #Peapod walk 4 (Goto 1) %patch $25E24 $23B6W #Peapod spit 1 %patch $25E42 $2320W #Peapod spit 2 (Goto walk) ### #Squash ### %patch $25B54 $20E6W #Walk 1 %patch $25B72 $20C8W #Walk 2 (Goto 1) %patch $25B90 $2122W #Jump 1 %patch $25BAE $0000W #Jump 2 (Wait to land) %patch $25BCC $20C8W #Land (Goto walk) ### #Tater Trooper ### %patch $25794 $1D26W #Walk 1 %patch $257B2 $1D44W #Walk 2 %patch $257D0 $1D62W #Walk 3 %patch $257EE $1D08W #Walk 4 (Goto 1) %patch $2580C $1D9EW #Stab 1 %patch $2582A $1DBCW #Stab 2 %patch $25848 $1D08W #Stab 3 (Goto walk) ### #Tomato ### %patch $255D2 $1B64W #Tomato 1 %patch $255F0 $1B46W #Tomato 2 (Goto 1) ### #Watermelon ### See MELON ### #Wilted flower ### %patch $251FA $178CW #Wilted flower 1 %patch $25218 $17AAW #Wilted flower 2 %patch $25236 $17C8W #Wilted flower 3 %patch $25254 $17E6W #Wilted flower 4 %patch $25272 $1804W #Wilted flower 5 %patch $25290 $176EW #Wilted flower 6 (Goto 1) %patch $252AE $1840W #Smoke disappear 1 %patch $252CC $185EW #Smoke disappear 2 %patch $252EA $187CW #Smoke disappear 3 %patch $25308 $0000W #Smoke disappear 4 (Vanish) %patch $25326 $18B8W #Smoke appear 1 %patch $25344 $18D6W #Smoke appear 2 %patch $25362 $18F4W #Smoke appear 3 %patch $25380 $1912W #Smoke appear 4 %patch $2539E $1930W #Smoke appear 5 %patch $253BC $194EW #Smoke appear 6 %patch $253DA $0000W #Smoke appear 7 (Vanish) %patch $253F8 $196CW #Boobus death smoke (Stay) %patch $25416 $0000W #Boobus death smoke (Vanish)