summaryrefslogtreecommitdiff
path: root/Add-a-new-spawn-point.md
blob: 4f088a39630d7f19d6f0236f31248ad80a6eeef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
This tutorial is for how to add a new spawn point for fly.

After successfully achieved the "[Add a new map and landmark](https://github.com/pret/pokecrystal/wiki/Add-a-new-map-and-landmark)" tutorial, 

Simply edit [constants/map_data_constants.asm]:

```diff
; johto
        const SPAWN_NEW_BARK
        ...
        const SPAWN_GOLDENROD
+       const SPAWN_GLOBALTERMINAL`
```

Then edit [data/maps/spawn_points.asm]:

```diff
SpawnPoints:
   
        ...
        spawn GOLDENROD_CITY,                 15, 28
+       spawn GLOBAL_TERMINAL_OUTSIDE,         8, 10
```

Then edit [data/maps/flypoints.asm]

```diff
Flypoints:

...
; Johto
        ...
        flypoint GOLDENROD, GOLDENROD_CITY
+       flypoint GLOBALTERMINAL, GLOBAL_TERMINAL`
```

Then edit [constants/engine_flags.asm]

```diff
...
; wVisitedSpawns
                const ENGINE_FLYPOINT_GOLDENROD
+               const ENGINE_FLYPOINT_GLOBALTERMINAL`
```

Then edit [maps/GlobalTerminalOutSide.asm]

```diff
...
GlobalTerminalOutside_MapScripts:
        db 0 ; scene scripts
+       db 1 ; callbacks
+       callback MAPCALLBACK_NEWMAP, .Flypoint

+ .Flypoint:
+       setflag ENGINE_FLYPOINT_GLOBALTERMINAL
+       return`
```

Then compile your project and you're done