Can PokéTransporter make a Pokémon shiny?
Alright, I managed to find an answer after all. Here's what happened:
I used light math and a well-known tool that helps with RNG abuse to craft myself 2 Pokémon on Gen V games with the following characteristics:
- PID
7914C235
Shiny Value 6 -> shiny - PID
1B096AC5
Shiny Value 13 -> non-shiny in Gen V, theoretically shiny in Gen VI
I then transferred both Pokémon via PokéTransporter and checked their PID again. The result:
- PID
7914C235
Shiny Value 6 -> shiny - PID
9B096AC5
Shiny Value 32781 (=13+2^15) -> non-shiny
This leads to the conclusion that PokéTransporter checks for this case. If and only if it occurs, it changes the Pokémon's PID, probably by inverting the most significant bit (adding or subtracting 2^31 depending on whether or not the PID is above or below that value originally). I could test and confirm how it's changed by RNG'ing a Pokémon with a PID of 80000000
or more with a Shiny Value between 8 and 15, but this would bring little new and relevant information.
So, the gist of it is this: PokéTransporter checks the PID and compares it against the TID/SID. If the resulting Shiny Value is between 8 and 15 and would thus make a non-shiny Pokémon become shiny, it inverts the PID's MSB to force the Pokémon to be non-shiny.
Since the PID is no longer used for the various purposes it served up until Generation V, this change doesn't affect anything but shininess. It also affects legality in that a Pokemon that was not created in Generation VI+ may not have a PID/TID/SID combination that would result in a Shiny Value between 8 and 15. If it does, it was hacked into Gen VI+ without setting the Pentagon flag (or similar flags usedin later games) to make it look like a Gen V Pokemon by someone who didn't know this and messed up the PID.