More actions
PKHeX | |
---|---|
General | |
Author | Kaphotics |
Type | Save Editors |
Version | 24.07.03 |
License | GPL-3.0 |
Last Updated | 2024/07/03 |
Links | |
Download | |
Website | |
Source | |
PKHeX is an open-source save file editor for the main series of Pokémon games, allowing you to transfer Pokémon data between saves, customize them to your liking, and much more.
User guide
PKHeX expects save files that are not encrypted with console-specific keys. Use a savedata manager to import and export savedata from the console (Checkpoint, save_manager, JKSM, or SaveDataFiler).
Supported files
- Save files ("main", *.sav, *.dsv, *.dat, *.gci, *.bin).
- GameCube Memory Card files (*.raw, *.bin) containing GC Pokémon savegames.
- Individual Pokémon entity files (.pk*, *.ck3, *.xk3, *.pb7, *.sk2, *.bk4).
- Mystery Gift files (*.pgt, *.pcd, *.pgf, .wc*) including conversion to .pk*.
- Importing GO Park entities (*.gp1) including conversion to .pb7.
- Importing teams from Decrypted 3DS Battle Videos.
- Transferring from one generation to another, converting formats along the way.
- Data is displayed in a view which can be edited and saved. The interface can be translated with resource/external text files so that different languages can be supported.
Showdown Sets
Showdown sets can be imported and exported for the Pokémon currently loaded to the tabs. Party and Battle Box may only be exported.
To export a showdown set from tabs:
- Press CTRL-SHIFT-T, or
- ALT click the Species label, or
- Tools > Showdown > Export Set to Clipboard.
To import a showdown set to tabs:
- Press CTRL-T, or
- CTRL click the Species label, or
- Tools > Showdown > Import Set from Clipboard.
Exporting Party/Battle Box sets:
- Click on the "Party" or "Battle Box" label directly above the sprites, or
- Tools > Showdown > Export Party to Clipboard, or
- Tools > Showdown > Export Battle Box to Clipboard.
PKHeX's Database
PKHeX is able to create a 'pkmdb' folder and store pkm files from all generations for later use. Consider it like a Pokémon Bank.
- The Database may be accessed via Tools > Data > Database, or by pressing CTRL-D.
- Pokémon from the active save file will also appear in the Database.
- You can search to find certain properties via the options on the right side of the window.
What can you do with the results?
- View - Loads into the Main window to view all properties, and can be set into the save file.
- Delete - Can be removed from the database (no undo).
You may additionally use the script command format used by the Batch Editor to do more advanced searching:
- To access the input region, Tools > Search Settings > Advanced Search or press CTRL-A.
- Advanced Search filtering is done after the regular GUI filters on the right side are processed.
- Refer to the Batch Editor tutorial for questions regarding figuring out what to enter.
Transferring between Generations
PKHeX only supports methods of transfer that the games support, emulating the official method of transferring for you.
Transferring can only be done forwards. For example, a pk7 cannot be imported to previous generations. There are multiple ways to accomplish a transfer:
- Individual Transfer:
- Open two instances of PKHeX, one with the source save and one with the destination save.
- Drag and Drop between the two windows.
- Bulk Transfer:
- Open the source Save File. At the top of the main window, select Tools > Data > Dump Boxes.
- You may choose to save to PKHeX's Database, or you may save to a Folder (highly recommend).
- Open the destination Save File in another instance of PKHeX.
- Drop the folder of PKM's on the save file.
- The box contents of the destination save file will be overwritten so that all PKM files have been imported.
Using the Batch Editor
Be cautious when using Batch Editor, because there is no undo:
- If you modify the contents of a Folder, the changes are permanent to those files.
- If you modify the contents of a Save File, the changes are permanent unless you re-load the Save File.
The Batch Editor is a powerful tool in which the user can make mass modifications to Pokémon in either their save file or supplied folder. By using the built in 'script builder', you may select from properties to either 'set' them or filter according to its value. There are three types of 'script commands' that may be entered:
.
- This sets the property of the Pokémon equal to the value..=
- This requires the property to be EQUAL to the value..!
- This requires the property to be NOT EQUAL to the valueIf a 'filter' (=,!) is not satisfied, the Pokémon is skipped.
The script interpreter is smart enough to understand the difference between numbers, strings, and booleans; quotation marks are interpreted literally and should not be used. A hint of the value type is provided beneath the dropdown.
Empty or invalid slots are skipped by default. A slot / file must have a valid Pokémon in order to be modified. Example:
=Box=1 !Slot=1 .Species=7 =IsNicknamed=false
Filters are interpreted first. Even though the "=IsNicknamed=false" appears after the ".Species=7" command, the batch editor will require all filters to be satisfied before any modifications are made. To explain what the above script does, it requires the Pokémon to be in the first box, but not in the first slot, and to be not nicknamed. It then sets the Species ID to 7 (Squirtle).
Batch Editor Special Tricks
- The Batch Editor window references the PKM that is currently viewed in the editing tabs.
- If you select a property name, the Batch Editor will indicate whether or not the tabs PKM has that property.
- If the tabs PKM has that property, the Batch Editor will display the property's current value as well as the data type (number, text, etc).
- To Randomize a PID, use ".PID=$rand".
- To Randomize EncryptionConstant, use ".EncryptionConstant=$rand"
- To Randomize a value within a range, use ".Nature=$x,y" for an inclusive range of [x,y].
- To make a Pokémon Shiny: use ".PID=$shiny".
- To copy the Encryption Constant to the PID, use ".EC=PID".
- To delete a Pokémon, use ".Species=0".
- To set a date (Met / EggMet), use yyyyMMdd for the string.
- Example: ".MetDate=20160409" will set the Met Date to April 9th, 2016.
- Suggestions can be automatically applied for Moves, RelearnMoves, and Met_Location.
- Example: "Moves=$suggest" will retrieve and apply suggested moves from the legality interpreter, same as if you clicked on the Moves groupbox in the tabs editor.
- Legality can be used as a filter. Use "=Legal=false" to only modify illegal Pokémon.
- A full up to date list is available by reading the source code (BatchEditor.cs, ProcessPKM method).
Remember that certain formats/generations do not always have future properties. There are many applications of the Batch Editor including mass hatching, deleting, making everything shiny, or clearing EVs from all applicable Pokémon.
FAQ
Q. Is PKHeX available for the Macintosh OS or Linux?
No. You can use software like Wine/Mono to run it on these operating systems, however the program may not function as intended.
Q> My Pokémon won't work on WiFi battles or can't be traded. Why?
This is usually a Pokémon legality issue. These problems aren't dealt with in the PKHeX subforum; see the announcement regarding cheating online.
Q. What is the Mystery Gift "Received List"?
Every Gift has a unique ID associated with it. When you receive a Mystery Gift the game flags your save file as having obtained the gift, and doesn't allow it to be obtained again.
PKHeX will set the used IDs for you; an ID can be deleted by right clicking the ID and choosing to "Delete".
Q. Can PKHeX create backups automatically?
Yes, create a "bak" folder in the same location as the executable, and PKHeX will export a backup of every new save you load.
Q. (Gen 7, 6) Is PKHeX compatible with Powersaves or Sky3DS?
No. It never will be. Save files must be decrypted in order to load & save, and must be resigned before put back into your cart data.
Q. (Gen 5, 4, 3) I'm using a flash card (R4, Acekard, etc) or emulator and my save file isn't able to be loaded. What's going wrong?
Make sure the save data is in 4 megabit format (512KB) for Gen4/5 games, and 128KB flash for Gen3 games.
Q. (Gen 2, 1) Does PKHeX support these games?
Yes Be sure you are exporting your save file in the "Battery" format (raw save file, not emulator specific).
Useful links
- PKHex Project page.
- Frequently Asked Questions.
- Using PKHeX - A set of tutorials about how to use certain aspects of PKHeX.
- Support Forum - Post here if you have questions or found bugs.
- The Beginner's Guide to PKHeX - From PokemonCreate Reddit.
Screenshots
Media
How To Use PKHeX - Official Tutorial (2022) Sword/Shield/BDSP/Legends Arceus (KlutchxGaming)
Known issues
GNU/Linux is not the main Operating System of developers of this program so there may be bugs; some may come from non GNU/Linux specific code of Mono/Wine, so other users may not be able to reproduce the error you are experiencing.
Changelog
v24.05.05
- Legality: Added Regulation G.
- Added: Entity editor can now modify battle-Status effects (Burn, Paralyze, etc). Click the bottom right corner of the window for the GUI.
- Added: Gen5 trainer records can now be edited via Misc editor. Not documented well, but exposes the values for editing.
- Added: Gen1-3 games now detect language/version based on the save file name. If not detected, can be overridden via settings before loading.
- Added: Gen1 can now show an Entity's gender if enabled via settings, using Gen2 IV gender determination logic.
- Fixed: Gen7 Chinese species names now write correctly.
- Fixed: Gen6 OR/AS DexNav count read/write fixed.
- Fixed: Gen3 trash bytes now reference the Entity for translating the string, rather than the save file.
- Fixed: Gen2 Box Names now read/write ligatures correctly.
- Fixed: Gen1/2 box data now retains empty slot data instead of reformatting into empty box lists (glitching friendly).
- Changed: Legality settings have been extracted to a more easily customized settings object.
- Changed: Translations updated for Chinese & Japanese. Thanks @ppllouf & @902PM !
v24.03.26
- Legality:
- Fixed: Handled some edge cases with latest release RNG Frame checks for Gen4.
- Added: Verification for Gen3 CHANNEL and MYSTRY seed patterns.
- Added: Gen4/5 API now supports reading/writing battle videos to the savefile object.
- Fixed: Gen5 Entree Forest in Misc now saves correctly. If broken, open the editor on the previous release and save again.
- Fixed: Event Flag diff now works as intended. Pokedex button restored for some save formats (regression from last release).
- Changed: Plugin error messages will now more clearly indicate they are an issue with plugins rather than PKHeX's fault.
- Fixed: Gen4 Daycare seed set now works as intended, no longer corrupts Daycare slot 2.
- Fixed: Gen4 Mystery Gift now reads correctly.
v24.03.10
- Legality: Added Encounter Slot RNG correlation checks for Gen4 (and Gen3). Because Encounter Type PID mismatch wasn't enough!
- When hovering over a slot, the program will indicate a possible method to encounter the slot with a lead & initial seed (not Method 1).
- Added: Gen8+ RNG seeds that are 64bit correlation (like SW/SH raids) will now indicate the detected RNG seed.
- Added: Gen1/2 Event Gifts are now recognized completely. Thanks @ShadowMario3!
- Changed: Save Block handling reworked to better match the real game behavior of managing chunks of memory. Thanks @foohyfooh!
- Changed: Gen6 O-Power editor now edits individual indexes and usage counts.
- Added: Out-of-bounds text entry characters are now indicated with a [?] next to the Nickname/OT text entry. Thanks @abcboy101!
- Added: Batch Editor commands are kept when the window is closed, while the program remains open.
- Added: Loading empty save files (all 00 or FF) will now give a more detailed error message indicating failure.
- Added: More games indicate Daycare status completely. Maybe editing in the future?
- Added: Gen1/2 NSO save files are now able to be loaded, edited, and exported without needing an external tool.
- Added: Gen2 player color palette now editable via Block Data editor. Thanks @Bl4ckSh4rk!
- Added: Gen4/5 Battle Videos can now be extracted & interacted with via PKHeX.Core API code.
- Fixed: Gen3 FR/LG National Dex unlock fixed. Thanks @Bl4ckSh4rk!
- Fixed: Gen9 Alcremie formarg handling for Pokédex fixed. Thanks @sora10pls!
v24.01.12
- Legality: Added Mochi Mayhem Pecharunt, Regulation F, and Blaziken Tera Raid recognition.
- Fixed: Level 100 encounters that were evolved in S/V with level-up methods (Eevee, Magikarp) now recognize correctly.
- Fixed: Gen1/2 transfers to Gen7+ will now recognize filtered OT names as valid. Thanks @abcboy101!
- Fixed: Recognition of Gen8 Hidden Ability patched raids now works as intended.
- Fixed: Recognition of Gen8+ GO encounters that evolve via form arguments now are recognized as intended.
- Added: MarkingCircle/Triangle/Square/etc now reimplemented, able to be used in Batch Editor commands.
- Added: Gen1/2 transfers to Gen7 can now override the default transfer version via program settings.
- Fixed: Gen9 Stellar type can now be set via Batch Editor with its corresponding type value (99).
- Fixed: Hover preview custom tooltip shows Hidden Power type correctly (was off by 1).
- Changed: Box Dump now uses a GUI to allow changing settings with more flexibility.
v23.12.22
- Legality: Updates for Scarlet & Violet 3.0.0 behaviors revised to fix inaccuracies.
- Fixed: Recognition of marks, stellar fixed encounters, and underdepths encounters.
- Gold Bottle Cap on flawless IVs in S/V is now flagged; upload to HOME & back to get the official fix.
- Fixed: Gen9 S/V 7-Star Raid records now can be edited with the revised raid block editor. Thanks @foohyfooh!
- Fixed: Other misc regressions too insignificant to note (but observed & reported by many -- thanks!)
v23.10.11
- Added support for Scarlet & Violet 2.0.2 save file sizes.
- Legality:
- Badwords list has been updated to be more strict per latest Nintendo Switch 16.0.0 firmware. Thanks @Bl4ckSh4rk!
- Gen9 Distribution Outbreaks now recognized. Thanks @Lusamine & @sora10pls!
- Gen9 Crossover met location logic tweaked for better location identification in Kitakami.
- Gen4 Pokéwalker IV spreads are now validated. Thanks @Lincoln-LM & @HappyLappy1!
- Added: Gen8 SW/SH adventure start date can now be changed in the Trainer Editor. Thansk @foohyfooh!
- Added: Gen4 Pokeathlon Points can now be edited via the Block Editor.
- Fixed: Initial program startup now notifies all plugins when a save is loaded on startup.
v23.09.25
- Added support for more Scarlet & Violet 2.0.1 save file sizes.
- Legality: Added more Kitakami encounters (sub-zones) and basic weather mark recognition.
- Fixed: Encounter template recognition regressions resolved (Gen4 Pokewalker, Gen9 static encounter scale).
- Fixed: Gen9 S/V Pokédex for 2.0.1+ save files now references a new save file block & GUI editor.
- Added: Gen9 TM/Fly cheats now check for if a flag exists for pre-2.0.1 save files.
- Added: Gen9 Fashion unlock cheat now adds 2.0.1+ fashion if available.
v23.09.16
- Added support for Scarlet & Violet 2.0.1 (Teal Mask)
- Legality: Added encounters / changes as per Teal Mask DLC adjustments.
- May still have issues with crossovers / hidden ability permissions.
- Changed: Evolve-Knowing-Move criteria has been rewritten for better side-game checks & accuracy.
- Changed: More encounter generator fixes implemented (missed a few properties).
- Fixed: Gen9 Pokédex clearing individual entries now only wipes the entry instead of everything that follows. Thanks @Alexander3a !
- Fixed: Gen5 CGear Skin importing now gives the correct error message when too many unique tiles are imported.
v23.08.23
- Legality: Added realtime RNG correlation checks for most SW/SH raids. Thanks @SciresM & @Lusamine !
- Note: Seed details do not trickle out to the verbose legality report at this time since seeds are 64bit (not 32bit).
- Added: The encounter generator / matching API has been refactored for better performance and maintenance.
- Fixed: More evotree edge cases have been resolved since the last update.
- Fixed: Gen4 Move Tutor now permits correctly for alternate forms.
- Fixed: Gen2 Union Cave B2F fishing slots are now recognized correctly.
- Fixed: Gen1/2 SID check no longer indicates "Fishy" when SID is correctly zero.
- Added: Technical Record editor now indicates yellow for record indexes that can be legally learned by a previous evolution.
- Added: Gen9 origin Transfers back to PK9 format now regenerate with legal values that would be sourced from HOME.
- Fixed: Gen9 Hoopa-Unbound no longer sets a FormArgument value of 3 whenever set back to box slots.
- Fixed: Gen7 US/UM relearn moves now properly show in all PK7s when loaded to tabs.
- Fixed: Gen5 CGear Skin handling now behaves correctly for importing & saving skins.
- Fixed: Pokérus strains now indicate correctly again in the PKM Editor GUI.
v23.06.03
- Added: HOME 3.0.0 initial support. Legality analysis is still under research. Thanks @Lusamine & @sora10pls !
- Lacks full support for cross-game transfers involving evolutions and moves. Please be patient, there's a lot of things to handle!
- Added: Tech Record editor GUI has been redesigned for a more visual experience. Can now sort alphabetically, owned, or move type.
- Added: Gen9 S/V clothing "cheats" have been added to the Trainer Editor window. Thanks @pasqualenardiello!
- Fixed: Small regressions in item list permissions.
- Changed: Gen7 Totem Form sprites now display with an Orange-colored glow, similar to Gen3 C/XD shadow purple.
- Changed: DPI scaling adjusted for better appearance on high resolution monitors.
v23.05.11
- Legality:
- Changed: Creating a new PKM from template will set current moves same as the games.
- Changed: Pokérus strains 0 & 8 now permitted due to official implementation errors in Gen2 & Gen3.
- Fixed: Encounters crossing over into Mesagoza (location 8) are no longer permitted (vertical distance).
- Fixed: TSV=0 HOME accounts are now permitted to exist, and antishiny XOR for the fixed PID gifts now behaves correctly.
- Added: Batch Editor filter commands can now reference other property values (aka "property copy") like modify commands.
- To copy a property, specify like so: .Stat_ATK=*Stat_DEF
- To filter based on the value of another property, same way.
- Added: Moves that have changed elemental type over generations will now indicate their type per the save file context.
- Added: Gen9 Player Image visualizer now shows the profile photos in the Trainer Editor. Thanks @pasqualenardiello !
- Added: Gen7 LGPE can now unlock all fashion via the Trainer Editor.
- Added: Gen5 Block editor now shows both roamer objects (Thundurus and Tornadus).
- Fixed: Gen9 scale indicators now reflect the >=1.1.0 patch scale thresholds. Thanks iD3M0N1C!
- Fixed: Gen5 C-Gear Skin no longer retains a file lock on imported skin image files.
- Fixed: Gen3 Memory Cards can now be detected as the latest save file, as well as a backup-file source for the pkmdb.
- Fixed: Gen3 XD un-purified shadow Pokémon no longer flag w/o Ribbon if they have a Shadow Gauge of 0 (ready to purify).
- Changed: Sub-form scaling mode changed to "Inherit" -- added a Display setting to revert back to Form scaling (from Dpi).
Credits
PKHeX's QR code generation code is taken from QRCoder, which is licensed under the MIT license.
PKHeX's shiny sprite collection is taken from pokesprite, which is licensed under the MIT license.
PKHeX's Pokémon Legends: Arceus sprite collection is taken from the National Pokédex - Icon Dex project and its abundance of collaborators and contributors.
External links
- GitHub - https://github.com/kwsch/PKHeX
- Project Pokemon Forums - https://projectpokemon.org/home/forums/forum/83-pkhex