I know it was mentioned in a Pokemon related topic a WHILE back and I'm sure I was more familiar with the changes back when they were new but could someone go over briefly the changes in how Pokemon data was created/stored/manged by the games that made Generations I & II incompatible with the Generations that followed them?
In Gen 1, you had Stat Experience (EVs), and determinant values (DVs/IVs). In a Pokemon's structure, there was one EV field for HP, Attack, Defense, Speed, and Special, and each EV field is 2 bytes (range 0 to 65536). All IVs were stored in 2 bytes (16 bits), with 4 bits for each of Attack, Defense, Speed, and Special. The HP IV was determined by taking the last bit of Atk, Def, Spd, and Spc IVs and connecting them together. So for example:
Code:
Attack: 0010 - 2
Defense: 1010 - 10
Speed: 1101 - 13
Special: 0101 - 5
HP: 0011 - 3
So from this, it can be seen that each IV ranges from 0-15, and the HP IV varies depending on whether the other IVs are even or odd.
When an enemy Pokemon is defeated, the winning Pokemon gains stat experience equal to the base stats of the defeated Pokemon. For example, defeating a Bulbasaur would give 45 Stat Exp. in HP, 49 in Attack, 49 in Defense, 65 in Special, and 45 in Speed. There was no cap on the overall Stat Exp. gained - you could, over time, max out the Stat Exp. for each stat. You could also box a Pokemon so as to update your stats even if you were at lv. 100, since you were still getting Stat Exp. even when not getting experience.
In Gen 2, you had the split of Special into Special Attack and Special Defense. You also had shinies, gender, hold items, friendship, Pokerus, details about where and when a Pokemon was captured (Crystal), and this was to be backwards compatible for G1. So as a result, a few fields were reused and repurposed - for example, the Pokemon's catch rate (1 byte) was stored with a Pokemon in G1, but never used. This is used as the index of the hold item in G2 (this also explains how some Pokemon come over with items from G1). Other things like friendship and Pokerus disappear when a Pokemon is traded back to G1, due to not being part of the 44 byte structure in G1 (which is now 48 bytes in G2).
The Special IV is now used to cover both Special Attack and Special Defense.
Gender is determined by taking the Attack IV and comparing it to the gender ratio for that specific Pokemon species. If the IV is lower, it's female. Otherwise, male. This has the silly side effect of making all female Pokemon weaker than male Pokemon on average...
For a Pokemon to be shiny, it's Defense, Special, and Speed IVs must be 10, and the Attack IV mod 4 must be equal to 2 or 3 (2, 3, 6, 7, 10, 11, 14, 15). This corresponds to a 1/8192 chance for Shiny Pokemon in the wild. It also lets you have a higher chance of obtaining Shiny Pokemon when breeding, due to how stats are passed down.
============
In Gen 3, the Pokemon data structure from G1 and 2 was pretty much thrown away, and a completely different method was established here for determining a Pokemon's characteristics.
First, the core of a Pokemon - the personality value. It's an unsigned 32-bit number, generated using a linear congruential generator function (the pseudorandom number generator, or
RNG) seeded at the game's startup and incremented through various actions, that determines certain characteristics of a Pokemon, among a lot of other things in the game.
Shininess comes from the PV and a trainer's ID and Secret ID (added in G3) - the same 1/8192 ratio is kept here. It can't be bred down (though the odds can be changed in G4 and 5 due to a special method). Gender and Nature come from different parts of the PV. These values happen to be interlinked - there are certain gender/IV/nature/shiny combos that are impossible to get.
IVs come from another unsigned 32-bit number that's generated from the same RNG the personality value comes from.
1 bit for Ability (2 max abilities)
1 bit for if the Pokemon comes from an egg or not
5 bits each for Special Defense, Special Attack, Speed, Defense, Attack, and HP
Due to IVs being 5 bits vs. 4, the range for IVs is now 0-31, rather than 0-15. And now since HP is determined on its own rather than from the others, there's no funny business here. Also, female Pokemon are just as strong as male Pokemon now
Because of when this number is generated, the IV spread is also connected to the PV, though not directly. If you've ever wondered why RNG abuse requires you to start the time at a specific time or (take x steps before going to the grass) or (tap a coin x times) to get a Pokemon with a certain IV/gender/ability/nature spread, here it is.
EVs are now 1 byte for each stat (range 0 to 255), and there's a cap on total EVs gained overall (510). Enemy Pokemon now give EVs based on the effort value yield for that specific species (1-3 in however many stats).
There are many, many other details left out, including changes made in G4 and G5 which made some of these systems less dependent on each other, but the main takeaway here is that the structure between 2 and 3 is completely different. Even if communication between the GB/C and GBA were possible (it should've been, but eh), the Pokemon wouldnt've gone over without massive changes to their stats etc. It wouldnt've been a matter of copying over the numbers into the right places, but of essentially finding a solution to a math problem - what PV and IV number can be used to generate the transferred Pokemon's IVs and such. And then you have the different formula for determining stats... Even if you could get the numbers to align, you'd have Pokemon becoming weaker due to the Stat Exp. being dropped - going from a max of +255 on all stats at lv. 100 to a max of +63 on any 2 stats is a big difference.