***************************************** 2.) How sprites behave [And creating more than one] ***************************************** These patches control what behaviours the sprites use. A behaviour is a small piece of code that tells a sprite what animation frames, animation speed, blah, blah, blah to use. For example, the Yorp looking around behaviour tells the Yorp to use the looking sprites, animate 4 frames and to not move. You can see that a number of patches here involve changing parts of these behaviours. What the patches in this section do is alter what behaviours each sprite is told to use. For example, you can make the Garg use all the yorp behaviours; it will behave EXACTLY like a Yorp. [If you alter the Yorp's behaviour, the Garg will also then be affected] This may sound a bit confusing, and indeed, this is the hardest section to understand, so its important to pay close attention to the notes that follow. 1.)Behaviours control stuff: The behaviours control what a sprite looks like, how it moves and how many animation frames it uses. A lot of patches given here alter the behaviours directly; for example, if you make the Yorp slower, you are altering a speed in the Yorp walking behaviour. What it is aimed to do here is alter how sprites act. For example, no matter how much you alter a Yorps speed, you cannot make it charge Keen. By altering its behaviour references, you can. Note also that behaviours also dictate what the sprite checks for, for example the search for Keen behaviour usually checks to see where Keen is, behaviours also usually check to see if the sprite is off the ground, near a wall, etc, so if a patch fails it may be due to the behaviour you've patched not finding any ground say, and thus switching to another before Keen sees it. Also, the speeds given in later sections are usually used by only one behaviour each, so if you patch a speed or behaviour only, the sprite may not behave as expected. You should make sure you know exactly what speed each behaviour uses [Usually pretty easy to tell] and patch it accordingly. This also means you can make the sprites [especially Vorticons] speeds do interesting things... 2.) Sprites reference behaviours: When a sprite is created it is given a 'default' behaviour; this tells the sprite what it is and controls what the sprite will do. For example the Yorp is given $4F $19 and the Garg $51 $1B If we patch a Garg to have $4F $19 then it will behave exactly like a Yorp [Of course it will kill Keen and spwan a dead Garg when shot and all the other stuff you'll see in later sections,, but it will *look* and *act* just like a Yorp] 3.) Behaviours reference behaviours: Just like a sprite has to be told what to behave like when created, it also has to be told what to behave like *after* having done something. For example, if a Garg charges Keen it has to be told what to do aterwards; should it become a Yorp? A Vorticon? Hell no, it has to be told to be a Garg. And where is it told to do this? In the behaviour its just done of course! So at the end of the 'Charging Garg' behaviour there is a bit saying, yes $51 $1B, so that it returns to Gargdom. 4.) What this means Now we know how things work we can start patching! If you patch the sprites default behaviour, it will be permanently changed into another sprite. For example, changing the Yorps default behaviour to Garg, it will act like a Garg, and since Gargs *never* turn into Yorps, it will stay a Garg forever. [But it will push Keen, not kill him and other Yorpy stuff] If you alter the behaviour at the end of a behaviour, the sprite will do something then change into another sprite. For example, altering the behaviour at the end of the Garg charge behaviour into change into Yorp, after all Gargs will charge Keen they will turn into Yorps. If you alter a behaviour other than those above, it is triggered randomply or by environment. For example, the Yorp search for Keen behaviour is triggered randomly during the Yorp walking behaviour. If this is altered to Garg walk behaviour the Yorp will randomly turn into a walking Garg when [And ONLY when!] its walking. This does not mean of course that other sprite can't use this behaviour, only that the only time it is 'naturally' activated is randomly when the Yorp is walking. By mixing these patches you can do quite complex things, so complex they will actually only make sense to you. For example, you can make a Yorp look around, become a Garg that then charges Keen and becomes a falling block chain. And worse as well, *any* sprite can be made to change into almost *any* other sprite, doing anything The watchword here is 'imagination' Don't try and see whats possible; instead think of something and try to make it possible. 5.)Some notes on specific behaviour reference values: Each behaviour here is explained followed by what its used for in brackets. You will notice many behaviours are used more than once, so pay attention to what you're patching. The behaviour $60 $33 is used for dead sprites and means Keen can't shoot or interact with them. When a sprite is given this value, it will just sit there; not animating or interacting in any way. The behaviour $9D $48 is used for shocked sprites, and ensures they animate and fall down. If changed to $60 $33 the shocked sprite will just sit there; if it is patched to make a live sprite, when shot the sprite will *immediately* become another one, whereas unlike patching the dead sprite property [see section 5.)] The shocked and dead sprite properties are thus both different and independent. If you make a sprite transform into another sprite, you must patch the dead sprite behaviour as well, otherwise the newly created sprite will be immortal [Default dead sprite behaviour is $60 $33, something used by BOTH dead and normal sprites. You CANNOT use the values in this section for sprites in section 5.) or you will crash the game.] The behaviour $E8 $47, as used by Zap/Zot sprites is complex; there are at least five different patches for the Zap/zot sprites because instead of one sprite, the zap/zot is actually seven. The first sprite is almost never used, the second appears only once [it is the first Zap/zot in the level] and the third is spawned when a shot hits a wall [Patching this makes a zap/zot that sticks to walls, but can be destroyed by shooting it.] The fourth appears when a shot hits a sprite [including other zap/zots, so patching both this and the third make all Zap/zots in the level indestructable] The rest aren't really used, but will all need to be patched if you want to be absolutely sure of changing the zap/zot properties. If Keen transforms into another sprite [A Yorp say] he can still be transformed back into Keen if he is shot, frozen, lands on a Yorp, and othersuch so long as they haven't been patched. This could make some interesting transformations... Also; the dead Keen behaviour is about the only useful one to use on other sprites as it doesn't return back to Keen. #A brief list of spawning sprite behavious: %patch $18B4 $4F $19 #Spawn a Yorp %patch $1871 $51 $1B #Spawn a Garg %patch $1803 $0E $1C #Spawn a Vorticon %patch $17C6 $C7 $1D #Spawn a Butler Bot %patch $1768 $75 $1F #Spawn a Tank Bot %patch $1911 $60 $33 #Spawn a falling block chain %patch $20F3 $92 $21 #Spawn icecube %patch $1A8F $9D $48 #Spawn a shot Yorp %patch $1BF5 $9D $48 #Spawn a shot Garg %patch $1DAD $9D $48 #Spawn a shot Vort %patch $4B7B $67 $38 #Spawn Keen #A complete list of sprite behaviours: %patch $18B4 $4F $19 #Yorp walks toward Keen, turns around when hitting walls [Yorp default] %patch $1A22 $4F $19 #Yorp walks toward Keen, turns around when hitting walls [Yorp after searching for Keen] %patch $1980 $D3 $19 #Yorp look for Keen [Randomly referenced when Yorp walking toward Keen] %patch $1A58 $D3 $19 #Yorp look for Keen [After Yorp has been stunned] %patch $1871 $51 $1B #Garg look for Keen [Garg default] %patch $1AD0 $51 $1B #Garg look for Keen [Randomly during Garg walking and after charging] %patch $1BCA $A8 $1A #Garg walks toward Keen and turns when hitting walls if just after Garg searching, will charge Keen if seen [After Garg seaching] %patch $1803 $0E $1C #Walk and turn when hitting walls, jump randomly [Vorticon default] %patch $1C5A $C8 $1C #Slide along turning when hitting walls [Randomly when Vorticon jumps, makes it jump high] %patch $1CF2 $15 $1D #Stay on ground, move towards Keen [After Vorticon jumps high (see $C8 $1C)] %patch $1D64 $0E $1C #Walk and turn when hitting walls, jump randomly [After Vorticon moves toward Keen] %patch $17C6 $C7 $1D #Walk and *reverse direction* when hitting walls or at end of platforms (but get stuck turning!) [Butler Bot default] %patch $1E51 $5E $1E #Face screen and animate [After moving Butler bot hits left wall] %patch $1E1D $5E $1E #Face screen and animate [After moving Butler bot comes to end of a platform] %patch $1E37 $5E $1E #Face screen and animate [After moving Butler bot hits right wall] %patch $1E74 $C7 $1D #Walk and *reverse direction* when hitting walls or at end of platforms (but get stuck turning!) [After Butler turns] %patch $1768 $75 $1F #Face screen, stand still [Tank Bot default] %patch $1EE5 $C1 $1F #Pause and shoot [Randomly during Tank Bot walking] %patch $1F4E $8F $1F #Pause, turn and face screen [After Tank Bot hits right wall] %patch $1F68 $8F $1F #Pause, turn and face screen [After Tank Bot hits left wall or end of platforms] %patch $1F8A $A9 $1E #Walk [After Tank Bot default] %patch $1FB7 $A9 $1E #Walk [After Tank turning *anywhere*] %patch $2040 $8F $1F #Pause, turn and face screen [After Tank Bot shoots] %patch $1A8F $9D $48 #Jump up then sink down while animating [Sshot Yorp] %patch $1BF5 $9D $48 #Jump up then sink down while animating [Shot Garg] %patch $1DAD $9D $48 #Jump up then sink down while animating [Shot Vorticon] %patch $2363 $9D $48 #Jump up then sink down while animating [Shot Vorticon produced when chain shot] %patch $1911 $60 $33 #Do nothing [For falling block Chain] %patch $21B5 $51 $21 #Move *diagonally* for a bit, then disappear [Used by down right Icecubette] %patch $21F1 $51 $21 #Move *diagonally* for a bit, then disappear [Used by up right Icecubette] %patch $222D $51 $21 #Move *diagonally* for a bit, then disappear [Used by down left Icecubette] %patch $2269 $51 $21 #Move *diagonally* for a bit, then disappear [Used by up left Icecubette] %patch $20F3 $92 $21 #Slide across hit a block and smash [Used by Icecubes] %patch $4759 $E8 $47 #Stay stationary, then dissapear [1st Zap/zot value, rarely used] %patch $47CA $E8 $47 #Stay stationary, then dissapear [2nd Zap/zot value, first Zap/zot in level] %patch $4828 $E8 $47 #Stay stationary, then dissapear [3rd Zap/zot value, When shots hit blocks] %patch $486A $E8 $47 #Stay stationary, then dissapear [4th Zap/zot value, when shots hit sprites] %patch $4976 $E8 $47 #Stay stationary, then dissapear [5th Zap/zot value, rarely used] %patch $49E2 $E8 $47 #Stay stationary, then dissapear [6th Zap/zot value, never used] %patch $4A21 $E8 $47 #Stay stationary, then dissapear [7th Zap/zot value, never used] %patch $46E9 $08 $48 #zaps/zots when hits something [Used by Keen's shot] %patch $490D $08 $48 #zaps/zots when hits something [Used by robot shot] %patch $48CE $8E $48 # freezes direction of movement and animation frame [Used by ALL dead sprites, changing affects ALL dead sprites] %patch $2730 $67 $38 #Keen standing [After Keen unfreezes] %patch $3D72 $67 $38 #Keen standing [When Keen lands on the ground] %patch $3E7F $67 $38 #Keen standing [After Keen shoots] %patch $4B7B $67 $38 #Keen standing [Keen default] %patch $3111 $67 $38 #Keen standing [Unknown use] %patch $3121 $54 $40 #Keen pogoing [Keen pogoes in midair?] %patch $3B21 $54 $40 #Keen pogoing [Keen presses pogo when on ground] %patch $3FB6 $54 $40 #Keen pogoing [Keen pogo bounces off ground] %patch $3913 $8B $3B #Keen starts jump [Unknown use] %patch $3AE8 $8B $3B #Keen starts jump [Keen jumps off ground] %patch $3AA2 $99 $3C #Keen falls [After stunning Yorp?] %patch $3AA2 $99 $3C #Keen falls [Keen falls off a ledge] %patch $3AA2 $99 $3C #Keen 'falls' [During jumping, after 'starts jump'] %patch $3FFA $99 $3C #Keen falls [When he stops pogoing in midair] %patch $3119 $C8 $3E #Keen starts pogo (Pogo spring coiled) [Unknown use] %patch $3DB7 $C8 $3E #Keen starts pogo (Pogo spring coiled) [Keen pogoes when in mid jump/fall] %patch $4079 $C8 $3E #Keen starts pogo (Pogo spring coiled)[Starts pogo off ground] %patch $3B43 $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $3B54 $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $3C60 $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $3C71 $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $3DD9 $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $3DEA $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $400E $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $401F $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $40BC $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $40CD $12 $3E #Keen standing2 [After shooting, all 10 related complexly] %patch $342F $F8 $41 #Don't follow dead Keen [Keen camera (If patched camera follows dead Keen)] %patch $42B3 $F8 $41 #Don't follow dead Keen [Keen camera (If patched camera follows dead Keen)] %patch $4275 $F8 $41 #Dead Keen [Keen when dead, camera doesn't follow] 6.) Spawn more than one sprite The patches allowing more than one sprite to be spawned at once work by altering game code so that the game doesn't stop after making one sprite, but moves on to the next one as well. This allows two [or more] sprites to be made from one sprite event. You can make three [or four, or five] sprites at once if you use two patches that follow one another [For example patch 2 and patch 3] Note that if a butler bot also spawns a vort, a vort will NOT spawn a butler bot. These patches are useful for example if you make a vorticon spawn a Yorp when it dies, it can then spawn both a Yorp AND a Garg [1 sprite splits into 2] #Spawned sprite patches: %patch $1776 $90 #Tank also spawns bulter bot %patch $17D4 $90 #Butler Bot also spawns Vorticon %patch $1842 $90 #Vort also spawns Garg %patch $187F $90 #Garg also spawns yorp %patch $18E2 $90 #Yorp also spawns chain %patch $191F $90 #Chain also spawns [nonmoving!] icecube