Jump to content
  • Using PKHeX

    A set of tutorials about how to use certain aspects of PKHeX.
    1. 1

      Introduction and Setup

      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. Before continuing, please be aware of our no-cheating policy. We will not assist you in cheating against unsuspecting opponents. As long as you agree to use your edits in appropriate situations, let's begin. Prerequisites The ability to manage your save files. Locate the appropriate guide in our tutorial section to learn how to manage your save files A compatible computer Windows with the .Net Framework 4.6. Linux with the latest version of Mono macOS Sierra or macOS High Sierra What you need For Windows or Linux with Mono: PKHeX For Windows, when you click Download, choose "PKHeX (versionNumber).zip" For Linux, when you click Download, choose "PKHeX-mono (versionNumber).zip" For Mac: A way to extract 7-zip files such as Keka. PKHeX for Mac When you click Download, you can choose either of the two files, but if you want to have legality checking, do not download the one marked "Illegal Mode". If you cannot get this to work after following these steps, refer to this guide for alternatives. Starting PKHeX For Windows and Linux with Mono: Extract the PKHeX zip file somewhere on your computer. Run PKHeX.exe Press "Yes" when prompted to create a backup folder. Then click OK. For Mac: Extract the 7-zip file Run PKHeX.app (or PKHaX.app if you chose Illegal Mode) Press "Yes" when prompted to create a backup folder. Then click OK. More sections of the tutorial coming soon.
    2. 2

      How to Compile The Latest Version of PKHeX

      I decided to make a quick video and guide on how to compile PKHeX since most of the guides or "tutorials" I see out there are either outdated or way too complicted for the average user that just wants to quickly get the latest version of PKHeX. I know when I first started to get into the compiled versions of PKHeX, I had so much trouble getting things to work. Ill also include a video I just made explaining it too.   1. Go and download Microsoft Visual Studio Community 2017 Here: https://www.visualstudio.com/downloads/     2. Install and make sure Microsoft VS opens properly (you may need the latest .NET installed)   3. go to https://github.com/kwsch/PKHeX and download the latest master     4. Unzip the "PKHeX-master" folder from the zip you just downloaded and open "PKHeX.sln"     5. click on "Build" and then "Build Solution"     6. Make Sure it Says that 0 Failed. If any Files Fail to Build I Would Just Retry Step 5     7. Go back to the "PKHeX-master" Folder from Earlier and Enter (PKHeX.WinForms>>bin>>Debug) If Everything Worked you Should see All of the PKHeX Files in this Folder. (You Only Need the PKHeX Program (the one with the PKHeX Logo) and the PKHeX.Core.dll File. The Rest of the "PKHeX-master Folder Can be Deleted.     Congrats! You Just Learned How to Compile PKHeX. If You Need Any More Clarification Just Check Out My Video Tutorial Above.
    3. 3

      Loading and Saving

      The exact usage for PKHeX may vary slightly depending on which game you're editing, but much of the UI is the same across games. Loading Pokémon Data To edit Pokémon data in a save file, follow these steps. Use File -> Open Browse to the save you want to edit. You can either choose a save file or a Pokémon file. If you open a Pokémon file (*.pkm, *.pk7, *.pk6, etc.), the tabs on the right will immediately show the Pokémon data, and you can proceed to the next section after optionally making changes. If you chose to open a save file, you should now see your PC box to the right. You can use the drop-down or the ">>" or "<<" buttons to change boxes, or click the "Party-Battle Box" tab to see your party. Choose the Pokémon you want to edit, right-click it, and click "View". The tabs on the left should now show the Pokémon you chose. Saving your changes When you've finished editing your Pokémon to your liking, it's time to save those changes. You can do this either by saving the data to your save file, or by saving them to a Pokémon file. If you loaded a Pokémon file in the first section, "Loading Pokémon Data", saving a Pokémon file is your only option. To save your changes to the save file: Right-Click a slot on the right and click "Set". You do not have to choose the same slot you loaded from if you don't want to. This is actually a way to clone Pokémon if you so desire. When you're finished editing your save data, export the save file by using File -> Export SAV... -> Export main If you want to save just the Pokémon in the tabs on the left, click File -> Save PKM...  
    4. 4

      Importing Wondercards

      PKHeX can be used to import wondercards from our event gallery using these steps. Please note that the below screenshots show what it looks like for Gen 5 saves, but the same procedure works for Gen 4, 6 and 7 saves. If you are using a Gen 4 save, please note the difference between PCD and PGF files: PCD files contain the entire wonder card, while PGF files only contain the gift. Start PKHeX and load your save file as described in a previous section. Click the Mystery Gift button. Click the Import button and browse to a wonder card. Right-click an empty slot and choose "Set". If you do not have any empty slots, you will have to overwrite an existing one. If this is the case and you wish to save it first, right-click the existing slot and click View, then click Export. If you are using a Gen 4 save, you must choose a slot that corresponds to the file you opened (PGT vs PCD).  PKHeX will let you know if you choose the wrong one. Click Save Save your file
    5. 5

      (Gen 5 Only) Importing C-Gear Skins

      PKHeX can import C-Gear skins from our event gallery using these steps. Start PKHeX and load your save file. Open your save file for Pokémon Black, White, Black 2, or White 2 using File -> Open... Click "C-Gear Skin" Click "Import .cbg/.psk" Browse to the skin you want to use. After opening the file, click "Save". Save your save file
    6. 6

      (Gen 3-4 Only) Solving "PID Mismatch"

      This guide to resolve any issues users get when they try to change nature or PID of a Pokemon from Gen 3 or Gen 4. DO NOT USE ANY POKEMON WITH MODIFIED PID ONLINE!   Foreword The reason why people get various PID-Mismatch or Invalid Encounter type of messages, is because simply, they did not modify the Pokemon correctly. In Generations 3 and 4, due to an in-depth understanding of how the Pseudo-Random Number Generator works (as well as game mechanics), the Personality Value (PID) is tied to various other values related to the Pokemon generation procedure in-game, such as Individual Values (IVs), Gender, Ability slot, Nature, and Encounter Slot. (Encounter slot refers to the programmed data in a table, that hosts a list of level and species that can be encountered in a map) Resolution Process For starters, I'll be using this shiny Deoxys, to attempt to change its nature to Sassy (while keeping it shiny). Let's begin: Download RNG Reporter Change the stat you want (for example, nature) Pokemon in PKHeX, and set it into the box. Example, it looks like this now: (other examples include Encounter Type Mismatch) Identify which Method is appropriate. What is important is: (More details at the bottom of the page under Note 1) Find PID using RNG Reporter Open RNG Reporter Select the chosen Method Indicate ID and SID and check Shiny Only, if the final result wanted is shiny. Indicate Encounter Type (if necessary). if you're going for a Pokémon that has an overworld sprite that isn't the Red Gyarados (Sudowoodo, Snorlax, Heatran, Giratina, Azelf, etc.) select Stationary Pokémon . The rest are self-explanatory. Most of the time you'll be picking Wild Pokemon as your method unless you're only going to capture legendaries, in which case you'd pick Stationary Pokémon. Indicate the stat you want (IVs or Nature, or Gender for example) Select starting frame at 1000 Click Generate. If you don't get any results, feel free to increase the Max Results. Example of results: * If you are doing this for a Wild Pokemon, ensure that the result you've chosen, has the Encounter Slot that matches your species encounter slot on the route. To check the relevant encounter slots, refer to this website. If RNG Reporter Main page doesn't give you any hits, consider using Time Finder. See Note 2. In PKHeX, change the PID, Nature, Gender, Ability, and IVs to match what was generated. Note 1: "Method" details Method 1 Method H Note 2  
    7. 7

      Adding Pokemon Cries to PKHeX

      This guide will show you how to add the Pokemon cry sounds into PKHeX. With this feature, every time you hover over a Pokemon in PKHeX, it's cry will play.   1. In the same folder that PKHeX is located, create a new folder called "sounds" 2. Place your Pokemon cries into the "sounds" folder. Make sure the cries are in the ".wav" format with the following naming format. 1.wav = Bulbasaur 649.wav = Genesect Pokemon with different cries for alternate forms are 492.wav = Shaymin 492-1.wav = Shaymin Sky Form 3. Open PKHeX and verify that the cries are being played properly by hovering your mouse cursor over a Pokemon in any box. If the cry does not play, verify that you are running the latest build of PKHeX. Also verify that the "Play PKM Slot Cry on Hover" setting is turned on by going to "Options>>Settings"
    8. 8

      Creating and Managing a Pokemon Database in PKHeX

      This tutorial will teach you the basics of creating as well as managing a Pokemon database in PKHeX. Using a Pokemon database streamlines the process of backing up, preserving, and organizing any size of Pokemon collection making it a very useful and powerful feature to take advantage of.   1. In the same folder that PKHeX is located, create a new folder called "pkmdb" 2. There are 2 ways of organizing your Pokemon database. The first way is to Place all of the pk files into the database folder without folders. This is useful for seeing all Pokemon with the same species grouped together by default Note:Because the Database sorts the default view by A-Z, files will not be in generational order (Gen 1-7) but instead file A-Z order. This may cause inconsistencies in the order of Pokemon.  The second way of organizing your Pokemon database is by organizing your Pokemon into certain folders with other criteria. This is useful for collections like living dexes or shiny Pokemon vs non shiny since with this method, Pokemon are grouped by folder A-Z instead of File A-Z. 3. Once your Pokemon are organized in your preferred style, your Pokemon database is ready to use. On the side of the database are search criteria to narrow your search of Pokemon. Enter in your search criteria and click the "Search" Button. In this test search I have selected to only show Adamant Nature Pokemon that are in the pk7 format. After you click "Search" your filtered results should appear. 4. Once you are satisfied with your search results, you can click on "Tools" to either export the results of your search to a folder of your choosing on your computer, or you can import the results of your search into the current box of the save you have loaded. For this demonstration I will be showing the import feature. The export feature is very easy to use and self explanatory. 5. Follow the prompts (Most likely you will only need to click "yes" for all of the prompts) and an alert will pop up confirming that the Pokemon have been loaded into your save. 6. Close all prompts and close the database window. Once you are back in PKHeX, you should see your results that you exported in your PC boxes like normal.   7. For more advance search criteria, open the Pokemon database and navigate to "Tools/Search Settings" and click on the "Advanced Search" Option. You will see a text box appear next to the simple search criteria. After you have enabled the "Advanced Search" box, you can input whatever search criteria you want. Note: the search criteria format is the same as the "Batch Editor". You can find an in-depth tutorial on the Batch Editor Here. Once you are satisfied with your search criteria, you can click "search" the same way as with the simple criteria.
    9. 9

      How to Use the Batch Editor in PKHeX

      In this tutorial you will learn how to properly use the Batch Editor in PKHeX. The batch editor, when utilized fully and correctly, can be an extremely useful tool for fixing, and editing Pokemon. Please Note: The Batch Editor does NOT have an undo option and therefore all actions taken with the Batch Editor are FINAL unless you quit PKHeX without saving. As a result. MAKE SURE YOU HAVE BACKUPS OF YOUR SAVE BEFORE YOU EDIT IT WITH THE BATCH EDITOR.   Section 1: Basic Fundamentals and operation of the Batch Editor   The Batch editor works on the simple premise that all possible characteristics pertaining to a Pokemon, boil down to a set of numbers which correspond to certain values in the Pokemon games themselves. Because of this, changing, and editing Pokemon using the Batch Editor is like a mathematical statement, with if then, and true/false statements. The basic operators of the Batch Editor are: "." = Sets the desired value Equal to the value you input "=" = Narrows the editing of Pokemon down to the Pokemon which have the same value as your input value "!" = Narrows the editing of Pokemon down to the Pokemon which do not have the same value as your input value. As an example of how these operators are used, Once you select a variable you would like to change (OT Name, Pokemon Species, Pokemon Level, etc...) and the correct operator, click "Add". This will add your desired variable with your desired operator in the correct format. The next step is to create the formula in which the Batch Editor will run.  As an example of a possible combination for use in the Batch Editor, the following formula will change the OT trainer name on Pokemon with a specific OT to a specified OT trainer name, as well as give every Pokemon with that filter, a Master Ball to hold. =OT_Name=PKHeX     This line instructs the Batch Editor to narrow it's scope down to every Pokemon with the OT Trainer Name "PKHeX".OT_Name=TEST         This lines instructs the Batch Editor to set the OT Trainer Name for all of the previously filtered Pokemon to "TEST" .HeldItem=1                  This line instructs the Batch Editor to set the Held Item for all of the previously filtered Pokemon to a Master Ball.   Some Special Tricks to use in the Batch Editor, Courtesy of @Kaphotics (Creator of PKHeX) 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).   Section 2: ID Numbers for Use with the Batch Editor   This section will focus on the input values you can use in conjunction with the Batch Editor. The Batch Editor uses the in-game index values to set the desired properties to Pokemon. Because of this you will need to use said index numbers instead of relying on the standard text based input present in PKHeX. As an example, to set the species of a Pokemon using the Batch Editor, you must use the equation .Species=150 Not .Species=Mewtwo Below are many of the common variables you may want to use, along with the possible values to use with those variables. Please Note: Some variables (like location, items etc...) have different ID numbers for different generations. Please ensure that you are using the correct ID numbers that correspond to the generation of the game you are editing.   Ability:   AbilityNumber:   AltForm:   Ball:   Box:   ConsoleRegion:   Country:   CurrentFriendship:   CurrentLevel:   Egg_Location:   EggMetDate:   EV_ATK,DEF, HP, SPA, SPD, SPE:   FatefulEncounter:   Gender:   HeldItem:   HPType:   IsEgg:   IsNicknamed:   IV_ATK,DEF, HP, SPA, SPD, SPE:   Language:   Legal:   MarkCircle, Diamond, Heart, Square, Star, Triangle:   Met_Level:   Met_Location:   MetDate:   Move1, 2, 3, 4:   Move1_PPUps, 2, 3, 4:   Nature:   Nickname:   OT_Gender:   OT_Name:   PID:   RelearnMoves1, 2, 3, 4:   ShinyLeaf (Gen 4 HG/SS Only)   SID:   Slot:   Species:   Stat_ATK,DEF, HP, SPA, SPD, SPE:   TID:   Version:   Special Thanks to @theSLAYER for help with making and researching this guide with me
    10. 10

      How to Use PKHaX Mode with PKHeX

      This tutorial will show to to activate PKHaX mode on PKHeX. This mode will allow you to give Pokemon illegal abilities, stats, and much more. Please Note: "Project Pokémon does not support or condone cheating at the expense of others. While this community contains research, information, and utilities allowing people to create their own Pokémon, we do not agree with using them against players who are unaware that significantly hacked" Please visit the following page for more information about Project Pokemon's Cheating Policy:     PKHaX Mode can easily be activated by either making a batch file with the proper command or by downloading my pre-built batch file   1. If you would like to download my PKHaX bat files, which includes many different colors and a standard batch file, please download it here. Please Note: I made these exe files using Advanced BAT to EXE Converter to be able to put the PKHeX icon onto the bat files. Nothing else has been done to these exe files and there are no viruses (I made this from scratch). That being said, if you still do not want to use my exe, scroll down to see how to make your own batch file (without an icon) or you can use the bat file that I included in my bat file download above.   2. Then extract PKHaX.exe and place it in the same folder that you have PKHeX in. 3. Then open PKHaX.exe and PKHeX with PKHaX mode should open correctly   Making your own batch file for PKHaX is fairly simple. In this tutorial, the resulting batch file will be identical to the file I provided above, but will not have an icon, and will be in a ".bat" format instead of a ".exe" format. 1. Navigate to a folder to make the batch file. Right click inside of the folder, then click on "new", then click on "Text Document" 2. Rename the new text file to whatever you like (I will rename mine "PKHaX"). 3. Open your new text file, then paste in this code start pkhex hax exit 0 4. Click on "File" then click on "Save As" 5. When the "Save As" window comes up, add ".bat" as shown in the picture below, to the end of your file name. Then click "Save" 6. Go back to the folder in which you just saved your new batch file. Make sure you are using the batch file and not the text file. 7. Move the batch file you just created into the same folder as PKHeX. Then open your PKHaX batch file and PKHeX with PKHaX mode should open correctly.
    11. 11

      Finding Event Flags and Event Constants

      Overview This tutorial is written for users who want to contribute to the research regarding event flags and event constants.   Pre-requisites 1. Ability to dump your save (save either dumped from cart, or snagged from emulator etc) 2. Ability to modify your save with PKHeX Instructions1. Load up the relevent save onto PKHeX2. Go to Event Flags and switch to the Research tab. 3. Load up a save directly before the event using Load Old, and a save directly after the event using Load New.For example, I loaded a save directly before and after obtaining the starters. 4. You may get a prompt about Event constants. Yes and paste them into a new notepad file. (It is okay if the prompt says there's no event constants differences)   Congratulations, you now have a list of which Event Flags was set and unset (in PKHeX), and what Event Constants changed (pasted into Notepad)! With the example above, there is a considerable amount of change between 2 saves, because the example contained getting a starter, and defeating Bianca and Cheren. (The fights was unavoidable, so the next save spot had much forced activity in-between)  
    Sign in to follow this  
×