Skip to content

Hex Editor

SpiredMoth edited this page Jun 10, 2020 · 8 revisions

The Hex Editor is an incredibly powerful, and potentially intimidating, tool PKSM provides you for editing your Pokémon. When you first open it, you'll be greeted by a screen that looks completely different from the other Editor screens you've seen so far.

The top screen shows the Pokémon you're editing in raw hex. The byte that is current selected has a box around it, and it's purpose is briefly described at the bottom of the screen. If a byte is grayed out/disabled, you will need to unlock it before you can change it.

The bottom screen shows the index of the currently selected byte, it's value, and sometimes a translation of the value into a more understandable version (like the Species bytes). For bytes that are unlocked, there are also editing controls in the form of plus and minus buttons above and below the value of the byte and/or labeled boxes for toggling flags kept in that byte.

There is a learning curve to using the hex editor. You will need to be able to convert values between decimal and hexadecimal (you can easily find a tool to help with this online). For those fields that don't show as a number in-game, you will also need to find some kind of reference for what values mean.

The controls are pretty simple: navigation is done with the d-pad or circle pad and edits can be made with A (increase byte's value), X (decrease byte's value), or the touch screen.

Hex Editor Exclusives

While PKSM's normal editor screens allow you to change many things about your Pokémon, there are some things that don't appear on them. In order to edit those you will need to go into the hex editor and find the appropriate byte(s). The table below lists all of the exclusive fields for each of the supported formats that you can edit. Lock Lv. represents how many times the hex editor needs to be unlocked in order to edit the field's value.

Value Lock Lv. Gen 4 Gen 5 Gen 6 Gen 7 LGPE
PID 0 0x00-0x03 0x00-0x03 0x18-0x1B 0x18-0x1B 0x18-0x1B
Checksum 2 0x06-0x07 0x06-0x07 0x06-0x07 0x06-0x07 0x06-0x07
Original Trainer ID 0 0x0C-0x0D 0x0C-0x0D 0x0C-0x0D 0x0C-0x0D 0x0C-0x0D
Original Trainer SID 0 0x0E-0x0F 0x0E-0x0F 0x0E-0x0F 0x0E-0x0F 0x0E-0x0F
Experience 0 0x10-0x13 0x10-0x13 0x10-0x13 0x10-0x13 0x10-0x13
Ability 0 0x15 0x15 0x14 0x14 0x14
markings 0 0x16 0x16 0x2A 0x16-0x17 0x16-0x17
Language 0 0x17 0x17 0xE3 0xE3 0xE3
Contest stats 0 0x1E-0x23 0x1E-0x23 0x24-0x29 0x24-0x29
Ribbons 0 0x24-0x27
0x3C-0x3F
0x60-0x63
0x24-0x27
0x3C-0x3F
0x60-0x63
0x30-0x36
0x38-0x39
0x30-0x36
0x38-0x39
0x30-0x36
move current PP 0 0x30-0x33 0x30-0x33 0x62-0x65 0x62-0x65 0x62-0x65
move PP Ups 0 0x34-0x37 0x34-0x37 0x66-0x69 0x66-0x69 0x66-0x69
"is egg" flag 0 0x3B 0x3B 0x77 0x77 0x77
Fateful encounter flag 0 0x40 0x40 0x1D 0x1D 0x1D
Shiny leaves (HGSS) 0 0x41
Egg location (Platinum) 0 0x44-0x45
Met location (Platinum) 0 0x46-0x47
OT gender 0 0x84 0x84 0xDD 0xDD 0xDD
Encounter type (G4) 0 0x85 0x85 0xDE
HGSS Poké Ball 0 0x86 0x86
Status Conditions 0 0x88 0x88 0xE8-0xEB 0xE8-0xEB 0xE8-0xEB
Level 0 0x8C 0x8C 0xEC 0xEC 0xEC
Capsule Index (seals) 1 0x8D 0x8D
Current HP 1 0x8E-0x8F 0x8E-0x8F 0xF0-0xF1 0xF0-0xF1 0xF0-0xF1
Max HP 1 0x90-0x91 0x90-0x91 0xF2-0xF3 0xF2-0xF3 0xF2-0xF3
Attack 1 0x92-0x93 0x92-0x93 0xF4-0xF5 0xF4-0xF5 0xF4-0xF5
Defense 1 0x94-0x95 0x94-0x95 0xF6-0xF7 0xF6-0xF7 0xF6-0xF7
Speed 1 0x96-0x97 0x96-0x97 0xF8-0xF9 0xF8-0xF9 0xF8-0xF9
Sp. Attack 1 0x98-0x99 0x98-0x99 0xFA-0xFB 0xFA-0xFB 0xFA-0xFB
Sp. Defense 1 0x9A-0x9B 0x9A-0x9B 0xFC-0xFD 0xFC-0xFD 0xFC-0xFD
Mail message + OT Name 1 0x9C-0xD3 0x9C-0xD3
Seal Coordinates 1 0xD4-0xEB
N's Pokémon 0 0x42
Encryption Key 2 0x00-0x03 0x00-0x03 0x00-0x03
Sanity Placeholder 2 0x04-0x05 0x04-0x05 0x04-0x05
Ability number 1 0x15 0x15 0x15
Training bag hits left 0 0x16-0x17
Super Training flags 0 0x2C-0x2F
0x3A, 0x72
0x2C-0x2F
0x3A, 0x72
Current Trainer Name 0 0x78-0x8F 0x78-0x8F 0x78-0x8F
CT gender 0 0x92 0x92 0x92
Current Handler 0 0x93 0x93 0x93
Geolocation 0 0x94-0x9D 0x94-0x9D 0x94-0x9D
CT Friendship 0 0xA2 0xA2 0xA2
CT Memories (G6+) 1 0xA4-0xA6
0xA8-0xA9
0xA4-0xA6
0xA8-0xA9
0xA4-0xA6
0xA8-0xA9
OT Friendship 0 0xCA 0xCA 0xCA
OT Memories (G6+) 1 0xCC-0xD0 0xCC-0xD0 0xCC-0xD0
country ID 0 0xE0 0xE0 0xE0
region ID 0 0xE1 0xE1 0xE1
3DS region ID 0 0xE2 0xE2 0xE2
Hyper Training 0 0xDE 0xDE
Dirt Type 1 0xED 0xED
Dirt Location 1 0xEE 0xEE
Awakened Stats 0 0x24-0x29
HEIGHT_ABSOLUTE 1 0x2C-0x2F
HEIGHT 0 0x3A
WEIGHT 0 0x3B
CP 1 0xFE-0xFF

You may have noticed that Generations 3 (RSEFRLG) and 8 (SWSH) are not mentioned in the table above. This is because those hex editors are still a work in progress. All their bytes are locked and labeled Report this to FlagBrew.

Advanced Hex Editor

You may see this called different names at times, such as:

  • God mode
  • Easter Egg mode
  • super hex editor

Bytes that are locked (greyed out) are like that for a reason: it is usually far more dangerous to edit them compared to unlocked bytes, especially if you don't know what values are legal for the particular byte.

It is possible to unlock them (see screenshots below), but you will not be told how to unlock them. If you really want to know how, we insist you figure it out yourself and direct you to read through PKSM's code.



Clone this wiki locally