Jump to content

Recommended Posts

Posted

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.

image.png

 

=OriginalTrainerName=PKHeX This line instructs the Batch Editor to narrow it's scope down to every Pokemon with the OT Trainer Name "PKHeX"
.OriginalTrainerName=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 - which Item Index number is 1.
   

Some Special Tricks to use in the Batch Editor, Courtesy of @Kaphotics (Creator of PKHeX)

  1. The Batch Editor window references the PKM that is currently viewed in the editing tabs.
    1. If you select a property name, the Batch Editor will indicate whether or not the tabs PKM has that property.
    2. 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).
  2. To Randomize a PID, use ".PID=$rand".
  3. To Randomize EncryptionConstant, use ".EncryptionConstant=$rand"
  4. To Randomize a value within a range, use ".Nature=$x,y" for an inclusive range of [x,y].
  5. To make a Pokémon Shiny: use ".PID=$shiny".
  6. To copy the Encryption Constant to the PID, use ".EncryptionConstant=PID"
  7. To delete a Pokémon, use ".Species=0"
  8. To set a date (Met / EggMet), use yyyyMMdd for the string.
    1. Example: ".MetDate=20160409" will set the Met Date to April 9th, 2016.
  9. Suggestions can be automatically applied for Moves, RelearnMoves, and Met_Location.
    1. 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.
  10. Legality can be used as a filter. Use "=Legal=false" to only modify illegal Pokémon.
  11. A full up to date list is available by reading the Pokémon properties from the PKHeX source code

 

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:

  Reveal hidden contents

 

AbilityNumber:

  Reveal hidden contents

 

Form:

  Reveal hidden contents

 

Ball:

  Reveal hidden contents

 

Box:

  Reveal hidden contents

 

CanGigantamax

  Reveal hidden contents

 

ConsoleRegion:

  Reveal hidden contents

 

Country:

  Reveal hidden contents

 

CurrentFriendship:

  Reveal hidden contents

 

CurrentLevel:

  Reveal hidden contents

 

DynamaxLevel:

  Reveal hidden contents

 

TeraTypeOriginal and TeraTypeOverride:

  Reveal hidden contents

 

EggLocation:

  Reveal hidden contents

 

EggMetDate:

  Reveal hidden contents

 

EV_ATK, EV_DEF, EV_HP, EV_SPA, EV_SPD, EV_SPE:

  Reveal hidden contents

 

FatefulEncounter:

  Reveal hidden contents

 

Gender:

  Reveal hidden contents

 

HeldItem:

  Reveal hidden contents

 

HPType:

  Reveal hidden contents

 

IsEgg:

  Reveal hidden contents

 

IsNicknamed:

  Reveal hidden contents

 

IV_ATK, IV_DEF, IV_HP, IV_SPA, IV_SPD, IV_SPE:

  Reveal hidden contents

 

Language:

  Reveal hidden contents

 

Legal:

  Reveal hidden contents

 

MarkCircle, MarkDiamond, MarkHeart, MarkSquare, MarkStar, MarkTriangle:

  Reveal hidden contents

 

MetLevel:

  Reveal hidden contents

 

MetLocation:

  Reveal hidden contents

 

MetDate:

  Reveal hidden contents

 

Move1, Move2, Move3, Move4:

  Reveal hidden contents

 

Move1_PPUps, Move2_PPUps, Move3_PPUps, Move4_PPUps:

  Reveal hidden contents

 

Nature:

  Reveal hidden contents

 

Nickname:

  Reveal hidden contents

 

OriginalTrainerGender:

  Reveal hidden contents

 

OriginalTrainerName:

  Reveal hidden contents

 

PID:

  Reveal hidden contents

 

RelearnMove1, RelearnMove2, RelearnMove3, RelearnMove4:

  Reveal hidden contents

 

Ribbons

  Reveal hidden contents

 

ShinyLeaf (Gen 4 HG/SS Only)

  Reveal hidden contents

 

SID16 or TrainerSID7:

  Reveal hidden contents

 

TID16 or TrainerTID7:

  Reveal hidden contents

 

Slot:

  Reveal hidden contents

 

Species:

  Reveal hidden contents

 

Stat_ATK, Stat_DEF, Stat_HP, Stat_SPA, Stat_SPD, Stat_SPE:

  Reveal hidden contents

 

Version:

  Reveal hidden contents

 

JUST IN CASE ANY OF THE VALUES ABOVE ARE NOT UPDATED:
You can use Batch Editor to also view the particular values you want.
  Reveal hidden contents

Special Thanks to @theSLAYER for help with making and researching this guide with me

View full tutorial

  • Like 5
  • Thanks 2
  • V-Wheeeeeel!!! 1
  • Hahaha 1
Posted

Another example, for people who mostly got the explanation above:
=Legal=false
.Species=0

Explanation (with the bold portions referring back to the code):
First line: Requires (=) Legality (Legal) of Pokemon to be Illegal (=false)
Second line: Sets (.) Species (Species) to be nothing (=0)     [No species also means deleted]

So what this code does, is delete Illegal Pokemon :3

  • Thanks 1
  • Relieved 1
  • 2 weeks later...
Posted (edited)

Thanks so much for the guidance on using the batch editor. This is for the game Ultra Sun / Ultra Moon

However, I've encountered a peculiar issue. Let's say I want my SID = 1024 | TID = 224422, so I input in the following:
.SID=1024
.TID=224422

But however, I get a value that is absolutely far apart. Can anyone advise me on this?

Edited by zbr
Posted
  On 6/8/2018 at 3:16 PM, zbr said:

Thanks so much for the guidance on using the batch editor. This is for the game Ultra Sun / Ultra Moon

However, I've encountered a peculiar issue. Let's say I want my SID = 1024 | TID = 224422, so I input in the following:
.SID=1024
.TID=224422

But however, I get a value that is absolutely far apart. Can anyone advise me on this?

Expand  

TID and SID are internally as 16 bit numbers. You can modify the pkm in the main editor tabs to have the new tid/sid you want, then in the batch editor it will tell you the current value (stored format).

Posted
  On 6/8/2018 at 7:39 PM, Kaphotics said:

TID and SID are internally as 16 bit numbers. You can modify the pkm in the main editor tabs to have the new tid/sid you want, then in the batch editor it will tell you the current value (stored format).

Expand  

I'm sorry but I'm having trouble understanding the latter part of your advice. How will I use the editor to check the current value?

Posted
  On 6/9/2018 at 1:34 PM, zbr said:

I'm sorry but I'm having trouble understanding the latter part of your advice. How will I use the editor to check the current value?

Expand  

It's the label shown underneath the 'criteria/action' dropdown.

Untitled-1.png

(in the example above, right underneath the "Set Equal To" is '0', which, indicates that the current value of _0x73 is 0 for the pkm currently loaded to tabs.

If nothing shows up, then the pkm in tabs doesn't have that property. The "Byte" indicates the value type of the property (integer, byte, etc).

  • Like 1
Posted
  On 6/9/2018 at 3:43 PM, Kaphotics said:

It's the label shown underneath the 'criteria/action' dropdown.

Untitled-1.png

(in the example above, right underneath the "Set Equal To" is '0', which, indicates that the current value of _0x73 is 0 for the pkm currently loaded to tabs.

If nothing shows up, then the pkm in tabs doesn't have that property. The "Byte" indicates the value type of the property (integer, byte, etc).

Expand  

Thank you so much! I understand what's going on now [:

  • 2 months later...
Posted (edited)

What do i do do make all the Pokemon in my batch editor NOT shiny.

EDIT: Also another question, how do i delete the whole Latest(Not OT) Part so its blank, meaning its all my pokemon

Edited by Z_Slay3r
  • 1 month later...
Posted
  On 8/23/2018 at 3:30 PM, Z_Slay3r said:

What do i do do make all the Pokemon in my batch editor NOT shiny.

EDIT: Also another question, how do i delete the whole Latest(Not OT) Part so its blank, meaning its all my pokemon

Expand  

.PID=$rand will work on gen 5 Pokemon and up.
HT_Name is tied to the Latest(Not OT), but I'm not sure how you would delete the value.

Does anyone know if this sort of batch edit is supported? 
.CurrentLevel=Met_Level
If so am I doing something wrong?
 

  • 4 months later...
Posted (edited)

I tried my luck at a lot of things but I couldn't find how to change the Latest Handler :( help!

Same goes for TID and SID

Edited by CyrilEpic
  • 3 months later...
Posted (edited)

I want to change Pokemon so that it doesn't shine, but it doesn't change because of an error. I want to know how to solve this problem.

For your information, I am not good at English, so I am using a translator. So what I'm trying to say may not be communicated.

20190602_145028.png

Edited by 허현범
Posted
  On 6/2/2019 at 6:17 AM, 허현범 said:

I want to change Pokemon so that it doesn't shine, but it doesn't change because of an error. I want to know how to solve this problem.

For your information, I am not good at English, so I am using a translator. So what I'm trying to say may not be communicated.

20190602_145028.png

Expand  

I don't think that is how that works. You should use:

  Quote

=IsShiny=True
.PID=$rand

Expand  

Note: Any PID generated for Pokémon caught in Gen 3 & Gen 4 games will likely become illegal.

Posted
  On 6/2/2019 at 6:41 AM, theSLAYER said:

그게 어떻게 작동하는지 생각하지 않습니다. 다음을 사용해야합니다.

참고 : Gen 3 및 Gen 4 게임에서 포획 된 Pokémon 용 PID는 불법이 될 수 있습니다.

Expand  

I see! I was stupid. I almost fixed 800 each. Thank you very much.

But how do you change the glow so that it doesn't shine?

Posted
  On 6/2/2019 at 6:52 AM, 허현범 said:

I see! I was stupid. I almost fixed 800 each. Thank you very much.

But how do you change the glow so that it doesn't shine?

Expand  

Shininess on Pokémon is determined by the Personality ID (PID). The "IsShiny" you used is simply a flag used by PKHeX to identify if a mon is shiny. You can't set it to IsShiny=False as the game doesn't actually have that perimeter, so that can't be batch edited.

When a certain PID is paired with certain Trainer ID and Secret ID, a Pokémon can be shiny. and in Generation 6 and 7 there's roughly 1/4096 chance that can occur (though there are ways to increase the chances). You can read more about Shiny Pokémon here.

So, the code I gave you ( .PID=$rand) simply randomizes the PID. As the chances of 1/4096 is rather low, you probably won't reroll the PID to a shiny one.
If you're concerned, you can simply run the same code I gave previously multiple times until 0/0 edited.

If you want to make a Pokémon shiny instead, it'll be .PID=$shiny

Posted

Can anyone help out using the Technical Record for the Pokemon using batch editor?

Trying to teach them moves, but then I will need to teach the technical records, but cannot find how to do so.

Thanks!

  • 4 weeks later...
Posted

Batch editor works but the thing is when i load it up to may NS (Sword) all the pokemon is "Fainted" when i check their summary all 0 stats? but in PKHex all 6iv/85EV spread.

Posted

Two questions:

1) is there any way to find all non-shiny Pokemon and edit their SID/TID but leave all the shiny ones alone?

2) How do I delete the "Latest Handler" via the batch editor? Is that doable?

Posted
  On 2/17/2020 at 9:46 AM, Offspring said:

Two questions:

1) is there any way to find all non-shiny Pokemon and edit their SID/TID but leave all the shiny ones alone?

2) How do I delete the "Latest Handler" via the batch editor? Is that doable?

Expand  

first, uncheck modify PKM in PKHeX settings.

Try
=IsShiny=False
.TrainerID7=6 digit TID
.TrainerSID7=4 digit SID
.HT_Name=

You may wanna include modifiers for mons in Cherish balls, Have Fateful Encounter flag or have Classic Ribbons. Those are to cover events, and are typically OT/TID/SID locked.

If so. add these above the shiny line:

=FatefulEncounter=False
=RibbonClassic=False
!Ball=16

These should cover most causes.
Make sure the last item isn't a line break.
image.png
(example above where the typing cursor can go down, is invalid. Make sure to backspace.)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...