well there is an issue when i go from III to II and return to III the ivs chance
and thanks now open the pkms! i hope the hability to open saves like enciclopedia or a-save will be implement
Yes, full SAV editing is in the works, testing and working on the interface right now!
Do you have an example of the IV problem? It shouldn't vary more than ±1 in any stat. The problem is that there's more combinations in gen3 than in gen2, so it's impossible to preserve all the information. Gen3 has 32 possibilities for each of 6 stats = 192 bits. On the other hand, there are actually only 4 IVs in Gen2 and since they range 0 to 15, that's only 64 bits so information will always be lost.
Going Gen3 to Gen2, I discard the HP and SpDef IV and half each of the others (losing the 0.5 sometimes) to get the 4 DVs in the range 0-15. But there's no way to recover that lost data when going back! Instead I set the SpDef and HP the way the Gen2 game calculates them, then double them. Finally, 1 is added to the right IVs so that the hidden power matches, working from the top down so max stat pokemon get all 31s or the appropriate 31/30 spreads. Since there's 64 possibilities for these last digits but only 15 hidden power types, some of the gen3 combinations never show up. In fact, by definition only 2^64 of the 2^192 spreads can ever be possible, whatever mapping is used! My choice of IV mapping is therefore optimal, as pokemon with different Gen2 spreads always get mapped to different gen3 spreads - and these get mapped back the same in the Gen3 to Gen2 direction.
There's only one minor problem with the top-down approach that I might look into in a future version -
minimum-stat pokemon. Take Alakazam for example - 0 attack might be better than max attack so that it hurts itself less in confusion. There's other cases like weather where you want minimum speed. Where () indicates the IVs determined by the other 4, the map from gen2 to gen3 gives:
(7)/0/15/15/15/(15) -> 14/0/30/30/31/30
(15)/1/15/15/15/(15) -> 31/2/30/30/30/31
Which whilst preserving the Hidden Power Ground/Steel actually loses its perfect speed.
What we'd really like is this:
(7)/0/15/15/15/(15) -> 14/0/31/31/31/31
(15)/1/15/15/15/(15) -> 31/2/31/31/31/31
But this changes the hidden power type, ie. we can't get *both*.
However, there is hope as perfect speed spreads
do exist for Ground and Steel, they're just not the ones generated by the top-down approach.
What does anyone think - should I just ignore the Hidden Power and always add the extra 1 to each stat (or never)?
Incidentally, for Psychic, Fire, Rock and Fighting, the pokemon must
always have an even speed IV, but for any other type there is always a 6-bit spread that will match the type and give it the higher speed. Conversely, Dark, Dragon, Grass, Ghost and Poison require an odd IV, so there's no way of having a 0 speed IV with this spread.
Since Gen2 shinies always have Dragon and Grass hidden power, gen2
shinies will always get an odd speed IV if hidden power is to be preserved. But in gen2, the speed IV has to be 10 for a shiny anyway, so we're forcing 21 instead of 20 which makes no difference at all!
One possible choice for the Alakazam that would preserve Hidden power and max speed is:
(7)/0/15/15/15/(15) -> 15/0/31/31/30/30
(15)/1/15/15/15/(15) -> 31/3/31/31/31/30
TLDR: The choice of the four or five different hidden power spreads for each hidden power type is completely arbitrary and is more complex than the program currently does it.