Jump to content

Recommended Posts

Posted

Potentially dumb question. I've been working on putting together a Black 2 save and I noticed that the Pokemon I was genning were showing PID Type none consistently? When I noticed the PID issue, I assumed initially it was due to using Entree Forest Pokemon. But then noticed it was also happening on my regular mons as well. I went and started a fresh save on Black and Omega Ruby then imported those saves over. I noted that both games respective starters were showing PID Type None as well.

 

I've done this for earlier gens and not had a problem by using things like Pokefinder/RNG Reporter/etc to generate realistic PID's based off seed searches. I've generated several mons from 3rd and 4th gen games all of which show associated PID information normally by following this process.

 

The closest possible related answer I could find was this thread: https://projectpokemon.org/home/forums/topic/66178-pid-type-and-origin-seed/

 

Specifically "2. If the Pokemon is generated with a pattern that isn't detectable (sufficiently random) then it won't show a pattern or lack thereof. Patterns that are too difficult to detect in realtime are not checked. "

 

I assume this (or some other unrelated reason) means 5th-7th gen Pokemon won't show their actual PID Type with the exception of a couple Pokemon(saw some events had them)? FWIW the PIDs I'm generating are all coming back legal, I just liked the extra confirmation I was getting on previous gens. Wanted to ask just to make sure it wasn't me.

Posted

Games across the generations are programmed differently, have different RNG implementations, and different patterns.

Gen3 uses a single RNG; a 32-bit Linear Congruential RNG. To simplify things, the 32-bit RNG produces four 16-bit random values to generate the PID (32-bits) and IVs (30 bits). The RNG itself has 2^32 different states, so the PID (2^32) and IVs (2^30) are restricted in the possible results they can be found with. A 32-bit LCRNG cannot output more than 2^32 different combinations; the PID/IV has 2^62 different states possible. Hence, we can check if an RNG seed can yield the current PID/IV through backwards calculation.

Gen5 uses two RNG instances to generate a Pokémon. A 32-bit seeded Mersenne Twister generates IVs, and a 64-bit main RNG to produce everything else. The mersenne twister can produce all possible IV combinations, so there is no correlation/restriction to detect for those. The remainder of the "random" properties such as PID-Gender-Ability (32-bits), Nature (0-24) are possible to obtain in any permutation, as the 64-bit RNG is orders of magnitude more random. It is important to note that there are still restrictions; if the game generates things in a specific pattern (like truncating certain bits of the PID) then the Pokémon must still follow the patterns of how the game generates a Pokémon to still be legal. The Entree Forest Pokémon require the ability bitflag of the PID (bit 16) to be 0 so that the game properly remembers it has that ability slot rather than a random ability.

If all pkm-property-combinations are randomly possible from the game's RNG, then there is no correlation to detect. It's not worth the time/computation to guess & indicate an RNG seed, when there are billions+ of possible seeds that can originate it.

  • Thanks 1
Posted

Wow! Thanks for the in-depth reply. I'll look into it further and see if I run into anything else. I really appreciate you taking the time!

  • Like 1

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...