Map mode
Map mode
I finally got fed up with Mindbelt's "map mode" editing, and dived headfirst into the source code to do something about it. So now I just need a comprehensive guide to the sprite numbers etc. in map mode.
Information I have:
Level entrances - sprite number is same as level number
Level blockers - 32768 + level number
Information I don't have:
Teleporters - I am aware that these are handled differently in Keen 1 and 3, and not at all in Keen 2.
Messie - Not really important for me, but hey.
Help would be appreciated.
Information I have:
Level entrances - sprite number is same as level number
Level blockers - 32768 + level number
Information I don't have:
Teleporters - I am aware that these are handled differently in Keen 1 and 3, and not at all in Keen 2.
Messie - Not really important for me, but hey.
Help would be appreciated.
Oh please oh please oh PLEASE add connections for Keen 3 map teleporters like we have for bridges and switches!
Keen 1's teleporters are fixed locations. That is, each teleporter sprite goes to a preset location on the map. Aside from patching, they cannot be altered at all, so there's not much to do there.
Keen 3 is more complex. From http://levellord.rewound.net/Index/Keen ... orters.txt :
* Teleporter sprites are 3840 ($F00) to 4095 ($FFF)
* A teleporter's 'identity' is ([sprite] - [sprite] mod 16) mod 256
* A teleporter's destination is [sprite] mod 16
Keen 1's teleporters are fixed locations. That is, each teleporter sprite goes to a preset location on the map. Aside from patching, they cannot be altered at all, so there's not much to do there.
Keen 3 is more complex. From http://levellord.rewound.net/Index/Keen ... orters.txt :
In summary: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]
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.
* Teleporter sprites are 3840 ($F00) to 4095 ($FFF)
* A teleporter's 'identity' is ([sprite] - [sprite] mod 16) mod 256
* A teleporter's destination is [sprite] mod 16
LL: I'll see what I can do. Thx for the info.
BTW, still looking for Nessie information if anyone cares.
EDIT: Of course, if no-one cares, that's fine too. I don't.
ANOTHER EDIT: I should stop doing that. I just felt like yelling about how Euphoria in its quest for simplicity and power somehow overlooked the switch statement. I'm drowning in "elsif"s.
BTW, still looking for Nessie information if anyone cares.
EDIT: Of course, if no-one cares, that's fine too. I don't.
ANOTHER EDIT: I should stop doing that. I just felt like yelling about how Euphoria in its quest for simplicity and power somehow overlooked the switch statement. I'm drowning in "elsif"s.
Here's some patch adurdin made for me when I did A New Dope which required an entirely different route for Messie. Here's copied directly from the mod's patch file:
I think, but am not sure, those $52 and $25 are the X and Y coordinates where Messie first appears when the map is loaded. Can't remember how its route is built, but it was simple, done with sprites (check the original Keen 3 map for their values, or my AND map).
Code: Select all
# Messie patch, big thanks to adurdin for making this.
%patch $893B $90 $90 $90
%patch $895F $90 $90
%patch $896F $B8 $52 $00
%patch $8975 $B8 $25 $00
%patch $89C1 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90
*Rubs hands*
Like KR says, it's simple enough!
Path: Messie checks the 9 tiles around it (In a 3x3 square) for its sprite values, starting from top left and moving right and down. The first it encounters it will move to. (This means a dead end WILL reverse its direction)
The following values are used:
8192 ($2000) Normal path
8448 ($2100) Weed (Messie pause movement for a bit
8704 ($2200) Land (Messie can lose Keen if he moves away while Messie is on this square)
Start position:
Messie appears each time the map is loaded. Default is 33,7 on map. (In code 35,9) If no path tile is present, there is no Messie. If there is a path tile but no path tiles connected to it, Messie will move left until it either leaves the map or hits a path. (This can be used for a short 'one time only' stretch for Messie to move to.)
KR's patch changes the start position of Messie, but I'm not sure what else it does. (The new start position values are not where the default ones are.) A pity Andy isn't here to explain it.
Like KR says, it's simple enough!
Path: Messie checks the 9 tiles around it (In a 3x3 square) for its sprite values, starting from top left and moving right and down. The first it encounters it will move to. (This means a dead end WILL reverse its direction)
The following values are used:
8192 ($2000) Normal path
8448 ($2100) Weed (Messie pause movement for a bit
8704 ($2200) Land (Messie can lose Keen if he moves away while Messie is on this square)
Start position:
Messie appears each time the map is loaded. Default is 33,7 on map. (In code 35,9) If no path tile is present, there is no Messie. If there is a path tile but no path tiles connected to it, Messie will move left until it either leaves the map or hits a path. (This can be used for a short 'one time only' stretch for Messie to move to.)
KR's patch changes the start position of Messie, but I'm not sure what else it does. (The new start position values are not where the default ones are.) A pity Andy isn't here to explain it.