-
Notifications
You must be signed in to change notification settings - Fork 137
Description
i'm currently looking at how pokemon are stored between the mainline gen4 games (pokediamond, pokeplatinum, pokeheartgold) and i'm noticing that pokediamond & pokeheartgold both have the hatched & met locations/dates swapped around compared to pokeplatinum
https://github.com/pret/pokeheartgold/blob/master/include/pokemon_types_def.h#L86
https://github.com/pret/pokediamond/blob/master/include/pokemon.h#L103
vs -
https://github.com/pret/pokeplatinum/blob/main/include/struct_defs/pokemon.h#L66
btw: i actually think the fatefulMet
and fatefulHatch
are incorrect, the code attached to it links to func sub_0201708C
which seems to check if it's a DP core zone:
BOOL sub_0201708C(u16 param0)
{
if (((param0 >= 1) && (param0 <= 111)) || ((param0 >= 2000) && (param0 <= 2010)) || ((param0 >= 3000) && (param0 <= 3076))) {
return 1;
}
return 0;
}
.. where
1 = twinleaf town
111 = battle park
--
2000 = day-care couple
2010 = riley
--
3000 = lovely place
3076 = concert event
(src: https://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_in_Generation_IV )
i know that the names here are incorrect: https://github.com/pret/pokeplatinum/blob/main/include/struct_defs/pokemon.h#L88 (met_*
should be egg_received_*
, IMO, and hatch_*
should be first_met_*
since wild pkmn dates are also there too). i've confirmed this by cross referencing the data in my save, eg:
"Flarz", level X Male Magmar
hatch_date: 2009-08-29, met_date: 200-00-00
met_location: 0, hatch_location: 49
"EEVEE", level X Male Eevee
hatch_date: 2014-03-17, met_date: 2012-09-09
met_location: 2000, hatch_location: 4
(hatch_date
is 20{hatch_year}-{hatch_month}-{hatch_day}
, met_date
is 20{met_year}-{met_month}-{met_day}
)


sorry, this issue is a bit all over the place, i don't really have the time/mental to confirm what's going wrong here as i'm guessing the constants for Pokemon_GetData
are also incorrect