Jump to content

Pokédex Auto-fill is still bugged


suloku
 Share

Recommended Posts

Hi, I've been researching how the form flags work, in fact I've already mapped the flags for forms that can be stored in the pc boxes; I still need to map the formes that can't be deposited (mega evolutions will be a pain, but well, I'll eventually get them). Fortunately it would seem gamefreak just adds new data instead of rebuilding the strucuture, which will reduce the needed research.

Some things I noticed with latest PKHex commit:

- All genderless pokémon are set to shiny form instead of normal form (both encountered and displayed).

- Cosplay pikachu is registered in pokédex as normal female pikachu --> this might be correct, I need to test, because I think for pokemon with forms the games ignores the standard flags and

- Dexnav (encounter) level should be set to 1 if the pokemon was not previously owned.

Also, for pokémon with formes, I guess the displayed flags are different than how its currently handled. I haven't looked at how these flags work yet.

For research purposes, a pkhex build that does not modify pokedex data would be very handy, since I can use official pokémon bank to update the pokédex and and hex comparing would be a lot more easier since pokemon bank modifies very few data.

Will commenting all setPokedex() calls achieve this?

Also, @Kaphotics, is there interest in adding all displayed form possibilities? Arceus has 18...and I need to check if there's 18 more for shiny version.

As you can see I'm very interested in getting this right, but I don't have the skills to add it myself to pkhex.

UPDATE: I'm getting how this works, seems like pokémon with forms have a full pokédex for themselves, and this might be what the game actually looks at even though the normal entries (male/female/shiny male/shiny female) are also set the first time a pokemon with forms is got.

Pokémon with mega evolution seem to have 2 flags: 1 for the pokemon itself (regardless of shininess/gender) and one for the mega evolution.

I still need to accurately define the offsets, but it seems the forms pokedex goes like this for XY (ORAS is just has more data for additional forms):

* Alternate forms (0x18): 1 bit is set for each form unlocked, mega evolutions have two forms for some reason (normal and mega)

* Shiny alternate forms (0x18): 1 bit is set for each form unlocked

* Displayed form (0x18): 1 bit is set for the selected display form. I need to see how this is handled regarding the male/female/shiny male/shiny female displayed flags.

* Displayed shiny form (0x18):

UPDATE2: There's actually 4 form dexes (encountered form, encountered shiny form, displayed flag for normal forms, displayed flag for shiny forms), each 0x18; for ORAS each is 0x26

For cosplay pikachu, seems like pokédex only has 2 forms: cosplay form (black tail) and normal female pikachu (yellow tail).

Edited by suloku
Link to comment
Share on other sites

That was some refactoring there. Thanks for the pokedex autofill toogle, it will probable be very useful for savegame purists since I think receiving the pokemon from daycare may also work like a trade (I'll check later for curosity) since this is known to also fill the missing pokedex entries that pokémon should have.

I'm finishing mapping mega evolutions and ORAs exclusive forms. I was puzzled for a while until I found out latios/latias can be mega evolved in X/Y, I was missing some flags until I realized that they were for latios/latias and its mega form.

Link to comment
Share on other sites

OK, here's my current form-dex map:

form-dex is composed of 4 sub-dexes, each 0x18 for Pokémon XY and 0x26 for Pokémon ORAS

* Alternate forms encountered: 1 bit is set for each form unlocked, mega evolutions have two forms (non-mega and mega)

* Shiny alternate form encountered: 1 bit is set for each form unlocked

* Displayed form:

* Displayed shiny form: if a bit is set here, it should be unset in "displayed form"

note: for a form to be displayed, the corresponding form encountered bit must be set.

note 2: any mega pokémon needs the non-mega bit set as it would be impossible to encounter a mega-evolved pokémon without seeing the non-mega evolved form.

Unknown (28)
Deoxys (4)
Shaymin (2)
Giratina (2)
Rotom (6)
Shellos (2)
Gastrodon (2)
Burmy (3)
Wormadan (3)
Castform (4)
Cherrim (2)
Deerling (4)
Sawsbuck (4)
Meloetta (2)
Darmanitan (2)
Basculin (2)
Kyurem (3)
Keldeo (2)
Thundurus (2)
Tornadus (2)
Landorus (2)
Vivillion (20)
Flabebé (5)
Floette (6)
Florges (5)
Pumkaboo (4)
Gourgeist (4)
Aegislash (2)
Xerneas (2)
Venusaur (2)  --> X/Y Mega pokémon
Charizard (3)
Blastoise (2)
Alakazam (2)
Gengar (2)
Kangaskhan (2)
Pinsir (2)
Gyarados (2)
Aerodactyl (2)
Mewtwo (3)
Ampharos (2)
Scizor (2)
Heracross (2)
Houndoom (2)
Tyranitar (2)
Blaziken (2)
Mawile (2)
Aggron (2)
Medicham (2)
Manectric (2)
Banette (2)
Absol (2)
Latias (2)
Latios (2)
Garchomp (2)
Lucario (2)
Abomasnow (2)
Pikachu (regardless the gender) --> Start of OR/AS forms
5 unknown bits --> (unused cosplay pikachu formes probably?)
Cosplay Pikachu (no costume)
Hoopa (2)
Beedrill (2)	<-- OR/AS Mega pokemon
Pidgeot (2)
Slowbro (2)
Steelix (2)
Sceptile (2)
Swampert (2)
Sableye (2)
Sharpedo (2)
Camerupt (2)
Altaria (2)
Glalie (2)
Salamence (2)
Metagross (2)
Rayquaza (2)
Lopunny (2)
Gallade (2)
Audino (2)
Diancie (2)
Kyogre (2)
Groudon (2)
Arceus (18)
Genesect (5)
Furfrow (10)
1 unused bit
4 unused bytes (32 bits)

As you can see, it seems like 5 bits were intended to be used for cosplay pikachu, but they decided to not use them (I've tried setting them manually, but they won't appear in the pokedex). I don't think they are used for something else and their location is very suspicious: there are 5 cosplay pikachu costumes, and these 5 bits are exactly between the normal pikachu bit and the no-costume cosplay pikachu bit.

Also, after diancie I have 4 unmapeed bits which I don't know what they are for yet. I know they must be used for something, since my ORAS savegame (never used pkhex with that savegame) has one of these 4 bits set, but unless I'm missing some forms I'm unaware off, I don't know what that might be. Any clues? I've been using bulbapedia for the forms list, but maybe they are missing some forms?

EDIT: forgot to mention forms follow the same index as in pokémon structures. For mega evolutions, first comes the normal form, then the mega form. I don't know why they added this extra flag, I haven't checked how the other pokédex entries are handled at all. I need to check if this "normal form" flag is set when encountered or when owned.

By the way, I though that if I set those bits I'm missing to the displayed shiny flags I'll be able to know what pokémon are those for.

EDIT2: I've just realized primal groudon and primal kyogre aren't listed as mega pokémon, they're probably that 4 bits I'm missing.

EDIT3: I was right, the structure is now complete. Now what's left is to check how form-dex and normal dex are flagged toguether. I've updated the beggining of the post.

EDIT4: from what I can see, the generic male/female/shiny male/shiny female/ are normally set, but ignored when displaying the pokédex (there's no male/fema entries for deerling or wormadan evolutionary lines, only formes). I still need to see how the generic displayed flag behaves when selecting a different form.

Edited by suloku
Link to comment
Share on other sites

Ok, finally I got all the info about how pokédex handles forms:

* Male/female forms are ignored in pokédex, i.e. there's no pokédex entry for male and female deerling, while there is for every other pokémon without alternate forms. This is how this is handled:

- If the first pokémon seen/catched is female, the flag for female (or female *) is set, as it would with any other pokémon. The correspondig form-dex flag is also set.

- When user changes the displayed pokédex entry to a different form, the generic displayed flag is set to "male", regardless the male form was actually encountered or not; even for flabebé (which doesn't have a male form) the male displayed flag is set (or shiny male if the selected displayed form is shiny).

* Pikachu in ORAS is a special case: form-dex flags for normal pikachu will be set regardless the gender, and the formdex display flag will be set too, but the generic display flags will be used (as it has male and female forms). This normal-pikachu flag for form-dex is unset if the only pikachu unlocked is cosplay pikachu (but the encountered female and displayed female flags are set for cosplay pikachu).

* In a similar situation as picachu, encountering/capturing a mega pokemon (including groudon and kyogre) unlocks the corresponding flag in form-dex for the non-mega form.

* Pokémon with battle-only forms (castform/cherrim/darmanitan/meloetta/aegislash) unlock both forms in pokédex even if the other form has not been seen when encountered in battle, traded or withdrawn from bank.

Xerneas, even though also has a battle-only form, does only unlock "relaxed form" in pokédex when traded or received from bank (I checked both, encountering in battle does obviously unlock it, since xerneas will be in that form in battle).

* Any other pokémon with forms only get their current form added to form-dex when traded or withdrawn from bank.

* Pokémon with forms that can't be stored in pc boxes (shaymin sky form, black and white kyurem, furfrown hairstyles, mega forms, primal froms and xerneas active form) can only be added to form-dex by triggering the transformation in-game.

I guess this is all regarding form dex. On another topic, is there any info about the two unknown u32 values that appear in http://projectpokemon.org/wiki/Pok%C3%A9mon_XY_Save_File_Structure?

0x1AA40 - u32 ??? 0? 
0x1AA44 - Spinda Spot Pattern (First EC encountered) 
0x1AA48 - u32 ??? 
0x1AA4C - 0x54 Bitflags - Obtained specimen from Previous Console Era (pre Kalos Game Origin, 1-649)

By the way, in my save spinda patter is at 1AA48, not 1AA44, is the info wrong?

There's also a similar unknown u32 for ORAS. I'm just curious.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...
@Kaphotics are there any plans to implement all the form-dex information at some point? Not that I'm demanding anything, I just want to know if it is on the to-do list or you decided to not implement pokedex form handling in pkhex.

Got around to implementing it into the dex editor after I had to improve the Fill Dex 'cheat'.

I haven't added it to the main window dex-setting logic yet. edit2: now implemented

edit: looks like PHBank has attempted something similar, there's a few bugs in that implementation.

Obviously there's still room for improvement, so lmk what you think :)

Edited by Kaphotics
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...