summaryrefslogtreecommitdiff
path: root/Add-a-new-spawn-point.md
blob: 81ea632e54e64a63c74eaad61cfb67ea1c4b1f71 (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
61
62
63
64
65
66
67
68
69
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 [data/engine_flags.asm]

```diff
EngineFlags:
	...
	; fly
	...
	engine_flag wVisitedSpawns, SPAWN_GOLDENROD
+	engine_flag wVisitedSpawns, SPAWN_GLOBALTERMINAL
```

Then edit [maps/GlobalTerminalOutSide.asm]

```diff
...
	def_callbacks
+	callback MAPCALLBACK_NEWMAP, .Flypoint

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

Then compile your project and you're done