From our friends

Trainer data structure in Generation II

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to: navigation, search
050Diglett.png This article is incomplete.
Please feel free to edit this article to add missing information and complete it.

129Magikarp.png This article does not yet meet the quality standards of Bulbapedia. Please feel free to edit this article to make it conform to Bulbapedia norms and conventions.

NPC Trainer data

Name Length
Name 2-8 bytes
Name string 1-7 bytes
Terminator 1 byte
Custom move marker 1 byte
Pokémon 2-6 bytes
Level 1 byte
Species 1 byte
Moveset 4 bytes
Terminator 1 byte

The in-game Trainer data is remarkably compressed.


This is a string going anywhere from 2 to 8 bytes, containing the Trainer's name and ending in a 0x50 terminator. The rival's name is represented by a single byte - 0xe6.

Custom move marker

This is one byte marking whether the Pokémon in the party have custom moves or not. If not, it is set to 0 - if so, it is set to 1.


Depending on whether the custom move marker was set or not, each Pokémon's data is either 2 or 6 bytes long. If the move marker was set to 0, the Pokémon's data simply contains the Pokémon's level and species, in that order. Otherwise, it contains the full moveset after the level and species - 1 byte per move.


This is a single byte (0xff) which tells the processor to stop reading data.

Red EN boxart.png This game-related article is a stub. You can help Bulbapedia by expanding it.

Data structure in the Pokémon games
Generation I Pokémon data structurePokémon base stats data structureSave data structure
Generation II Pokémon data structurePokémon base stats data structureTrainer data structureSave data structure
Generation III Pokémon data structurePokémon data substructuresPokémon base stats data structureMove data structure
Contest data structureContest move data structureItem data structurePokédex data structureBattle Frontier data structures
Trainer Tower data structuresPokémon evolution data structureType Chart data structureSave data structure
Generation IV Pokémon data structureSave data structure

Project Games logo.png This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.