Programming Gen1to3 All-in-one Editor and Converter

Last edited:
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
 
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.
 
Last edited:
First let me just say that this program is fantastic! With the recent release of Pokemon Bank I was wondering if I could transfer Pokemon from my (emulated) Blue version into Pokemon X, and now I have! I did run into a few problems, though, and I thought you might find them interesting.

1. The newest beta doesn't work at all. I've tried it on 4 different computers, 3 windows and 1 Ubuntu. After loading a .sav file it simply does nothing, and after loading a .pkm file it will actually freeze.

2. Pokemon Transporter wouldn't accept my Charmeleon. I was about to list his stats here and then noticed he knows skull bash.. I taught it using a TM in Blue version, and I'm not sure if it's possible for Charmeleon to even know skull bash in the newer games. I'm going to assume this is the issue and try again without that move.

Edit: Turns out Charmeleon can no longer learn Skull Bash or Rage, both of which my Charmeleon knew. Went to the move deleter and then transferred with no problems! Got my full party from Blue in X now. Awesome!
 
Last edited:
Thanks smitty96, that's good to know. I'm glad it's worked for what you wanted to do, that's awesome you've got your original Blue party into X!

Could you upload the SAV and PKM files that are causing problems? I'm currently doing a major rewrite of lots of the code to speeden it up and make it easier to read and maintain. What file size is your blue and the PKM file in bytes? The new code has proper error handling, so it should never freeze and will give you an error instead of doing nothing. Keep your eyes peeled for an update!
 
New version (see attachment to original post) released featuring lots of bug fixes, a fully working GUI that no longer hangs, Pokerus byte support and full automated validation. Lots of code has been changed for optimisation, for example level is calculated using a lookup table of precalculated boundary values instead of computing them each time an experience value is loaded/changed and each time an EV is changed (for calculating the stat).

DOWNLOAD VERSION 7.1
 
Last edited:
I was looking for a toll like this for weeks!! I do gen 2 battles wifi and this tool is perfect for my needs.

It's far better than pikasav, but just one little question:

Could you make a suggested moveset for each pokemon? Like when I select (for example) Venusaur, the moves I can choose are the moves Venusaur can learn by level or by TM.

Because it's a bit uncomfortable when all moves are listed.

For the rest congratulations for such an useful tool!!
 
Hello, I thought the same thing as smitty when I heard of pokemon bank. This sounds extremely exciting, however I am not sure how to work this program at all. I am not familiar with mods or any of the sort. I simply have pokemon from actual game cartridges that I want to transfer to the new games. Will this work for me? I know this is a computer program so how do I go about getting my pokemon onto my computer? Is this only for emulators on PC?

I may need to be walked through this...
 
I was looking for a toll like this for weeks!! I do gen 2 battles wifi and this tool is perfect for my needs.

It's far better than pikasav, but just one little question:

Could you make a suggested moveset for each pokemon? Like when I select (for example) Venusaur, the moves I can choose are the moves Venusaur can learn by level or by TM.

Because it's a bit uncomfortable when all moves are listed.

For the rest congratulations for such an useful tool!!
Pokemon Encyclopedia validates movesets, but I've found the way it does it to be annoying. For example Deoxys can't be given extremespeed, counter or the other forme-exclusive moves. Even accounting for special cases like Egg Moves, XD Move Tutors and event moves, it's so easy for a move like that to slip through the net that it's better leaving it to the player. PP is validated though. It could be implemented as an additional option that could be overriden by the user, but I wouldn't know how to go about harvesting movesets.

The more important reason I've chosen not to validate moves... is the moves are supposed to be wrong! Take Machamp for example - it learns Fissure in Red/Blue by TM but there is no way gen 3 on of teaching it the move. Gen2 to 3 opens floodgates of all sorts of additional moveset combinations - something Nintendo chose not to allow. This is only a tool - how you choose to use it is up to you. Similarly for tradeback moves - moves from GSC would appear purple in Stadium 1 and converting Gen3 to Gen2 will create problems like that. The games don't care what your moves are as they've been coded to expect new event moves anyway.

If movesets were validated, then should caught location be too? I'd rather let players decide. But as for PP, EVs, stats etc. that's not for players to decide as e.g. PP above the max is just glitchy and well wrong.
 
Hello, I thought the same thing as smitty when I heard of pokemon bank. This sounds extremely exciting, however I am not sure how to work this program at all. I am not familiar with mods or any of the sort. I simply have pokemon from actual game cartridges that I want to transfer to the new games. Will this work for me? I know this is a computer program so how do I go about getting my pokemon onto my computer? Is this only for emulators on PC?

I may need to be walked through this...
I'd rather not stray into this area, but this is possible. I've edited physical cartridges, but you'll need to extract the save file from the cartridge first, then edit it on a computer and finally restore the save file to the cartridge. That's another topic for another thread possibly another website. Sorry to not been of more help, but would rather leave the topic about this tool not more general.
 
Heyo, I just started a super Nuzlocke(Gen I-Gen VI), with my goal being to transfer all of my 'mons from Hall-of-Fame victory into my next game as level 2s. A problem I've run into, though, is the OT naming. I just transferred my 5 HoFs to my Crystal, but it won't recognize my Crystal's name correctly. My usual gameplay name is Kraklano, but since I'm doing a Nuzlocke, and the 7-character limit on Gen I and Gen II games, I use Nuzkrak as my name. Your program seems to reduce it to a 6-character limit, while retaining OT of the converted 'mons. I can type in a 7th character on my name, but as soon as I save it, removes the 7th.
 
Heyo, I just started a super Nuzlocke(Gen I-Gen VI), with my goal being to transfer all of my 'mons from Hall-of-Fame victory into my next game as level 2s. A problem I've run into, though, is the OT naming. I just transferred my 5 HoFs to my Crystal, but it won't recognize my Crystal's name correctly. My usual gameplay name is Kraklano, but since I'm doing a Nuzlocke, and the 7-character limit on Gen I and Gen II games, I use Nuzkrak as my name. Your program seems to reduce it to a 6-character limit, while retaining OT of the converted 'mons. I can type in a 7th character on my name, but as soon as I save it, removes the 7th.
Thanks for the error report - this has been fixed and will be included in the next release along with some other fixes like Crystal money being read incorrectly.
 
Thanks for the error report - this has been fixed and will be included in the next release along with some other fixes like Crystal money being read incorrectly.
Okey dokey, thanks! :D I would've mentioned the money as well, but I didn't care, lol. I found a temporary workaround being using this to transfer, then using PikaSav to fix the errors.

I've happened to run into another error though, unfortunately. I used to be able to use this to adjust the stats of my 'mons, both those in the PC and those outside it. Now, when I use the program, it seems to not even register me having anything in my PC, yet PikaSav does. And at one point, my 5 'mons transferred from Gen I became corrupted and became 2 Tentacools and 12 Slowbros, oddly enough. Ever since I removed these odd 'mons from my PC, I haven't been able to access my 'mons that are there with Metropolis. It might be because I deleted those 'mons from my PC via PikaSav because I oddly didn't think of going in-game to release them.
 
Okey dokey, thanks! :D I would've mentioned the money as well, but I didn't care, lol. I found a temporary workaround being using this to transfer, then using PikaSav to fix the errors.

I've happened to run into another error though, unfortunately. I used to be able to use this to adjust the stats of my 'mons, both those in the PC and those outside it. Now, when I use the program, it seems to not even register me having anything in my PC, yet PikaSav does. And at one point, my 5 'mons transferred from Gen I became corrupted and became 2 Tentacools and 12 Slowbros, oddly enough. Ever since I removed these odd 'mons from my PC, I haven't been able to access my 'mons that are there with Metropolis. It might be because I deleted those 'mons from my PC via PikaSav because I oddly didn't think of going in-game to release them.
Hmm that's weird - do you have save files to attach? Problems with individual pokemon shouldn't corrupt the whole box.
 
Hmm that's weird - do you have save files to attach? Problems with individual pokemon shouldn't corrupt the whole box.
Bah, sorry for the late reply, I dropped my previous one and left the building. I can definitely upload my save file if you'd like.

EDIT: I downloaded the new version, and my boxes show up as they should, and I no longer get some odd "Gen II item not found"(Paraphrased) error I did before(I didn't know what it did, so I ignored it), aaaaand my Trainer info shows up like it should! Excellent work on this. :D
 
Attached in original post is latest version. Features fixes for .sav instead of .pkm; opening directories for Export; now makes a first guess at the version using the filename. Experience is now recalculated when the species is changed using the drop down box. Basically once you've decided the level you can change the species freely without the level sometimes dropping.
 
Last edited:
I really like this. I made this account just to thank you... It means a lot to have my original guys on a new game. Time to get them onto a gen4 and wait for another way to get them to pokemon x and y without using the bank. Anyways I am very grateful for this tool. Thanks again
 
Hello! I'm kind of new with Pokemon Editing, so this may seem like a stupid question. I have an "old" computer and I'm not sure whether that will effect this or not. I downloaded the link and Firefox asked me how I'd like to open the file Metropolis.zip giving me the options Internet Explorer, Notepad, Windows Media Player, and WordPad MFC Application. I'm not sure what to do, I'd love some help!
 
Hello! I'm kind of new with Pokemon Editing, so this may seem like a stupid question. I have an "old" computer and I'm not sure whether that will effect this or not. I downloaded the link and Firefox asked me how I'd like to open the file Metropolis.zip giving me the options Internet Explorer, Notepad, Windows Media Player, and WordPad MFC Application. I'm not sure what to do, I'd love some help!
First you'll need to install an unzipper - this is something you'll need for lots of other downloads as software is commonly zipped up like this. A good one is 7-Zip as it's free: http://www.7-zip.org/

Then once unzipped you should have a folder containing Metropolis.jar. There's further instructions in the readme. Metropolis.jar is the actual program and to run that you'll need Java installed. https://www.java.com/en/download/

Now double-clicking Metropolis.jar should open the editor. Did all that go OK?
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top