Jump to content

Gen VIII Invalid: Encounter Type PID mismatch


mithrandir

Recommended Posts

Hello,

After updating to the latest PKHeX release from a version released about a year ago, I'm experiencing this legality error with some of the Pokémon I've edited that were not flagged by the old version. After a bit of playing around with the auto legality mod plugin when rerolling the PID, it seems that it is necessary to change the encounter to be an egg rather than keeping what I've edited wild. I do not understand what is causing this flag. It's been nearly a year since I've touched the save and I don't remember editing anything other than IVs, EVs, friendship, and shiny flag (though I didn't notice any shiny edits getting flagged). I've attached an image of the error message and one of the pk8 files flagged by the built-in legality checker. I'm pretty sure the other flagged files have the same issue, whatever it may be. Any help, education, and/or direction to education resources will be greatly appreciated.

Thank you very much,

Mithrandir

 

Edit: After playing around with unedited Pokémon, I found that rerolling either the PID or encryption constant or both triggers the legality flag and the auto legality mod plugin resolves those in the same manner, by changing the encounter from wild to egg. Editing IVs also does the same. Other encounters (static, egg, and event gift) do not seem to be affect.

Screenshot 2021-04-05 133028.png

831 - Wooloo - AC83373311A5.pk8

Edited by mithrandir
Link to comment
Share on other sites

5 minutes ago, mithrandir said:

Hello,

After updating to the latest PKHeX release from a version released about a year ago, I'm experiencing this legality error with some of the Pokémon I've edited that were not flagged by the old version. After a bit of playing around with the auto legality mod plugin when rerolling the PID, it seems that it is necessary to change the encounter to be an egg rather than keeping what I've edited wild. I do not understand what is causing this flag. It's been nearly a year since I've touched the save and I don't remember editing anything other than IVs, EVs, friendship, and shiny flag (though I didn't notice any shiny edits getting flagged). I've attached an image of the error message and one of the pk8 files flagged by the built-in legality checker. I'm pretty sure the other flagged files have the same issue, whatever it may be. Any help, education, and/or direction to education resources will be greatly appreciated.

Thank you very much,

Mithrandir

Screenshot 2021-04-05 133028.png

831 - Wooloo - AC83373311A5.pk8 344 B · 0 downloads

Based on your error, I believe it's this:
 

Quote

Basically, for Gen 8, any overworld or fishing encounter has a known PID IV relationship, that you cannot just hack randomly.

Detection for that has been implemented into PKHeX. Legality report will show "Encounter Type PID mismatch". There's presently no public method to bruteforce the stats you want, for those.

Best case scenario, if they can be changed to hatched, then change them to hatched, and remove the marks. If they cannot be changed to hatched, then no hacking of their stats for you.

It's a new legality detection added to the latest PKHeX update. This just means your mon was always illegal to begin with, just that past versions of PKHeX didn't have the check, and well, researchers weren't aware of that RNG relationship.

Now that it's known, we can check for it, and expose certain hacked mons as being illegal.

Link to comment
Share on other sites

15 minutes ago, theSLAYER said:

Based on your error, I believe it's this:
 

It's a new legality detection added to the latest PKHeX update. This just means your mon was always illegal to begin with, just that past versions of PKHeX didn't have the check, and well, researchers weren't aware of that RNG relationship.

Now that it's known, we can check for it, and expose certain hacked mons as being illegal.

Oh, okay. Thank you! Would share where you grabbed that quote? I didn't find it while trying to query the error in Google and DuckDuckGo.

Link to comment
Share on other sites

Probably handwritten into a blockquote :)

Basically, there's a correlation. Each wild encounter has a 32bit seed, which generates the EC, PID, IVs, Height & Weight. We can easily derive the EC by reversing the algorithm to get the seed, then we can run it forwards to make sure the seed yields all the resulting features. If it doesn't match, you get the error message.

If you're curious how the logic is translated in PKHeX's code:

https://github.com/kwsch/PKHeX/blob/223b56d779c11019482f8b97cfcf62312342b867/PKHeX.Core/Legality/RNG/Overworld8RNG.cs

It's similar to Gen3/4's PIDIV restrictions, hence the same error message.

  • Like 1
Link to comment
Share on other sites

10 hours ago, mithrandir said:

Oh, okay. Thank you! Would share where you grabbed that quote? I didn't find it while trying to query the error in Google and DuckDuckGo.

It’s a quote from a pin I made in our Discord server. So technically Kaphotics is correct about the handwritten part; it was written by me, just written elsewhere first.

 

link here (you would have to be a part of our server to see the message): https://discord.com/channels/343093766477053953/367479180398428170/827821664900481045

Link to comment
Share on other sites

12 hours ago, Kaphotics said:

Probably handwritten into a blockquote :)

Basically, there's a correlation. Each wild encounter has a 32bit seed, which generates the EC, PID, IVs, Height & Weight. We can easily derive the EC by reversing the algorithm to get the seed, then we can run it forwards to make sure the seed yields all the resulting features. If it doesn't match, you get the error message.

If you're curious how the logic is translated in PKHeX's code:

https://github.com/kwsch/PKHeX/blob/223b56d779c11019482f8b97cfcf62312342b867/PKHeX.Core/Legality/RNG/Overworld8RNG.cs

It's similar to Gen3/4's PIDIV restrictions, hence the same error message.

 

11 hours ago, theSLAYER said:

It’s a quote from a pin I made in our Discord server. So technically Kaphotics is correct about the handwritten part; it was written by me, just written elsewhere first.

 

link here (you would have to be a part of our server to see the message): https://discord.com/channels/343093766477053953/367479180398428170/827821664900481045

Alright. Thank you both for the information. It's been about a year since I really played Pokémon, let alone doing any save editing. Now I understand what was meant by that changelog entry. I'm not part of the Discord server. That explains why I didn't find it through a search engine. I may need to join the server if I want to stay informed and up to date.

Thanks again! I guess this thread can be closed. I'm not sure who I would need to message to close it.

Link to comment
Share on other sites

6 hours ago, mithrandir said:

 

Alright. Thank you both for the information. It's been about a year since I really played Pokémon, let alone doing any save editing. Now I understand what was meant by that changelog entry. I'm not part of the Discord server. That explains why I didn't find it through a search engine. I may need to join the server if I want to stay informed and up to date.

Thanks again! I guess this thread can be closed. I'm not sure who I would need to message to close it.

well, to be fair, how you stay up to date is via reading the changelog.

That message was only on Discord cause someone asked there first.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...