PK6 and PK7 Classes
PK6 and PK7 represent the Nintendo 3DS era formats, introducing memories, affection, and significantly expanded data structures.PK6 Class
Namespace:PKHeX.Core
File: PKHeX.Core/PKM/PK6.cs
Format Specifications
| Property | Value |
|---|---|
| SIZE_STORED | 232 bytes (0xE8) |
| SIZE_PARTY | 260 bytes (0x104) |
| Generation | 6 |
| Context | EntityContext.Gen6 |
| Games | X, Y, Omega Ruby, Alpha Sapphire |
Key Features
Encryption Constant
Replaces the PID for encryption purposes:- Used for block shuffling
- Independent from PID
- 32-bit random value
Trainer Memories
PK6 introduced the memory system:Affection System
Geo Location Tracking
Super Training
Data Structure
Block A (0x08-0x3F)
- Encryption Constant
- Sanity, Checksum
- Species, Held Item, ID32, EXP
- Ability, Ability Number
- Training Bag data
- PID, Nature
- Fateful, Gender, Form
- EVs (6 bytes)
- Contest stats (6 bytes)
- Markings, Pokérus
- Super Training flags (4 bytes)
- Ribbons (6 bytes)
- Ribbon counts
- Distribution flags
- Form Argument
Block B (0x40-0x77)
- Nickname (26 bytes, UTF-16)
- Moves 1-4 (2 bytes each)
- PP (4 bytes)
- PP Ups (4 bytes)
- Relearn Moves 1-4 (2 bytes each)
- Secret Super Training flags
- IVs (30 bits) + IsEgg + IsNicknamed
Block C (0x78-0xAF)
- Handler Name (26 bytes, UTF-16)
- Handler Gender, Current Handler
- Geo location data (5 locations)
- Handler Friendship, Affection
- Handler Memory data
- Fullness, Enjoyment
Block D (0xB0-0xE7)
- OT Name (26 bytes, UTF-16)
- OT Friendship, Affection
- OT Memory data
- Egg and Met dates
- Egg and Met locations
- Ball, Met Level, OT Gender
- Ground Tile, Version
- Country, Region, Console Region
- Language
Form Arguments
Region System
PK7 Class
Namespace:PKHeX.Core
File: PKHeX.Core/PKM/PK7.cs
Format Specifications
| Property | Value |
|---|---|
| SIZE_STORED | 232 bytes (0xE8) |
| SIZE_PARTY | 260 bytes (0x104) |
| Generation | 7 |
| Context | EntityContext.Gen7 |
| Games | Sun, Moon, Ultra Sun, Ultra Moon |
Key Features
Hyper Training
Gen 7 introduced Hyper Training:Enhanced Markings
Expanded from 6 to 6 with colors:- None (0)
- Blue (1)
- Pink (2)
Resort Event Status
Differences from PK6
Removed Features
- Super Training (replaced by Hyper Training)
- Training Bags
- Distribution Super Training
Added Features
- Hyper Training flags
- Colored markings (2 bits per marking)
- Resort event status
- Additional ribbons for Gen 7
Modified Storage
Notable Properties
Pokérus Status
Version-Specific Forms
PK7 handles many form changes:- Alolan forms
- Totem Pokémon
- Partner Cap Pikachu forms
- Rockruff Own Tempo evolution
Z-Crystal Handling
Comparison Table
| Feature | PK6 | PK7 |
|---|---|---|
| Encryption | Block shuffle | Block shuffle |
| Encryption Constant | Yes | Yes |
| Super Training | Yes | No |
| Hyper Training | No | Yes |
| Markings | 6 (binary) | 6 (4 colors) |
| Memories | Yes | Yes |
| Affection | Yes | Yes |
| Form Arguments | Basic | Enhanced |
| Geo Locations | Yes | Yes |
| Resort Events | No | Yes |