Added encounter data for Diamond, Pearl, and Platinum.

Finally!  Location order is the same as from the old dex, which was
something like the game but ultimately arbitrary, so it's not any better
now.

This takes a very different approach to storage, rather than copying the
game exactly and trying to fix everything in code.  Comments coming
shortly so other people can actually make use of this.
This commit is contained in:
Eevee 2009-05-01 06:20:18 -07:00
parent afa6c061b6
commit 9f6f210fa5
8 changed files with 11015 additions and 0 deletions

View file

@ -0,0 +1,5 @@
id,name
4,Gen 3 game in slot 2
3,PokéRadar
2,Time of day
1,Swarm
1 id name
2 4 Gen 3 game in slot 2
3 3 PokéRadar
4 2 Time of day
5 1 Swarm

View file

@ -0,0 +1,11 @@
id,encounter_condition_group_id,name
1,1,During a swarm
10,4,Leaf Green
9,4,Fire Red
8,4,Emerald
7,4,Sapphire
6,4,Ruby
5,3,Using PokéRadar
4,2,Night
3,2,Day
2,2,Morning
1 id encounter_condition_group_id name
2 1 1 During a swarm
3 10 4 Leaf Green
4 9 4 Fire Red
5 8 4 Emerald
6 7 4 Sapphire
7 6 4 Ruby
8 5 3 Using PokéRadar
9 4 2 Night
10 3 2 Day
11 2 2 Morning

View file

@ -0,0 +1,27 @@
id,encounter_type_id,encounter_condition_group_id,rarity
1,1,1,20
2,1,2,10
3,1,,10
5,1,4,4
6,1,3,1
4,1,3,5
26,5,,1
25,5,,4
24,5,,5
23,5,,30
22,5,,60
21,4,,1
20,4,,4
19,4,,5
18,4,,30
17,4,,60
16,3,,1
15,3,,4
14,3,,5
13,3,,30
12,3,,60
11,2,,1
10,2,,4
9,2,,5
8,2,,30
7,2,,60
1 id encounter_type_id encounter_condition_group_id rarity
2 1 1 1 20
3 2 1 2 10
4 3 1 10
5 5 1 4 4
6 6 1 3 1
7 4 1 3 5
8 26 5 1
9 25 5 4
10 24 5 5
11 23 5 30
12 22 5 60
13 21 4 1
14 20 4 4
15 19 4 5
16 18 4 30
17 17 4 60
18 16 3 1
19 15 3 4
20 14 3 5
21 13 3 30
22 12 3 60
23 11 2 1
24 10 2 4
25 9 2 5
26 8 2 30
27 7 2 60

View file

@ -0,0 +1,6 @@
id,name
1,Walking in grass/caves
2,Surfing
3,Fishing with Old Rod
4,Fishing with Good Rod
5,Fishing with Super Rod
1 id name
2 1 Walking in grass/caves
3 2 Surfing
4 3 Fishing with Old Rod
5 4 Fishing with Good Rod
6 5 Fishing with Super Rod

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,142 @@
id,location_id,internal_id,name
1,1,0,1F
2,1,0,2F
3,1,0,B1F a
4,1,0,B1F b
5,1,0,B1F c
6,1,0,B2F a
7,1,0,B2F b
8,1,0,B2F c
9,1,0,B3F a
10,1,0,B3F b
11,1,0,B3F c
12,1,0,B3F d
13,1,0,B3F e
14,1,0,B4F a
15,1,0,B4F b
16,1,0,B4F c
17,1,0,B4F d
18,1,0,B5F
19,2,0,
20,3,0,
21,4,0,
22,5,0,
23,5,0,entrance
24,5,0,inside
25,6,0,
26,7,0,1F
27,7,0,B1F
28,7,0,B2F
29,7,0,B3F
30,7,0,B4F
31,7,0,B5F
32,8,0,1F
33,8,0,B1F
34,9,0,1F
35,9,0,B1F
36,10,0,1F
37,10,0,B1F
38,11,0,1F
39,11,0,2F
40,11,0,3F
41,11,0,4F
42,11,0,5F
43,12,0,
44,13,0,
45,14,0,
46,15,0,
47,16,0,
48,17,0,High-level (rooms 16-21)
49,17,0,Low-level (rooms 4-9)
50,17,0,Mid-level (most rooms)
51,18,0,
52,19,0,
53,20,0,
54,21,0,Floaroma City side
55,21,0,Jubilife City side
56,22,0,Eterna City side
57,22,0,Floaroma City side
58,23,0,
59,24,0,
60,25,0,
61,26,0,
62,27,0,Celestic City side
63,27,0,Solaceon City side
64,28,0,Celestic City side
65,28,0,Eterna City side
66,29,0,Hearthome City side
67,29,0,Pastoria City side
68,30,0,
69,31,0,
70,32,0,
71,33,0,
72,34,0,
73,35,0,
74,36,0,
75,37,0,
76,38,0,
77,39,0,
78,40,0,
79,41,0,
80,42,0,
81,43,0,
82,44,0,Area 1
83,44,0,Area 2
84,44,0,Area 3
85,44,0,Area 4
86,44,0,Area 5
87,44,0,Area 6
88,45,0,
89,46,0,
90,47,0,
91,48,0,
92,49,0,
93,50,0,2F
94,50,0,3F
95,50,0,4F
96,50,0,5F
97,50,0,6F
98,50,0,7F
99,50,0,B1F
100,50,0,blizzard
101,50,0,cave
102,50,0,Route 207
103,50,0,Route 211
104,50,0,Route 216
105,50,0,snowfall
106,51,0,1F
107,51,0,2F
108,51,0,B1F
109,51,0,inside
110,51,0,inside B1F
111,51,0,inside exit
112,52,0,
113,53,0,
114,54,0,
115,54,0,expansion
116,55,0,
117,55,0,1F
118,55,0,B1F left
119,55,0,B1F right
120,55,0,B2F left
121,55,0,B2F right
122,55,0,B3F
123,56,0,
124,57,0,2F
125,57,0,2F left room
126,57,0,2F leftmost room
127,57,0,2F middle room
128,57,0,2F private room
129,57,0,2F right room
130,57,0,2F rightmost room
131,57,0,dining room
132,57,0,entrance
133,58,0,
134,59,0,
135,60,0,
136,61,0,
137,62,0,
138,63,0,after
139,63,0,before
140,78,0,
141,17,0,"Mid-level (rooms 1, 10-15)"
1 id location_id internal_id name
2 1 1 0 1F
3 2 1 0 2F
4 3 1 0 B1F a
5 4 1 0 B1F b
6 5 1 0 B1F c
7 6 1 0 B2F a
8 7 1 0 B2F b
9 8 1 0 B2F c
10 9 1 0 B3F a
11 10 1 0 B3F b
12 11 1 0 B3F c
13 12 1 0 B3F d
14 13 1 0 B3F e
15 14 1 0 B4F a
16 15 1 0 B4F b
17 16 1 0 B4F c
18 17 1 0 B4F d
19 18 1 0 B5F
20 19 2 0
21 20 3 0
22 21 4 0
23 22 5 0
24 23 5 0 entrance
25 24 5 0 inside
26 25 6 0
27 26 7 0 1F
28 27 7 0 B1F
29 28 7 0 B2F
30 29 7 0 B3F
31 30 7 0 B4F
32 31 7 0 B5F
33 32 8 0 1F
34 33 8 0 B1F
35 34 9 0 1F
36 35 9 0 B1F
37 36 10 0 1F
38 37 10 0 B1F
39 38 11 0 1F
40 39 11 0 2F
41 40 11 0 3F
42 41 11 0 4F
43 42 11 0 5F
44 43 12 0
45 44 13 0
46 45 14 0
47 46 15 0
48 47 16 0
49 48 17 0 High-level (rooms 16-21)
50 49 17 0 Low-level (rooms 4-9)
51 50 17 0 Mid-level (most rooms)
52 51 18 0
53 52 19 0
54 53 20 0
55 54 21 0 Floaroma City side
56 55 21 0 Jubilife City side
57 56 22 0 Eterna City side
58 57 22 0 Floaroma City side
59 58 23 0
60 59 24 0
61 60 25 0
62 61 26 0
63 62 27 0 Celestic City side
64 63 27 0 Solaceon City side
65 64 28 0 Celestic City side
66 65 28 0 Eterna City side
67 66 29 0 Hearthome City side
68 67 29 0 Pastoria City side
69 68 30 0
70 69 31 0
71 70 32 0
72 71 33 0
73 72 34 0
74 73 35 0
75 74 36 0
76 75 37 0
77 76 38 0
78 77 39 0
79 78 40 0
80 79 41 0
81 80 42 0
82 81 43 0
83 82 44 0 Area 1
84 83 44 0 Area 2
85 84 44 0 Area 3
86 85 44 0 Area 4
87 86 44 0 Area 5
88 87 44 0 Area 6
89 88 45 0
90 89 46 0
91 90 47 0
92 91 48 0
93 92 49 0
94 93 50 0 2F
95 94 50 0 3F
96 95 50 0 4F
97 96 50 0 5F
98 97 50 0 6F
99 98 50 0 7F
100 99 50 0 B1F
101 100 50 0 blizzard
102 101 50 0 cave
103 102 50 0 Route 207
104 103 50 0 Route 211
105 104 50 0 Route 216
106 105 50 0 snowfall
107 106 51 0 1F
108 107 51 0 2F
109 108 51 0 B1F
110 109 51 0 inside
111 110 51 0 inside B1F
112 111 51 0 inside exit
113 112 52 0
114 113 53 0
115 114 54 0
116 115 54 0 expansion
117 116 55 0
118 117 55 0 1F
119 118 55 0 B1F left
120 119 55 0 B1F right
121 120 55 0 B2F left
122 121 55 0 B2F right
123 122 55 0 B3F
124 123 56 0
125 124 57 0 2F
126 125 57 0 2F left room
127 126 57 0 2F leftmost room
128 127 57 0 2F middle room
129 128 57 0 2F private room
130 129 57 0 2F right room
131 130 57 0 2F rightmost room
132 131 57 0 dining room
133 132 57 0 entrance
134 133 58 0
135 134 59 0
136 135 60 0
137 136 61 0
138 137 62 0
139 138 63 0 after
140 139 63 0 before
141 140 78 0
142 141 17 0 Mid-level (rooms 1, 10-15)

View file

@ -0,0 +1,81 @@
id,generation_id,name
1,4,Solaceon Ruins
2,4,Twinleaf Town
3,4,Pastoria City
4,4,Eterna Forest
5,4,Stark Mountain
6,4,Celestic Town
7,4,Snowpoint Temple
8,4,Oreburgh Mine
9,4,Oreburgh Gate
10,4,Wayward Cave
11,4,Lost Tower
12,4,Eterna City
13,4,Pokemon League
14,4,Sunyshore City
15,4,Valley Windworks
16,4,Resort Area
17,4,Turnback Cave
18,4,Route 201
19,4,Route 202
20,4,Route 203
21,4,Route 204
22,4,Route 205
23,4,Route 206
24,4,Route 207
25,4,Route 208
26,4,Route 209
27,4,Route 210
28,4,Route 211
29,4,Route 212
30,4,Route 213
31,4,Route 214
32,4,Route 215
33,4,Route 216
34,4,Route 217
35,4,Route 218
36,4,Route 219
37,4,Route 221
38,4,Route 222
39,4,Route 224
40,4,Route 225
41,4,Route 227
42,4,Route 228
43,4,Route 229
44,4,Safari Zone
45,4,Route 220
46,4,Route 223
47,4,Route 226
48,4,Route 230
49,4,Fuego Ironworks
50,4,Mt. Coronet
51,4,Victory Road
52,4,Ravaged Path
53,4,Lake Acuity
54,4,Ruins Maniac Cave
55,4,Iron Island
56,4,Ruins Maniac Tunnel
57,4,Old Chateau
58,4,Acuity Lakefront
59,4,Valor Lakefront
60,4,Spring Path
61,4,Pokemon Mansion
62,4,Lake Valor
63,4,Lake Verity
64,4,Sandgem Town
65,4,Sandgem
66,4,Jubilife City
67,4,Oreburgh City
68,4,Floaroma Town
69,4,Hearthome City
70,4,Snowpoint City
71,4,Solaceon Town
72,4,Fight Area
73,4,Survival Area
74,4,Fullmoon Island
75,4,Newmoon Island
76,4,Veilstone City
77,4,Battle Tower
78,4,Canalave City
79,4,Event Route
80,4,Flower Paradise
1 id generation_id name
2 1 4 Solaceon Ruins
3 2 4 Twinleaf Town
4 3 4 Pastoria City
5 4 4 Eterna Forest
6 5 4 Stark Mountain
7 6 4 Celestic Town
8 7 4 Snowpoint Temple
9 8 4 Oreburgh Mine
10 9 4 Oreburgh Gate
11 10 4 Wayward Cave
12 11 4 Lost Tower
13 12 4 Eterna City
14 13 4 Pokemon League
15 14 4 Sunyshore City
16 15 4 Valley Windworks
17 16 4 Resort Area
18 17 4 Turnback Cave
19 18 4 Route 201
20 19 4 Route 202
21 20 4 Route 203
22 21 4 Route 204
23 22 4 Route 205
24 23 4 Route 206
25 24 4 Route 207
26 25 4 Route 208
27 26 4 Route 209
28 27 4 Route 210
29 28 4 Route 211
30 29 4 Route 212
31 30 4 Route 213
32 31 4 Route 214
33 32 4 Route 215
34 33 4 Route 216
35 34 4 Route 217
36 35 4 Route 218
37 36 4 Route 219
38 37 4 Route 221
39 38 4 Route 222
40 39 4 Route 224
41 40 4 Route 225
42 41 4 Route 227
43 42 4 Route 228
44 43 4 Route 229
45 44 4 Safari Zone
46 45 4 Route 220
47 46 4 Route 223
48 47 4 Route 226
49 48 4 Route 230
50 49 4 Fuego Ironworks
51 50 4 Mt. Coronet
52 51 4 Victory Road
53 52 4 Ravaged Path
54 53 4 Lake Acuity
55 54 4 Ruins Maniac Cave
56 55 4 Iron Island
57 56 4 Ruins Maniac Tunnel
58 57 4 Old Chateau
59 58 4 Acuity Lakefront
60 59 4 Valor Lakefront
61 60 4 Spring Path
62 61 4 Pokemon Mansion
63 62 4 Lake Valor
64 63 4 Lake Verity
65 64 4 Sandgem Town
66 65 4 Sandgem
67 66 4 Jubilife City
68 67 4 Oreburgh City
69 68 4 Floaroma Town
70 69 4 Hearthome City
71 70 4 Snowpoint City
72 71 4 Solaceon Town
73 72 4 Fight Area
74 73 4 Survival Area
75 74 4 Fullmoon Island
76 75 4 Newmoon Island
77 76 4 Veilstone City
78 77 4 Battle Tower
79 78 4 Canalave City
80 79 4 Event Route
81 80 4 Flower Paradise

View file

@ -27,6 +27,40 @@ class EggGroup(TableBase):
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(16), nullable=False)
class Encounter(TableBase):
__tablename__ = 'encounters'
id = Column(Integer, primary_key=True, nullable=False)
version_id = Column(Integer, ForeignKey('versions.id'), nullable=False, autoincrement=False)
location_area_id = Column(Integer, ForeignKey('location_areas.id'), nullable=False, autoincrement=False)
encounter_type_slot_id = Column(Integer, ForeignKey('encounter_type_slots.id'), nullable=False, autoincrement=False)
encounter_condition_id = Column(Integer, ForeignKey('encounter_conditions.id'), nullable=True, autoincrement=False)
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, autoincrement=False)
min_level = Column(Integer, nullable=False, autoincrement=False)
max_level = Column(Integer, nullable=False, autoincrement=False)
class EncounterCondition(TableBase):
__tablename__ = 'encounter_conditions'
id = Column(Integer, primary_key=True, nullable=False)
encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=False, autoincrement=False)
name = Column(Unicode(64), nullable=False)
class EncounterConditionGroup(TableBase):
__tablename__ = 'encounter_condition_groups'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(64), nullable=False)
class EncounterType(TableBase):
__tablename__ = 'encounter_types'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(64), nullable=False)
class EncounterTypeSlot(TableBase):
__tablename__ = 'encounter_type_slots'
id = Column(Integer, primary_key=True, nullable=False)
encounter_type_id = Column(Integer, ForeignKey('encounter_types.id'), primary_key=False, nullable=False, autoincrement=False)
encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=True, autoincrement=False)
rarity = Column(Integer, nullable=False, autoincrement=False)
class EvolutionChain(TableBase):
__tablename__ = 'evolution_chains'
id = Column(Integer, primary_key=True, nullable=False)
@ -57,6 +91,19 @@ class Language(TableBase):
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(16), nullable=False)
class Location(TableBase):
__tablename__ = 'locations'
id = Column(Integer, primary_key=True, nullable=False)
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False)
name = Column(Unicode(64), nullable=False)
class LocationArea(TableBase):
__tablename__ = 'location_areas'
id = Column(Integer, primary_key=True, nullable=False)
location_id = Column(Integer, ForeignKey('locations.id'), nullable=False)
internal_id = Column(Integer, nullable=False)
name = Column(Unicode(64), nullable=True)
class MoveEffect(TableBase):
__tablename__ = 'move_effects'
id = Column(Integer, primary_key=True, nullable=False)
@ -190,7 +237,21 @@ class Version(TableBase):
### Relations down here, to avoid ordering problems
Encounter.pokemon = relation(Pokemon, backref='encounters')
Encounter.version = relation(Version, backref='encounters')
Encounter.location_area = relation(LocationArea, backref='encounters')
Encounter.slot = relation(EncounterTypeSlot, backref='encounters')
Encounter.condition = relation(EncounterCondition, backref='encounters')
EncounterCondition.group = relation(EncounterConditionGroup,
backref='conditions')
EncounterTypeSlot.type = relation(EncounterType, backref='slots')
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
LocationArea.location = relation(Location, backref='areas')
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
order_by=PokemonAbility.slot,
backref='pokemon')
@ -226,3 +287,6 @@ Type.target_efficacies = relation(TypeEfficacy,
primaryjoin=Type.id
==TypeEfficacy.target_type_id,
backref='target_type')
Version.generation = relation(Generation, secondary=VersionGroup.__table__,
backref='versions')