What a PID is and why it matters in PKHeX

A PID (Product ID) is a unique number assigned to every Pokémon in the games. PKHeX is an editing tool that lets you modify Pokémon data, and when you change a Pokémon's stats or appearance, the PID needs to match those changes or the game will flag the Pokémon as illegitimate — meaning it won't trade, won't appear in competitive battles, and some features will refuse to work with it.

The PID controls several things at once: the Pokémon's nature, its gender, and its shininess. If you edit a Pokémon to be female but the PID is set for male, or if you make it shiny but the PID doesn't match a shiny pattern, the game detects the mismatch. Setting the PID correctly means all these pieces line up so the Pokémon looks legitimate to the game's internal checks.

PKHeX has a built-in tool to generate a legal PID automatically, but you need to know where it is and what to do after you've made your edits. This guide walks you through the process step by step.

Key Takeaways

  • A PID is a number that controls a Pokémon's nature, gender, and shininess, and it must match those traits or the game will flag the Pokémon as illegal.
  • PKHeX's "Generate" button creates a legal PID based on your current edits, but you must click it after making changes to stats, gender, or shininess.
  • The PID regenerates every time you change the Pokémon's species, so you may need to click Generate multiple times during editing.
  • A legal PID alone does not make a Pokémon legal — the moveset, level, and origin game must also match what that Pokémon could actually have.

Finding and using the Generate button in PKHeX

Open PKHeX and load or create a Pokémon. On the left side of the editor window, you will see a section labeled "PID" with a text field showing a long hexadecimal number. Next to that field is a button labeled "Generate" — this is what you click to create a legal PID.

The Generate button does not appear in the same place on every version of PKHeX, but it is always near the PID field itself. If you are using a recent version and the button is not visible, check that you are looking at the main Pokémon editor tab and not a different view. Some older versions of PKHeX had the button in a different location or required you to right-click the PID field.

Before you click Generate, make sure you have already set the Pokémon's species, nature, gender, and shininess to what you want. The Generate button reads those settings and creates a PID that matches them. If you click Generate first and then change the gender afterward, the PID will no longer be legal for that gender.

The correct order for editing a Pokémon

The safest way to avoid PID problems is to edit in this order: species first, then nature, then gender, then shininess, and finally click Generate. This order matters because changing the species can reset some fields, and you want all your choices locked in before you generate the PID.

Start by setting the species in the dropdown menu at the top of the editor. Once the species is set, move to the nature dropdown — this is usually in the same section as the PID field or just above it. After nature, set the gender using the radio buttons or dropdown (usually labeled "Gender"). Then check the "Shiny" checkbox if you want the Pokémon to be shiny.

Only after all four of those are set should you click the Generate button. PKHeX will calculate a PID that produces the nature, gender, and shininess you chose. The number in the PID field will change to a new value — this is normal and correct.

What happens if you change something after generating

If you change the species after clicking Generate, PKHeX will automatically regenerate the PID to match the new species. You will see the PID number change on its own. This is helpful because it keeps the PID legal, but it also means you should set the species before you worry about the PID at all.

If you change the gender, nature, or shininess after generating, the PID will become illegal for those new settings. You must click Generate again to fix it. A common mistake is to set everything, click Generate, then realize you wanted the Pokémon to be shiny and click the Shiny checkbox — now the PID is wrong for a shiny Pokémon, and you need to click Generate one more time.

The safest habit is to click Generate one final time after you have finished all your edits, just to be sure. It takes one second and prevents the mistake of forgetting that you changed something.

Understanding what a legal PID actually checks

A legal PID ensures that the nature, gender, and shininess are mathematically consistent — that is, the PID number actually produces those traits when the game reads it. However, a legal PID does not check whether the Pokémon could actually exist in the game.

For example, you can generate a legal PID for a level 5 Charizard, but Charizard cannot be caught or hatched at level 5 in any Pokémon game. The PID will be legal, but the Pokémon will still be flagged as impossible because of the level and species combination. A legal PID is necessary but not sufficient — you also need the moveset, ability, origin game, and level to match what is actually possible.

PKHeX has other tools to check for these broader legality issues. After you set the PID, look for a "Legality" button or check mark in the interface — this will scan the entire Pokémon for problems beyond just the PID. If it shows red or lists errors, there are other issues to fix.

Common mistakes that break the PID

The most common mistake is clicking Generate before you have finished editing. You set the species and nature, click Generate, then realize you forgot to set the gender. Now the PID is legal for the wrong gender. Always finish all your edits first, then click Generate once at the end.

Another mistake is confusing the PID field with other number fields nearby. PKHeX has fields for IVs, EVs, and other stats. The PID field is specifically labeled "PID" and is usually near the nature and gender settings. Do not edit the PID number by hand — always use the Generate button.

A third mistake is assuming a legal PID means the Pokémon is legal overall. It does not. A Pokémon with a legal PID can still be impossible because of its moveset, level, or origin. Use the legality checker after you set the PID to catch these other problems.

Regenerating the PID if something goes wrong

If you realize the PID is wrong — for example, you changed the gender and forgot to regenerate — simply click the Generate button again. There is no penalty for clicking it multiple times. Each click creates a new legal PID for the current settings.

If you want a different PID but the same nature, gender, and shininess, you can click Generate multiple times and it will produce different numbers that all work. This is useful if you want the Pokémon to look more "natural" by having a different PID than the one you just generated, though from the game's perspective they are all equally legal.

If the Generate button does not appear to be working — the PID number does not change when you click it — check that you are using a recent version of PKHeX. Very old versions had bugs with PID generation. Download the latest version from the official PKHeX repository and try again.

Frequently Asked Questions

Can I manually type in a PID number instead of using Generate?

You can type a number into the PID field, but it will almost certainly be illegal unless you know exactly what you are doing. The Generate button exists because calculating a legal PID by hand is extremely difficult. Always use Generate unless you have a specific PID from another source that you know is legal.

Does the PID affect what moves a Pokémon can learn?

No. The PID controls nature, gender, and shininess only. Moves are set separately in the moveset section of PKHeX. You can set the moves before or after generating the PID — the order does not matter for legality.

What if I want a specific nature but the gender keeps coming out wrong?

Set the gender first, then set the nature, then click Generate. The Generate button will create a PID that matches both. If you set the nature first and then change the gender, you will need to click Generate again because the PID is now wrong for the new gender.

Will a legal PID let me trade the Pokémon online?

A legal PID is necessary for trading, but it is not enough by itself. The Pokémon must also have a legal moveset, level, and origin game. Use PKHeX's legality checker to make sure everything is correct before you try to trade.

What does it mean if the PID field shows all zeros?

A PID of all zeros is not legal. This usually means PKHeX has not generated a PID yet, or something went wrong during generation. Click the Generate button to create a proper PID. If it still shows zeros after clicking Generate, try reloading the Pokémon or restarting PKHeX.