kwsch / PKHeX

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

PKHex incorrectly flagging a hatched gen 4 pokémon as illegal if its PID/IV combination match a spread that can be generated through method 1 #4347

Closed TimoVM closed 2 months ago

TimoVM commented 2 months ago

Describe the problem If a gen 4 hatched pokémon has a PID/IV spread matching a spread that can be generated through method 1, PKHex will incorrectly assume the egg's PID/IV spread was generated through method 1.

If the pokémon isn't available as a method 1-generated in-game gift egg (Eevee, Happiny, Riolu, Manaphy), PKHex will incorrectly flag this pokémon as illegal, even through this PID/IV spread can be legally generated

image

To Reproduce An example pokémon can be found linked here as a .pk4 file. This is a newly hatched Charmander with PID 6BB66BBC and IV set 6/9/31/31/30/31. Changing IVs to any other spread (even exceedingly unlikely IV spreads such as 31/0/31/31/31/31) will cause PKHex to consider it legal.

Checking pokéfinder, we can see that this specific PID/IV spread can be legally obtained through Egg RNG:

PKHex EGG RNG VALIDATION

We can also see that this PID/IV spread matches a spread that can be obtained for a method 1-generated gift egg (uses the Riolu egg as an example):

PKHex METHOD 1 RNG VALIDATION

Expected behavior If a gen 4 hatched pokémon's PID/IV spread matches a spread that can be generated through method 1 AND the pokémon isn't available as a gift egg, PKHex should not flag this PID/IV spread as illegal.

Additional context Recent advancements in gen 4 glitches have made it possible to abuse the in-game function that is responsible for generating gift eggs, making it possible to generate gift eggs (using method 1 RNG) for arbitrary species. Due to this issue, all eggs generated through this method will be explicitely flagged as illegal, despite the PID/IV spread being legally obtainable. This makes it disproportionately likely to encounter this issue now compared to the past.

sora10pls commented 2 months ago

Duplicate #3894

Lusamine commented 2 months ago

Recent advancements in gen 4 glitches have made it possible to abuse the in-game function that is responsible for generating gift eggs, making it possible to generate gift eggs (using method 1 RNG) for arbitrary species. Due to this issue, all eggs generated through this method will be explicitely flagged as illegal, despite the PID/IV spread being legally obtainable.

It's worth adding that while prior cases were people intentionally RNG manipulating different correlations to trigger the check, data that requires glitching to obtain is generally not going to be handled as legal by the program. You know what you did.

TimoVM commented 2 months ago

While the "You know what you did" argument could be valid, the issue here is that the message is unclear and inconsistent.

The flag can't be manually removed by the user, despite the pokémon being technically legal. Moreover, this flag is specifically generated only for matching method 1 generation, despite other (arguably more suspicious) IV spreads such as 31/31/31/31/31 and its variants not being flagged.

Especially in a generation where RNG manipulation is both accessible and well known, either this shouldn't be flagged or the message should clearly state that the pokémon is technically legal, but with suspicious correlation.

This last option would at least let inexperienced users know to ignore this flag if they do in fact know what they did, without having to separately seek support for a perceived issue.

Lusamine commented 2 months ago

Please see the linked issue. This report is only happening with RNG manipulation, and the preference is to flag what is more likely to occur with bad hacks. There are other issues that arise from RNG manipulation that are also ignored, such as matching tid/sid from different generations. This will not be changed.

Edit: you can also see https://github.com/kwsch/PKHeX/discussions/3895 for more context.

If you have read all this and still insist that these Pokémon that you knowingly manipulated not be flagged, you can always fork the program and maintain a version that accommodates your use case.