***************************************** Keen 3 Teleporters ***************************************** This document contains information on patching those pesky Keen 3 map teleporters. The sections are as follows: 1.) Identity- just what is *that* teleporter 2.) Sprites, your flexible friend 3.) Tiles; putting what where? 4.) Location, where was I going again? 5.) Things you can do: ******** 1.) Identity- just what is *that* teleporter ******** In the game there are 16 different types of teleporter, based on the hex number system. Sadly this means to do any decent work on them you'll need to know how to convert numbers into hexadecimal. First we should define each teleporter's type and the sprite it has (By default only!) Teleporters have no fixed location (And indeed their sprites can change too.) Here are the teleport types, their sprites and their hex sprites: # Dec Hex 0: 3842 [F02] 1: 3859 [F13] 2: 3877 [F25] 3: 3889 [F31] 4: 3911 [F47] 5: 3922 [F52] 6: 3947 [F6B] 7: 3955 [F73] 8: 3980 [F8C] 9: 3988 [F94] 10: 4014 [FAE] 11: 4025 [FB9] 12: 4032 [FC0] 13: 4063 [FDF] 14: 4072 [FE8] 15: 4094 [FFE] ******** 2.) Sprites, your flexible friend ******** Now, look at those hex sprites; notice anything? Well, they're really a subtle code; the 'F' tells Keen that this is a teleporter; the second digit tells Keen what type the teleporter is [Teleport 1,2,3...] and the final digit tells Keen what teleporter he will teleport to. By default the game uses 16 different types of teleporter (0-F) so the SECOND digits of all the teleporters are different. You shouldn't mess with these. If you do have two teleporters of the same type, only the bottom rightmost one in a level will animate when Keen teleports, and Keen will teleport to that same one from other teleporters. You will be interested in changing the last digit of the sprite since this defines where Keen is teleported to. NEVER try to make Keen teleport to a teleport type that hasn't been placed on the map. The first thing you will want to do is place all 16 (Or as many as you need) teleporters on the map. (Be sure to label them so you do not forget what types they are, using the letter tiles A,B,C, etc works well.) Next connect to two teleports make the LAST digit of the teleport Keen is GOING FROM the SAME as the SECOND digit of the teleport you want him to go TO. Repeating this process over and over will let you link up all your teleports. (Be sure to note where all your teleports go, a sketch may be useful.) This is the list in section 1, with notes: # Dec Hex Goes to... 0: 3842 [F02] Goes to 2 1: 3859 [F13] Goes to 3 2: 3877 [F25] Goes to 5 3: 3889 [F31] Goes to 1 4: 3911 [F47] Goes to 7 5: 3922 [F52] Goes to 2 6: 3947 [F6B] Goes to 11 7: 3955 [F73] Goes to 3 8: 3980 [F8C] Goes to 12 9: 3988 [F94] Goes to 4 10: 4014 [FAE] Goes to 14 11: 4025 [FB9] Goes to 9 12: 4032 [FC0] Goes to 0 13: 4063 [FDF] Goes to 15 14: 4072 [FE8] Goes to 8 15: 4094 [FFE] Goes to 14 We can see that at default, there are only 13 locations Keen can teleport to, how unlucky. [2, 3 and 14 are repeated twice] ******** 3.) Tiles; putting what where? ******** The animation sequence will occur twice at *each* teleporter, Keen will be invisible while it does. Changing the animation speed roxxorz. %patch $B990 $82 $00 #Start of animation sequence at teleporter Keen starts at %patch $BA03 $86 $00 #End of animation sequence at teleporter Keen starts at %patch $B9F9 $04 $00 #Animation speed %patch $BAF4 $82 $00 #Start of animation sequence at teleporter Keen arrives at %patch $BB67 $86 $00 #End of animation sequence at teleporter Keen arrives at. %patch $BB5D $04 $00 #Animation speed %patch $BA45 $86 $00 #Tile appearing at teleport Keen left [after animation] %patch $BBA9 $86 $00 #Tile appearing at teleport Keen arrives at [after animation] #Teleporter sound %patch $B988 $12 $00 ******** 4.) Location, where was I going again? ******** Now we deal with exactly where each teleporter goes to; there are no patches here; unlike Keen 1, map teleporters in Keen 3 look for sprites; specifically other teleporter sprites. When the game is told to look for teleporter x to teleport Keen to, it looks for all sprites whose *second* hex digit is x, by default each teleporter has a different second digit, but this doesn't have to be the case. For example, if both teleporter 6 and 7 have the second digit 2; they will both be seen by the game as kinda being the *same* kind of teleport. This can cause problems; for when there is more than one of the 'same' teleport sprites on the map, the game will teleport Keen to the lowest rightmost one. So if you put more than one copy of a teleport, or make two teleports have the same 2nd digit, be aware that Keen can only teleport *to* the lowest one. This can be useful as well as a problem. So how do you change the locations? Simple, First, change the sprite of the teleporter Keen is teleporting *from* so it will go to the teleporter you want. Second, move the sprite of this teleporter to the location you want it; unless it is already there. Third, be careful, Keen teleports to the bottom right remember? This means you can add as many copies of this teleporter above and\or left of it [for Keen to use going somewhere else] and it won't affect where Keen goes. ******** 5.) Things you can do: ******** One way teleporters are possible if you either 1.) Place 2+ copies of a teleport in a level (The top-leftmost ones cannot be teleported to.) or 2.) Make sure no other teleporter sprite teleports to it. Teleporter sprites can be used, even if there isn't a teleporter tile there; this is useful for making 'hidden' teleporters. Conversely, if the tile that replaces the teleporter is not a teleporter tile, it will seem as if the the teleporter Keen has arrived at isn't there, very useful. You can have as many teleporters as you like, but more than about 32 starts to slow the game. You can make teleporter mazes, animating monuments, gates, whatever, be inventive!