Using the Batch Editor
Caution:
When using the Batch Editor, 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. The script in the image above is an example of how to redefine the trainer and friendship details of the Pokémon, effectively 'stealing' it from another trainer.
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.
Other filters exist, similar to = and ! -- refer to the GUI command builder.
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.
An advanced modification script is demonstrated in the following image:
=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).
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.