Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply
 
Thread Tools
  #1    
Old 3 Weeks Ago (11:51 PM).
Hiro TDK Hiro TDK is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 50
So you want to change which Pokemon you encounter in the Safari Zone in HeartGold and SoulSilver. This can be done. First though, go ahead and grab your self these programs.

Tinke - https://github.com/pleonex/tinke/releases/tag/v0.9.1

HxD - ftp://wa651f4:[email protected]/HxDSetupEN.zip


Open up Tinke and load the ROM you'll be editing. Once the file system loads, navigate to /a/2/3/0 and unpack it. You'll see a list of twelve files. They are as follows:
Spoiler:
0_0.bin - Plains
0_1.bin - Meadow
0_2.bin - Savannah
0_3.bin - Peak
0_4.bin - Rocky Beach
0_5.bin - Wetland
0_6.bin - Forest
0_7.bin - Swamp
0_8.bin - Marshland
0_9.bin - Wasteland
0_10.bin - Mountain
0_11.bin - Desert
Go ahead and extract the one you want to modify. For this tutorial, I'll be using 0_1.bin - Meadow.

Now open HxD use it open the extracted file. Navigate to View, Bytes per row... and change it to 4. This will help you to see the pattern. The file can be split into sixteen sections, most of which can be broken up into three parts. Daunting, I know, but we'll get through it.

Section 1 - Header
Spoiler:
0A 03 02 02
02 00 00 00
The first section is eight bytes and seems to dictate the length of data in several other sections. I'll write more about this in the Notes And Further Research portion at the end of this document.

Section 2 - Walking Encounters
Spoiler:
Morning
27 00 0F 00 | Lv. 15 Jigglypuff
BB 00 0F 00 | Lv. 15 Hoppip
BB 00 0F 00 | Lv. 15 Hoppip
27 00 10 00 | Lv. 16 Jigglypuff
BB 00 10 00 | Lv. 16 Hoppip
27 00 10 00 | Lv. 16 Jigglypuff
27 00 11 00 | Lv. 17 Jigglypuff
BB 00 11 00 | Lv. 17 Hoppip
27 00 11 00 | Lv. 17 Jigglypuff
BC 00 11 00 | Lv. 17 Skiploom

Day
27 00 0F 00 | Lv. 15 Jigglypuff
BF 00 0F 00 | Lv. 15 Sunkern
BB 00 0F 00 | Lv. 15 Hoppip
27 00 10 00 | Lv. 16 Jigglypuff
BF 00 10 00 | Lv. 16 Sunkern
BB 00 10 00 | Lv. 16 Hoppip
27 00 11 00 | Lv. 17 Jigglypuff
BF 00 11 00 | Lv. 17 Sunkern
BB 00 11 00 | Lv. 17 Hoppip
BC 00 11 00 | Lv. 17 Skiploom

Night
27 00 0F 00 | Lv. 15 Jigglypuff
B7 00 0F 00 | Lv. 15 Marill
C2 00 0F 00 | Lv. 15 Wooper
27 00 10 00 | Lv. 16 Jigglypuff
B7 00 10 00 | Lv. 16 Marill
C2 00 10 00 | Lv. 16 Wooper
27 00 11 00 | Lv. 17 Jigglypuff
B7 00 11 00 | Lv. 17 Marill
C2 00 11 00 | Lv. 17 Wooper
23 00 11 00 | Lv. 17 Clefairy
The second section is thirty sets of four bytes, for a total of 72 bytes. These are the Pokemon and levels. The four bytes are formatted like so.

27 00 0F 00

So the first two bytes are inverted. It would be 0027, or 39 in base-10. This is Jigglypuff's Pokedex number. The third byte is the level of the encounter. In this case, it's 0F or 15 in base-10. The fourth byte seems to just be padding. So this line defines an encounter with a Lv. 15 Jigglypuff.

These are tall grass encounters. This section has thirty of theses sets, split into three equal parts. The first ten are for morning encounters; the second ten are for daytime encounters; the third ten are for nighttime encounters. There is an even 10% encounter rate across the board.

Section 3 - Walking Encounters (Object Arrangement)
Spoiler:
Morning
14 00 28 00 | Lv. 40 Raticate
71 00 2A 00 | Lv. 42 Chansey
11 01 2D 00 | Lv. 45 Seedot
BC 00 28 00 | Lv. 40 Skiploom
12 01 26 00 | Lv. 38 Nuzleaf
12 01 30 00 | Lv. 48 Nuzleaf
4A 00 2D 00 | Lv. 45 Geodude
2B 01 2D 00 | Lv. 45 Nosepass
BF 01 2D 00 | Lv. 45 Riolu
C2 00 28 00 | Lv. 40 Wooper

Day
14 00 28 00 | Lv. 40 Raticate
71 00 2A 00 | Lv. 42 Chansey
11 01 2D 00 | Lv. 45 Seedot
BC 00 28 00 | Lv. 40 Skiploom
12 01 26 00 | Lv. 38 Nuzleaf
12 01 2F 00 | Lv. 47 Nuzleaf
4A 00 2D 00 | Lv. 45 Geodude
2B 01 2D 00 | Lv. 45 Nosepass
BF 01 2E 00 | Lv. 46 Riolu
C2 00 28 00 | Lv. 40 Wooper

Night
14 00 28 00 | Lv. 40 Raticate
71 00 2A 00 | Lv. 42 Chansey
11 01 2D 00 | Lv. 45 Seedot
BC 00 28 00 | Lv. 40 Skiploom
12 01 26 00 | Lv. 38 Nuzleaf
12 01 2F 00 | Lv. 47 Nuzleaf
23 00 2A 00 | Lv. 42 Clefairy
2B 01 2D 00 | Lv. 45 Nosepass
BF 01 2D 00 | Lv. 45 Riolu
C2 00 28 00 | Lv. 40 Wooper
The third section is exactly like the second. However, these encounters are the ones unlocked by using Object Arrangement in the Safari Zone. The encounter rates are variable and exact numbers would be difficult to acquire.

Section 4 - Walking Encounter Requirements (Object Arrangement)
Spoiler:
01 05 00 00
01 0C 00 00 | 12 Plains Objects
01 23 00 00 | 35 Plains Objects
02 08 00 00 | 8 Forest Objects
02 1C 00 00 | 28 Forest Objects
02 23 00 00 | 35 Forest Objects
03 03 00 00 | 3 Peak Objects
03 23 00 00 | 35 Peak Objects
03 2A 02 1C | 42 Peak Objects, 28 Forest Objects
04 03 00 00 | 3 Waterside Objects
The fourth section determines which encounters need which Object Types aand how many. For example, the first line in this sections reads:

01 02 00 00

The first and third bytes refer to the Object Type needed and the second and fourth bytes refer to the number of that Object Type needed.

The Object Types are:
Spoiler:
01 - Plains
02 - Forest
03 - Peak
04 - Waterside
Each of these lines refers to an encounter from the previous section. For the first line, it refers to the first encounter for each, morning, day, and night. So in this case, we need two Plains objects in order to encounter a Lv. 40 Raticate. There are ten lines in this section, and ten encounters per time of day in the previous section.

An interesting one to note is the sixth line.

03 03 00 00

Looking at the sixth encounter, if you have three Peak objects, you can encounter a Lv. 45 Geodude during the morning and day, but at night, you encounter a Lv. 42 Clefairy instead.

Line nine is an example of an encounter that requires two types of objects.

03 2A 02 1C

Once you've placed 42 Peak objects and 28 Forest objects, you can encounter the Pokemon on line nine, a Lv. 45 Riolu. If you'll notice though, during the day, it's a Lv. 46 Riolu. This seems to be a mistake on Game Freak's part, as looking through the files, it seems they intended the encounters to be the same level at all times of day. Note as well, the higher level Nuzleaf is Lv. 48 in the morning and Lv. 47 the rest of the day.

Section 5 - Surfing Encounters
Spoiler:
Morning
81 00 0F 00 | Lv. 15 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 11 00 | Lv. 17 Magikarp
C2 00 0F 00 | Lv. 15 Wooper
C2 00 10 00 | Lv. 16 Wooper
C2 00 11 00 | Lv. 17 Wooper
B7 00 10 00 | Lv. 16 Marill
B7 00 11 00 | Lv. 17 Marill

Day
81 00 0F 00 | Lv. 15 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 11 00 | Lv. 17 Magikarp
C2 00 0F 00 | Lv. 15 Wooper
C2 00 10 00 | Lv. 16 Wooper
C2 00 11 00 | Lv. 17 Wooper
B7 00 10 00 | Lv. 16 Marill
B7 00 11 00 | Lv. 17 Marill

Night
81 00 0F 00 | Lv. 15 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 10 00 | Lv. 16 Magikarp
81 00 11 00 | Lv. 17 Magikarp
C2 00 0F 00 | Lv. 15 Wooper
C2 00 10 00 | Lv. 16 Wooper
C2 00 11 00 | Lv. 17 Wooper
B7 00 10 00 | Lv. 16 Marill
B7 00 11 00 | Lv. 17 Marill
This section is for surfing encounters. Unlike the encounter data for all other maps, it seems that the Safari Zone is able to have different encounters for surfing at different times of day. This also applies to Old/Good/Super Rod encounters. This data is formatted exactly like the previous sections. The rest of the sections get pretty repetitive from here on out.

Section 6 - Surfing Encounters (Object Arrangement)
Spoiler:
Morning
BC 00 2F 00 | Lv. 47 Skiploom
1C 01 2A 00 | Lv. 42 Masquerain
1C 01 2E 00 | Lv. 46 Masquerain

Day
BC 00 2F 00 | Lv. 47 Skiploom
1C 01 2A 00 | Lv. 42 Masquerain
1C 01 2E 00 | Lv. 46 Masquerain

Night
BC 00 2F 00 | Lv. 47 Skiploom
1C 01 2A 00 | Lv. 42 Masquerain
1C 01 2E 00 | Lv. 46 Masquerain
This section is for surfing encounters that require Object Arrangement. Unlike previous sections, there are only nine encounter slots, three for each time of day.

Section 7 - Surfing Encounter Requirements (Object Arrangement)
Spoiler:
04 03 00 00 | 3 Waterside Objects
04 0A 00 00 | 10 Waterside Objects
04 0E 00 00 | 14 Waterside Objects
This section is the Object Arrangement requirements for surfing encounters.

Section 8 - Old Rod Encounters
Spoiler:
Morning
81 00 0C 00 | Lv. 12 Magikarp
81 00 0C 00 | Lv. 12 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0E 00 | Lv. 14 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
3C 00 0C 00 | Lv. 12 Poliwag
3C 00 0D 00 | Lv. 13 Poliwag
3C 00 0E 00 | Lv. 14 Poliwag
3C 00 0F 00 | Lv. 15 Poliwag

Day
81 00 0C 00 | Lv. 12 Magikarp
81 00 0C 00 | Lv. 12 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0E 00 | Lv. 14 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
3C 00 0C 00 | Lv. 12 Poliwag
3C 00 0D 00 | Lv. 13 Poliwag
3C 00 0E 00 | Lv. 14 Poliwag
3C 00 0F 00 | Lv. 15 Poliwag

Night
81 00 0C 00 | Lv. 12 Magikarp
81 00 0C 00 | Lv. 12 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0D 00 | Lv. 13 Magikarp
81 00 0E 00 | Lv. 14 Magikarp
81 00 0F 00 | Lv. 15 Magikarp
3C 00 0C 00 | Lv. 12 Poliwag
3C 00 0D 00 | Lv. 13 Poliwag
3C 00 0E 00 | Lv. 14 Poliwag
3C 00 0F 00 | Lv. 15 Poliwag
This section is for the Old Rod encounters.

Section 9 - Old Rod Encounters (Object Arrangement
Spoiler:
Morning
3D 00 0F 00 | Lv. 15 Poliwhirl
3D 00 10 00 | Lv. 16 Poliwhirl

Day
3D 00 0F 00 | Lv. 15 Poliwhirl
3D 00 10 00 | Lv. 16 Poliwhirl

Night
3D 00 0F 00 | Lv. 15 Poliwhirl
3D 00 10 00 | Lv. 16 Poliwhirl
This section is for Old Rod encounters that use Object Arrangement.

Section 10 Old Rod Encounter Requirements (Object Requirements)
Spoiler:
04 02 00 00 | 2 Waterside Objects
04 03 00 00 | 3 Waterside Objects
This section is the Object Arrangement requirements for Old Rod encounters.

Section 11 - Good Rod Encounters
Spoiler:
Morning
81 00 16 00 | Lv. 22 Magikarp
81 00 16 00 | Lv. 22 Magikarp
81 00 17 00 | Lv. 23 Magikarp
81 00 18 00 | Lv. 24 Magikarp
3C 00 16 00 | Lv. 22 Poliwag
3C 00 16 00 | Lv. 22 Poliwag
3C 00 17 00 | Lv. 23 Poliwag
3C 00 18 00 | Lv. 24 Poliwag
3D 00 18 00 | Lv. 24 Poliwhirl
3D 00 19 00 | Lv. 25 Poliwhirl

Day
81 00 16 00 | Lv. 22 Magikarp
81 00 16 00 | Lv. 22 Magikarp
81 00 17 00 | Lv. 23 Magikarp
81 00 18 00 | Lv. 24 Magikarp
3C 00 16 00 | Lv. 22 Poliwag
3C 00 16 00 | Lv. 22 Poliwag
3C 00 17 00 | Lv. 23 Poliwag
3C 00 18 00 | Lv. 24 Poliwag
3D 00 18 00 | Lv. 24 Poliwhirl
3D 00 19 00 | Lv. 25 Poliwhirl

Night
81 00 16 00 | Lv. 22 Magikarp
81 00 16 00 | Lv. 22 Magikarp
81 00 17 00 | Lv. 23 Magikarp
81 00 18 00 | Lv. 24 Magikarp
3C 00 16 00 | Lv. 22 Poliwag
3C 00 16 00 | Lv. 22 Poliwag
3C 00 17 00 | Lv. 23 Poliwag
3C 00 18 00 | Lv. 24 Poliwag
3D 00 18 00 | Lv. 24 Poliwhirl
3D 00 19 00 | Lv. 25 Poliwhirl
This section is for the Good Rod encounters.

Section 12 - Good Rod Encounters (Object Arrangement)
Spoiler:
Morning
3D 00 1B 00 | Lv. 27 Poliwhirl
82 00 1C 00 | Lv. 28 Gyarados

Day
3D 00 1B 00 | Lv. 27 Poliwhirl
82 00 1C 00 | Lv. 28 Gyarados

Night
3D 00 1B 00 | Lv. 27 Poliwhirl
82 00 1C 00 | Lv. 28 Gyarados
This section is for Good Rod encounters that use Object Arrangement.

Section 13 - Good Rod Encounter Requirements (Object Arrangement)
Spoiler:
04 05 00 00 | 5 Waterside Objects
04 07 00 00 | 7 Waterside Objects
This section is the Object Arrangement requirements for Good Rod encounters.

Section 14 - Super Rod Encounters
Spoiler:
Morning
3C 00 23 00 | Lv. 35 Poliwag
3C 00 23 00 | Lv. 35 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 25 00 | Lv. 37 Poliwhirl
3D 00 26 00 | Lv. 38 Poliwhirl

Day
3C 00 23 00 | Lv. 35 Poliwag
3C 00 23 00 | Lv. 35 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 25 00 | Lv. 37 Poliwhirl
3D 00 26 00 | Lv. 38 Poliwhirl

Night
3C 00 23 00 | Lv. 35 Poliwag
3C 00 23 00 | Lv. 35 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3C 00 24 00 | Lv. 36 Poliwag
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 23 00 | Lv. 35 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 24 00 | Lv. 36 Poliwhirl
3D 00 25 00 | Lv. 37 Poliwhirl
3D 00 26 00 | Lv. 38 Poliwhirl
This section is for the Super Rod encounters.

Section 15 - Super Rod Encounters (Object Arrangement)
Spoiler:
Morning
82 00 2A 00 | Lv. 42 Gyarados
82 00 2D 00 | Lv. 45 Gyarados

Day
82 00 2A 00 | Lv. 42 Gyarados
82 00 2D 00 | Lv. 45 Gyarados

Night
82 00 2A 00 | Lv. 42 Gyarados
82 00 2D 00 | Lv. 45 Gyarados
This section is for Super Rod encounters that use Object Arrangement.

Section 16 - Super Rod Encounter Requirements (Object Arrangement)
Spoiler:
04 0A 00 00 | 10 Waterside Objects
04 0E 00 00 | 14 Waterside Objects
This section is the Object Arrangement requirements for Super Rod encounters.

Notes And Further Research
As noted above, there are several minor mistakes in the levels of Pokemon encounters, not just in the Meadows file, but in others as well. For example, the nighttime encounter for Buizel in the Wetlands file is Lv. 44 instead of Lv. 45 like the morning and daytime encounters.

As noted above, surfing and fishing encounters have the ability for variations. As far as I'm aware this isn't something available to the rest of the game. This can allow for some interesting custom encounters.

The first section of data seems to determine the amount of encounters when using Object Arrangement. The first byte, 0A, or ten in base-10, is how many Object Arrangement encounters there are for tall grass. This is followed by 03 02 02 02 which are the number of Object Arangement encounters for surfing, Old Rod, Good Rod, and Super Rod respectively. However, every file uses the exact same number of encounters, so it's not entirely clear if this is actually the case. Further research is required.
Reply With Quote

Relevant Advertising!

Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 2:50 AM.