**This post describes how to mod the teleporters in Keen 1 v1.31**

Teleporters are indicated on the map level with a sprite number in the range $20 - $2F. This number gives both the teleporter style (on snow or on dirt) and the destination number. You can have three teleporter destinations, numbered 1, 2, and 3. (You can have as many teleporters as you want, but they can only take you to three places)

**Teleporter Sprite Numbers:**

Code: Select all

```
Sprite Number Teleporter Style Destination Number
$21 (33) Snow 1
$22 (34) Snow 2
$23 (35) Snow 3
$2D (45) Dirt 1
$2E (46) Dirt 2
$2F (47) Dirt 3
```

For example, suppose you want to make a teleporter to take Keen to X:34, Y:3 (as given by KeenWright). The true coordinates are X:36, Y:5. Multiplying by 16 and converting to hex gives X:$240, Y:$50. Converting these each to a pair of two-digit numbers gives X: $02 $40, Y: $00 $50. So to patch the X location, we'd use the bytes $40 $02, and for the Y location we'd use $50 $00. Clear? The offsets to patch are given in the table below:

**Teleporter Patch Offsets:**

Code: Select all

```
Destination Number X Offset Y Offset
1 $158DF $158E3
2 $158E9 $158ED
3 $158F3 $158F7
```

Code: Select all

```
%ext ck1
%version 1.31
%patch $158E9 $40 $02
%patch $158ED $50 $00
%end
```

**Teleporter Tile Numbers:**

Code: Select all

```
Teleporter Style Main Tile Animated Tiles
Snow 99 342-345
Dirt 325 338-341
```