Jump to content

Pokémon Mystery Gift Editor (v1.4.3) (now with B/W support!)


Grovyle91

Recommended Posts

Hereby I present you, the Pokémon Mystery Gift Editor!

As the name already suggests, you can edit Mystery Gifts from the 4th and 5th generation games. It also has some extra features like exporting Wonder Card images and generating Action Replay codes.

At the moment there's being worked on a new version. But if you want to use the editor right now, please go to the downloads section.

Keep in mind that I do not support these older versions anymore. So please do not report any bugs you find, as I do not intend to fix them in the version 1.x branch (the version 2.x branch will (almost) be a complete code rewrite).

I will host this project on GitHub as soon as I'm satisfied with the new code base. This means you can view and contribute to the source code and/or researches, which I'm encouraging you to do so.

Be it contributing to the core, GUI, language translations, various lists, etc., it does not matter. I can use all the help I need.

News

19 May 2013:

I have cleaned up this post a bit, the old one is still available at the end of this post.

Downloads

See below in this post.

Known bugs

  • Version 1.4.3 has a problem with saving D/P/Pt/HG/SS saves, please use any lower version (which you can find here).

Changelog

None available yet.

Planned features

None and everything at the same time.

My requests: Research & Development

None at the moment.

Old post for archiving purposes:

 

NEWS REGARDING POKÉMON MYSTERY GIFT EDITOR (posted on April 21, 2013): Please read here.

Latest version: v1.4.3 (October 21, 2010)

Hi everyone!

I was quite sure there was no PGT and PCD file importer and exporter with a GUI yet for all Pokémon 4th Gen Games.

So I went to write my own, and I finished the first version within 3 days (which is a record for me :P).

About

So about my program. It's able to load a D/P/Pt/HG/SS save file, export and import the PGT and PCD files within it and also have some basic editing for these Gift or Wonder Card files. You can save your save file afterwards, and it automatically fixes the checksum too. The program automatically backups the save file, so if there's something wrong, just copy the *.bak* file back.

It doesn't have a Pokémon editor yet, but you can import and export the Pokémon files (*.pkm and *.bin). If I have some spare time the Pokémon editor will be finished as well.

This program is written in C# and you'll need .NET Framework 2.0 in order to run it. Since the final version of 1.4 you'll need .NET Framework 4.0.

News

21 October:

:grog: SURPRISE! The new version (1.4.3) supports Black and White save files! :grog:

You can now edit and save your B/W saves directly in PMGE without needing any other programs or tools.

This version also introduces the PGA file type, this file can hold up to 12 B/W Mystery Gifts and some MG related settings.

If you use the installer version, you can associate PMGE with all supported files. When you do, there'll be an extra item in the context menu of that file to open it.

You can now also create new Mystery Gifts instead of only opening it.

There are some bugfixes as well, like the display bug when importing a PGT/PCD that doesn't occur anymore.

19 October:

PMGE has been updated to version 1.4.2. This version includes some minor and major GUI changes and/or bug fixes.

It also contains a beta hex editor for B/W Mystery Gifts for those who want to hex edit it. The GUI should be better on all supported Windows platforms. Automatic save file trimming is now supported.

From now on I'll create a Setup and a Portable version. The setup version will automatically download and install .NET Framework 4.0 if not installed. It also checks your OS version. The portable version will be the same as always.

12 October:

Yes, you're not daydreaming or something like that. I've finally finished the final version of 1.4 after six, long months. You can download it below.

However, I'm not supporting Windows XP completely anymore. Since WPF is mainly focussed on Windows Vista or higher, PMGE works the best on those operating systems. So, if you are still running Windows XP, it is possible you encounter some display errors. If any error occours which prevents the program from working, please do report it here. I may find a way to solve it.

Now the updated features. I've updated HGSS ARDS export for those who still want it. I've changed the GUI in a way so it can open multiple files (tabbed editing FTW!). I've updated the ingame DPPtHGSS font (non-Japanese previews with Japanese characters now use the light version of these characters). And last but not least, basic editing of BW Mystery Gifts! (only PGF for now, not SAV).

So... hurry and download it! :)

Downloads

See below in this post.

Changelog

Version 1.4.3 (October 21, 2010)

  • SURPRISE! This version supports B/W save files!
    You can now edit and save your B/W saves directly in PMGE without needing any other tools.
  • Introducing new file type: PGA, this stands for Pokémon Mystery Gift Album, but it's not the same as the old PGA which is now rebranded as PGF. PGA can hold 12 Mystery Gifts from Black/White and some other settings regarding the Mystery Gifts in B/W.
    Technical information: PGA is the decrypted version of the Mystery Gift Block in B/W saves.
  • Added a feature to add a menu item in context menus of certain file extensions (requires installer version).
  • Added a feature to create new Mystery Gifts.
  • Restored the warning message at start-up for Windows XP users.
  • Fixed a display bug when importing PCDs or PGTs in save files.
  • Fixed a crash when trying to save settings in a read-only directory.
  • Dropping a PGF file on the executable opens the file now.
  • Reprogrammed save file support in order to support B/W saves.
 

Version 1.4.2 (October 19, 2010)

  • Added a beta version of an hex editor for B/W Mystery Gifts
  • Updated B/W Mystery Gift values
  • Some minor and major GUI changes and/or bug fixes, including:
    • Windows XP users should have a better GUI rendering now, as well as Vista and 7 users
    • Bug in B/W MG editing solved when editing a byte value (value was seen as ushort instead of byte, causing overwriting the next byte which shouldn't happen in any case)
    • When a file size doesn't match it correct size, PMGE will now trim the file in order to correct it
    • Added *.dsv, *.0 and *.dat to the list of supported save files

    [*]Updated some outdated information in the readme file

    [*]From now on two versions: Setup and Portable

Version 1.4.1 (October 12, 2010)

  • This version has been delayed too much! I'm very sorry!! 😢
  • The program is now written in C# WPF instead of C# WinForms.
  • From now on .NET Framework 4.0 is required to run this program!
  • GUI has been changed drastically, everything should be readable now on every computer without deactivating the background
    • Custom styles for almost every control
    • New design for editing Mystery Gifts only
    • Tabbed editing

    [*]Updated HGSS compatibility for Action Replay

    [*]Added basic BW Mystery Gift editing

    [*]Kazumi's font updated and moved inside the program

    [*]Light version of Japanese characters added for the MG Previewer (for non-Japanese games)

Version 1.4 beta 3 (March 9, 2010)

  • Fixed an "index out of range" error that occoured when editing something in the MG related editor in a D/P save
  • Fixed a problem when dropping a save file on the executable

Version 1.4 beta 2 (February 14, 2010)

  • Fixed the corrupted PNG export in the WC Previewer which occurred on some computers
  • The textboxes Card Title/Comment are wider now so that everything in it is visible now
  • Some other controls are wider now as well to compensate the old Win98 look
  • Fixed Korean character mapping in the WC Previewer
  • Fixed Pokémon icon positions in the WC Previewer

Version 1.4 beta (February 6, 2010)

  • Added experimental Action Replay DS Code export support
  • Changed the Pokemon fonts to kazumi's
  • Wonder Cards should now be exactly the same as in-game (thanks to kazumi)
  • Added the feature to create a Gift from a Wonder Card
  • Added Korean and Dutch (unofficial) language support for the Wonder Card Previewer
  • Added keyboard shortcuts for the Wonder Card Previewer
  • You can now drop PGT and PCD files on the window as well, the program will ask if you want to overwrite the current Gift/WC
  • Changed the numeric controls to dropdown boxes where you can select the current Gift and/or Wonder Card
  • Raised the maximum value of the Wonder Card IDs up to 2046 since this is supported in the save file
  • Moved the character table inside the code
  • Changed some HGSS exclusive items to its English equalivant, according to Serebii.net
  • Fixed a bug that prevented the checkbox for active Gift/WC in DP save files from working correctly

Version 1.3 (January 21, 2010)

  • Code optimization for easier implementation of more save file editing
  • Added 256 KB save file support
  • Added more Mystery Gift related editing functions (Mystery Gift enabling, used Wonder Card IDs)
  • Added some more Pokémon editing functions
  • Added the Symbol Inserter
  • Added the Wonder Card Previewer (Japanese not fully supported, Korean not implemented yet)
  • Fixed bug that will prevent the program loading a Wonder Card when its distribution amount is unlimited
  • More detailed error messages
    • File mismatch: files which aren't Pokémon save files will now throw this exception
    • File size mismatch: files which doesn't equals its correct size won't be loaded/imported anymore (which was still possible at certain circumstances)
    • Unknown error messages will have a trace from now on, this will help me to find the bug easier when reported (just CTRL+C the window to copy the text)

Version 1.2c (January 12, 2010)

  • Fixed bug that prevents the program from determining the active block in Pt/HG/SS

Version 1.2b (January 11, 2010)

  • Fixed bug that was causing the wrong block shuffling with certain Pokémon when importing unencrypted PKM files
  • The forgotten Gift PKM import is now also allowed to import unencrypted PKM files

Version 1.2a (January 11, 2010)

  • Fixed the "not saving" bug when there's already a backup file
  • Fixed the messages which appear when switching to a Pokémon Gift Type without actually a Pokémon imported
  • Fixed the icon in the window in the Windows 7 taskbar
  • The button to change the edit mode is disabled now after dropping a save file on the window

Version 1.2 (January 10, 2010)

  • Added unencrypted PKM file support
  • Added first PKM editing basics (read-only: editing is not possible yet)
  • Added Pokémon icons
  • Program is asking now to save the changes when saving the save file if it hasn't been saved already

Version 1.1 (January 6, 2010)

  • Internal code optimization
  • Added the possibility to edit a PGT or PCD file only (without loading a save file first)
  • Switching between the PGTs or PCDs will not longer revert the changes if they were not saved
  • Added the option to disable the automatic save file backup
  • Fixed Card Value byte (was not updating when the Gift Type was changed)
  • User settings are now saved in a *.ini file, instead of a big XML file
  • Uses now the game icon(s), instead of text for showing which game the save file is from
  • Program icon changed

Known bugs

  • Version 1.4.3 has a problem with saving D/P/Pt/HG/SS saves, please use version 1.4.2 for the time being (which you can find here).

Next build improvements and bugfixes

  • B/W Save File editing
  • Feature to open/view/edit PGT/PCD files directly from Explorer (thanks to someone who has suggested this, I don't know who it was, it's been too long for me to remember)
  • Re-enabling and expanding PKM editing
  • Lists of Pokémon, Items, etc.

My requests: Research & Development

-

And please report all bugs and/or feature requests here :)

Have fun editing!

Grtzz!!

Grovyle91

 

Mod edit: Downloads can be found here:

 

  • Like 2
Link to comment
Share on other sites

Well, I'd like to say congratulations on the great job. I do hope this will become useful to many.

I tested this briefly in mono and it seems to run ok. There is a small issue with the names containing é instead of e in Pokémon. For one I had to edit the name of the exe on windows for it to be recognized but there was still and issue with the config file. I did not have a suitable save to test completely so I don't know the extent to which that affects things. If it's not too much trouble, might I request that you not use é in the names of the config and the exe?

One again, good job.

Link to comment
Share on other sites

Awesome work Grovyle! I like the program a lot, I haven't gotten around to testing all of it yet but from what I did it seemed to work great (Pearl & Platinum) I plan to test Heart Gold later on as well but I'm sure it'll work great. Text didn't get corrupted or anything either and umm let's see unlike SCV the é in the filename/config made no difference for me but I'm on windows (Win7 x64) Only thing I'd suggest is using the .pkm format instead of .bin since I don't think a lot of people are used to it. anyways once again great work!

Link to comment
Share on other sites

Thanks! :D

Well, I'd like to say congratulations on the great job. I do hope this will become useful to many.

I tested this briefly in mono and it seems to run ok. There is a small issue with the names containing é instead of e in Pokémon. For one I had to edit the name of the exe on windows for it to be recognized but there was still and issue with the config file. I did not have a suitable save to test completely so I don't know the extent to which that affects things. If it's not too much trouble, might I request that you not use é in the names of the config and the exe?

One again, good job.

I've never heard of that problem :P

I'll edit that é to an e in my next build. And actually, I want to get rid of that whole .exe.config concept. Uses too much bytes as its XML, but I need to look at my other projects where I've the code that will save to a custom file, then I'll import the settings myself (the only setting is the background thing :P). But I've written this on my mother's laptop instead of my own pc, as my pc is back to Alternate for repairation... :( So I need to check my external HDD for my documents.

One thing that already has been changed is the need for a save file before you can edit PGT or PCD files. When I've edited that é and the settings file, I'll post v1.1.

Awesome work Grovyle! I like the program a lot, I haven't gotten around to testing all of it yet but from what I did it seemed to work great (Pearl & Platinum) I plan to test Heart Gold later on as well but I'm sure it'll work great. Text didn't get corrupted or anything either and umm let's see unlike SCV the é in the filename/config made no difference for me but I'm on windows (Win7 x64) Only thing I'd suggest is using the .pkm format instead of .bin since I don't think a lot of people are used to it. anyways once again great work!

Well, same for me. I'm writing this on a WinXP machine and it's working. The only thing is that you mustn't delete the .exe.config file, otherwise the program won't run...

But, since I'm changing this in the next build, this problem is also fixed.

About that .pkm and .bin. I need to add the functionality to decrypt the Pokémon before you can export it to .pkm. I'll take a look at it when I got home from school and after my driver lessons this afternoon :) (wish me luck since it's my 2nd lesson and it has been freezing last night...)

Grtzz!!

Link to comment
Share on other sites

Well I have just tested out this program with HG/SS. I works perfectly. There is nothing wrong at all. I love this program. This will be how I help with the event contribution thread from now on. Good job Grovyle91!!! Keep up the good work!

Link to comment
Share on other sites

Congratulations Grovyle91! Great job you did there, I haven't tested the program yet, but it's clear the alpha version works perfectly based on other comments. You know what ? They say 60-80% of the developer's work start upon releasing his program, so good luck working with upcoming builds and i hope you get some good feedback. And btw, THIS SHOULD BE STICKIED!

Link to comment
Share on other sites

Thanks everyone! :D

Great job Grovyle91! I had a feeling when you first started posting that you would make an awesome developer. :D

If you need any help with the PKM encryption / decryption process, let me know. :)

It costed me an hour or two to figure out how the decryption works, I needed to take a look at the source code of PPSE before I realized that it was just one small thing that prevented me to get the right decryption.

If I'm stuck again somewhere, I'll let you know ;)

Grtzz!!

Link to comment
Share on other sites

My SoulSilver save works perfectly, while my HeartGold one triggers this message :

61264216.png

I have no idea why this problem occurs, maybe my mystery gift section is messed up ? Anyway, if you need my save file to fix this issue i'll give you for both games so you can compare :

Pokemon SS.sav

Pokemon HG.sav

I'll be really grateful if you could find a solution, but if it doesn't work, no big deal. I'll simply start over with a clean save.

Pokemon SS.sav

Pokemon HG.sav

Link to comment
Share on other sites

This error occurs when the program wasn't able to find the unicode character of one of the characters in your Wonder Card. I'll take a look at it.

EDIT: I guess your save file got corrupted. I've tested your HG save with a newer build (with character replacing if a character hasn't been found, so that the program still loads your save file), but there were more characters that weren't found.

Am I right if your first Wonder Card is the 10th Anniversary Mew? From what I've seen what's corrupting this Wonder Card, is the Pokémon part of this card, it's copied and shifted a couple of bytes further in your save. Right over the text.

Did you do something unusual with your save file?

Edited by Grovyle91
Link to comment
Share on other sites

Version 1.1 has been released! There are more internal code changes than GUI/feature changes in this build, mainly to prepare the PKM decrypting/encrypting in the next version. However, to make this version interesting, there are some handy changes in the GUI. Like that the changes are not lost when you switch to another Gift or Wonder Card (you still have to check if you've saved everything before you save the save file), or that you can edit a PGT or PCD file directly (without needing a save file at all) and there's a option to disable the automatic backup (use at your own risk). For the changelog and download, please go to the first post in this thread.

Since this version has all its critical code changed, you need to consider this version as not fully stable yet. In case if you have problems in this version, please use version 1.0 instead and report these bugs. However, I'm quite sure this version runs just as smoothly as the previous one, but you'll never know :P.

And thanks codemonkey for stickying this :D

Link to comment
Share on other sites

Had a brief look at it and just wanna say I'm glad you made this. Mine really wasn't sufficient for most purposes, which was fine with me because I'd hoped something else would come along. And now it has!

I'd like to point out that your avatar is a Treecko, while your "successor's" avatar is the evolved form, Grovyle. The hilarity!

And you're welcome, Grovyle91. I figure if an active and useful project crops up around here, it's a good idea to give it some attention. :D

Link to comment
Share on other sites

I've finally found some time to release version 1.2. In this version the unencrypted PKM files are supported. Also, some properties of Pokémon are added, though read-only. I'll try to add some more in the next version. More in the changelog.

For the changelog and download, please go to the first post in this thread.

Link to comment
Share on other sites

Hi Grovyle 91.

I'm urgood1. I saw your post on Pokémon Mystery Gift Editor (v1.2) saying that you wrote the program to import the PGT file. I tried to use yours to import the Enigma Crystal event into my SAV. However, I couldn't even open my SAV file.

In the beginning, I've changed my SAV size down to 512 KB from 1 MB. But when I loaded the SAV file again, this time it said, " '65535' is not a valid value for 'Value.' The value for 'Value' should be within the range of 'Minimum' and 'Maximum.' "

I saw everyone else's SAV files work just fine. I just don't get how mine just doesn't work. Would you please see what the problem is and solve it for me please? I'll try to post this message up in the tread along with my SAV file. Thank you very much sir and have a wonderful day!! =D

Best Regards,

urgood1

Pokemon - Heart Gold (J) -original.sav

Pokemon - Heart Gold (J) - 512KB.sav

Pokemon - Heart Gold (J) -original.sav

Pokemon - Heart Gold (J) - 512KB.sav

Link to comment
Share on other sites

Hi Grovyle 91.

I'm urgood1. I saw your post on Pokémon Mystery Gift Editor (v1.2) saying that you wrote the program to import the PGT file. I tried to use yours to import the Enigma Crystal event into my SAV. However, I couldn't even open my SAV file.

In the beginning, I've changed my SAV size down to 512 KB from 1 MB. But when I loaded the SAV file again, this time it said, " '65535' is not a valid value for 'Value.' The value for 'Value' should be within the range of 'Minimum' and 'Maximum.' "

I saw everyone else's SAV files work just fine. I just don't get how mine just doesn't work. Would you please see what the problem is and solve it for me please? I'll try to post this message up in the tread along with my SAV file. Thank you very much sir and have a wonderful day!! =D

Best Regards,

urgood1

First off, your save file shouldn't be 1MB. The proper size for any 4th gen pokemon save is 512KB. Either the savetype autodetection in your flashcard is bad, or you set it to the wrong size.

I'm not sure how you converted down to 512 KB but it appears it wasn't done correctly. I got it to work by just chopping the extra 512 KB off the end. You can download the fixed file below.

test.sav

test.sav

Link to comment
Share on other sites

First off, your save file shouldn't be 1MB. The proper size for any 4th gen pokemon save is 512KB. Either the savetype autodetection in your flashcard is bad, or you set it to the wrong size.

I'm not sure how you converted down to 512 KB but it appears it wasn't done correctly. I got it to work by just chopping the extra 512 KB off the end. You can download the fixed file below.

Dear Poryhack,

Thank you for going through all the troubles with my SAV file. I think my R4i's autodetection was just being dumb to make the SAV files 1 MB, including both Platinum and Heart Gold SAV.

Now my questions are, "How did you chop down the other 512 KB end and make the file work just fine? Would you please teach me how to do that because I want to learn some new skills? And Would you do me another favor to chop down the other 512 KB from my newer Heart Gold SAV file because later on today, I had beaten 2 more gyms?"

If you could help me chop down the file and teach me how to do it, I'll be greatly appreciated! Thank you very much for your kindness and your consideration.

Best Regards,

urgood1

4168 - Pokemon - Heart Gold (J).sav

4168 - Pokemon - Heart Gold (J).sav

Link to comment
Share on other sites

Here is a bug i am reporting:

when i load a Sav file any changes made writes to Slot 2 instead of the Slot 1 Sav and it is using 2nd block when it loads the sav so i am unable to use this program all together unless i can write slot 2 to slot 1 or make my slot 1 corrupted!

i will also upload my sav file if you wish to take a look at it

Pokemon Platinum.sav

Pokemon Platinum.sav

Link to comment
Share on other sites

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