kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.63k stars 682 forks source link

Legality Checker Error (Gen 3 - RS) #4333

Closed ecrs98 closed 1 month ago

ecrs98 commented 1 month ago

The problem The legality checker erroneously flags a legal PID/ability combination of the following Pokemon in a blank RS save file.

For reproducibility 0251 - Celebi_JP - 8CC8AB87D82B.zip

Expected behavior Given the PID AB87D82B, I expect the ability to be Natural Cure (2). However, the legality checker flags this PID/ability combo with the message "Invalid: Ability does not match ability number." Keeping the same PID and changing the ability to Natural Cure (1) returns a "Legal!" message.

Converting the PID AB87D82B to binary yields 10101011100001111101100000101011. The last bit in this number is 1, so the Pokemon should have its second ability.

Additional context I am matching a genned Celebi to a legitimate Ageto Celebi from the JP Colosseum Bonus Disc, in accordance with the retail RNG guide contained in this Reddit post. The Celebi I am matching is described in the second row of data in the screenshot below, displaying the correct PID and ability -- AB87D82B and 特性2 (Ability 2), respectively. image

Lusamine commented 1 month ago

This seed shows up in both PokeFinder and RNGReporter as Ability 1 which doesn't matches what PKHeX expects. Ideally, the issues should be for legitimate Pokémon that are being flagged, not for asking why genned Pokémon are being flagged.

image image

EDIT: I forgot that both of these programs use Ability 0 or 1 rather than 1 or 2, so 1 would match up to the 2nd ability. But I'm unsure if there's something else to that Pokémon such that all of them end up as Ability 1 after transferring to RS, for example.

ecrs98 commented 1 month ago

Understood, thank you.

Lusamine commented 1 month ago

Made an edit to my earlier comment once I realized the programs index ability differently.

I also noticed that the 111 Ageto Celebi examples provided on PPORG are all Ability 1.

I'll leave this issue open for someone else to explain what we are observing.

kwsch commented 1 month ago

In generation 3, Pokemon without distinct second abilities have their second ability as 0, and the game will not set the ability bitflag. Thus, it will only select the first slot.

Real96 commented 1 month ago

This seed shows up in both PokeFinder and RNGReporter as Ability 1 which doesn't matches what PKHeX expects. Ideally, the issues should be for legitimate Pokémon that are being flagged, not for asking why genned Pokémon are being flagged.

image image

EDIT: I forgot that both of these programs use Ability 0 or 1 rather than 1 or 2, so 1 would match up to the 2nd ability. But I'm unsure if there's something else to that Pokémon such that all of them end up as Ability 1 after transferring to RS, for example.

Just wanted to point out that PokeFinder correctly calculates Celebi as ability 0 only. You have to use latest release/commit for this.

image