View Single Post
Old May 5th, 2013 (2:08 PM). Edited May 5th, 2013 by Iacobus.
Iacobus's Avatar
Iacobus Iacobus is offline
Join Date: Dec 2003
Location: Belgium
Age: 25
Gender: Male
Posts: 62
Originally Posted by NarutoActor View Post
Hello' everyone, I am working on a Java-Based Cross Platform Program to allow hackers to edit the wild data for GBA games and not be limited to the first 3 generations like advance map does. This is manly intended for the use of the 649 patch, but I can also be used for fakemon hacks since the list of pokemon is user-defined.

Here is the problem, I can not find out how wild data is structured in FireRed. I tried using offsets that are given' in advance map, and using backwards searches with a hex editor but I am running dry. I am hoping someone has the information, or that someone can at least help find it, without it I can not continue with the program. I already made the GUI, I just need to implement the structure. Here is a screen shot to show the program so far.
I'm not to sure if you should be writing a program if you can't figure it out yourself, but hey..

As defined in the AM ini, the pointer to the wild Pokémon data is located after the following byte sequence:
03 48 04 80 09 E0 00 00 FF FF 00 00

For FR (English) we find the following: B8 9C 3C 08

When we go to 0x3C9CB8 in our hex editor, we see the following:
02 1B 00 00 D0 73 3C 08 00 00 00 00 00 00 00 00 00 00 00 00 02 1C 00 00 08 74 3C 08 00 00 00 00 00 00 00 00 00 00 00 00 02 1D 00 00 40 74 3C 08 00 00 00 00 00 00 00 00 00 00 00 00

I hope you see a pattern here.. Anyway, here is what you need to know:
02 1B 00 00 D0 73 3C 08 00 00 00 00 00 00 00 00 00 00 00 00

Bank Number
Map Number
Grass Pointer
Water Pointer
Trees Pointer
Fishing Pointer

I checked the Bank and Map in AM and this seems to be the data for the MONEAN CHAMBER.
If I go and check the Wild Pokémon, this map appears to have only grass encounters. Looking at the zero-pointers for water, trees and fishing, this could be right. So, let's investigate a bit further.

We go to 0x3C73D0 in hour hex editor and again see a bunch of data. For everyone's sake, I only copied what belongs to the map (to the grass encounter data of the map).
07 00 00 00 A0 73 3C 08 19 19 C9 00 19 19 C9 00 1919C9001919C9001919C9001919C9001919C9001919C9001919C9001919C9001919C9001919C900

The first byte is the encounter ratio. Then we have 3 filler bytes (?) followed by a pointer.
After the pointer, we have our 12 Pokémon with their minimum and maximum levels. Bytes are in this order: minimum level, maximum level, Pokémon number.

Hope this is enough for now.
Reply With Quote