The Pokémon: Symphonic Evolutions concert tour is coming to Philadelphia on September 19th. Seats are limited, so be sure to book your tickets quick!
Pokémon Omega Ruby and Alpha Sapphire are coming this November! Check BNN and Bulbanews for up-to-date Pokémon news and discuss it on the forums or in our IRC channel.

Move data structure in Generation III

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to: navigation, search
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.

Format

Every move in Ruby, Sapphire, FireRed, LeafGreen, and Emerald has a 12-byte data structure.

Move Data
Effect byte
Base Power byte
Type byte
Accuracy byte
PP byte
Effect accuracy byte
Affects whom byte
Priority byte
Flags byte
Padding 3 bytes

Notes:

  1. All numbers are to be treated as unsigned unless otherwise specified.
  2. Numbers prefixed with "0x", "$" or suffixed with "h" are hexadecimal.
  3. Numbers prefixed with "0" are octal.
  4. Numbers with no specific prefix or suffix are decimal.
  • Accuracy determines the move's accuracy. Divide this value by 100 to get the actual accuracy. In Generation I, this value was 0-255 and divided by 256, which explains why sometimes attacks like Swift missed. This no longer happens in Generation III. This value is also set to 0 to reach 100% accuracy.
  • Effect accuracy determines probability that the effect associated with a given move will happen. Divide this value by 100 to get the actual effect's accuracy. So that, for instance, a value of 100 gives the player 100% chances for the effect to trigger. For yet-unknown reasons, some moves have this value set to 0 which results in 100% accuracy as well.
  • Affects whom determines who the move will hit on a 2 on 2 battle. It can be selected target, user, both foes, random foe, both foes and partner, field, opponent field (Spikes) and last opponent who moved. The following table indicates which value matches a certain target type.
0x00 Selected target
0x01 Depends on the attack
0x02 Unused
0x04 Random target
0x08 Both foes
0x10 User
0x20 Both foes and partner
0x40 Opponent field

Please note that it is theoretically possible to combine those values. For example, the player could have a move with this value set to 0x18. This would mean it would affect everyone except the partner. But, no move seems to use such a combination in the games. Also, the special case 0x01 has a different target depending on the move. Counter targets the last attacker, while Metronome could target anything.

  • Priority determines the moves speed. For example, ExtremeSpeed is faster than most other moves. This byte is signed, i.e. this value can be either positive or negative. If it is strictly less than 0x80 (128) then the player got the actual value. If not, the actual value equals: -1 * (256 - Current Value). Thus, value 0xFE (254) must be treated as -2 instead.
  • Flags determine additional properties of the move:

--fedcba

    • a - This moves makes contact with the target.
    • b - This move is affected by Protect.
    • c - This move is affected by Magic Coat.
    • d - This move is affected by Snatch. Note that this is mutually-exclusive with flag c.
    • e - This move may be used with Mirror Move
    • f - This move is affected by the effects of King's Rock. The flinch effect is considered an additional effect for the purposes of Shield Dust, but not Serene Grace.
  • Padding consists of a sequence of 3 bytes. Each one of those bytes should be set to 0x00.

Fingerprint

00 00 00 00 00 00 00 00 00 00 00 00  // - (used for unknown moves)
00 28 00 64 23 00 00 00 33 00 00 00  // POUND
2B 32 01 64 19 00 00 00 33 00 00 00  // KARATE CHOP
1D 0F 00 55 0A 00 00 00 33 00 00 00  // DOUBLESLAP
1D 12 00 55 0F 00 00 00 33 00 00 00  // COMET PUNCH
00 50 00 55 14 00 00 00 33 00 00 00  // MEGA PUNCH
22 28 00 64 14 64 00 00 32 00 00 00  // PAY DAY
04 4B 0A 64 0F 0A 00 00 13 00 00 00  // FIRE PUNCH
05 4B 0F 64 0F 0A 00 00 13 00 00 00  // ICE PUNCH
06 4B 0D 64 0F 0A 00 00 13 00 00 00  // THUNDERPUNCH
...


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.