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
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.
EV_ATK,DEF, HP, SPA, SPD, SPE:
IV_ATK,DEF, HP, SPA, SPD, SPE:
MarkCircle, Diamond, Heart, Square, Star, Triangle:
Move1, 2, 3, 4:
Move1_PPUps, 2, 3, 4:
RelearnMoves1, 2, 3, 4:
ShinyLeaf (Gen 4 HG/SS Only)
SID or TrainerSID7:
Stat_ATK,DEF, HP, SPA, SPD, SPE:
JUST IN CASE ANY OF THE VALUES ABOVE ARE NOT UPDATED:
You can use Batch Editor to also view the particular values you want.
Special Thanks to @theSLAYER for help with making and researching this guide with me