Main Menu





Search Wiki


Duplicate key items glitch
 Page | Discussion | View source | History

From Glitch City Laboratories

Jump to: navigation, search
Major glitches of the Pokémon series
"Core" glitch Variants and Consequences
Arbitrary code execution see template, remote, cart-swap, unintended ROM code execution
2x2 block encounter glitches Left-facing shore tile glitch (in-game trade shore encounter trick, old man trick, Trade link up shore encounter trick, Fight Safari Zone Pokémon trick)
99 item stack glitch ­
Bad clone glitch ????? party overloading (Type 0xD0 move glitch, ????? map corruption, Celebi trick, Celebi Egg trick, Shiny Celebi trick, glitch move map corruption, overloaded party map corruption, Glitch Unown (Glitch Unown map corruption) Duplicate key items glitch (infinite items and item creation, expanded Balls pocket (TM/HMs outside of the TM/HM pocket, Glitch Pokédex categories))
Berry glitch
Bug-Catching Contest data copy glitch (Japan only)
Ditto DV manipulation
Elite Four door glitch (Japan only)
Expanded party encounter table manipulation
Glitch City Safari Zone exit glitch, RAM manipulation
Glitch meta-map script activation (Generation I)
Infinite Master Balls (Colosseum)
Large storage box byte shift glitch storage box remaining HP glitch, maximum stat glitch
Item duplication glitch
Item stack duplication glitch Generation I expanded items pack (Glitch Rocket HQ maps, Map FE (English and non-English European Yellow), Map script pointer manipulation (arbitrary code execution, map script pointer item ball manipulation), Text pointer manipulation (arbitrary code execution, item ball manipulation, mart buffer overflow), Trainerless instant encounter glitch
Transform held item glitch (Japan only)
Mimic glitch (Japan only)
Out of bounds Glitch City (Generation II) Slowpoke Well out of bounds corruption (French version)
Lumiose City save glitch
Pikachu off-screen glitch Trainer corruption glitch
Pokémon merge glitch
Pomeg glitch Pomeg data corruption glitch
Roaming Pokémon encounter glitch
(Mimic) Transform Rage glitch
Select glitches (Japan only) Closed menu: Dokokashira door glitch (international), Fossil conversion glitch (international), Second type glitch, Skip to Level 100 glitch, Trainer mutation glitch, walk through walls (international) Special menu: Lift glitch, Badge describer glitch)
Sketch glitch
SRAM glitch (Generation I) 255 Pokémon glitch, send party Pokémon to a new game
SRAM glitches (Generation II) Mailbox glitches, Mystery Gift item corruption, Trainer House glitches
Surf down glitch Grass/rock Surfing glitch (Spanish/Italian only) (adaptions: Submerge glitch (international), 8 8 (0x7C) grass/rock surfing glitch (English Red/Blue))
Time Capsule exploit
Trainer escape glitch Death-warp, Mew Trick, Ditto Trick, Experience underflow glitch
Buffer overflow techniques Japanese unterminated name glitch item instant encounter glitch, LOL glitch, Rival LOL glitch, Instant LOL glitch, RAM LOL glitch, oobLG, blockoobLG, Instant encounter infinite chain glitch (LGFly)), Super Glitch (Generation I) (party remaining HP glitch), Super Glitch (Generation III), Text pointer manipulation mart buffer overflow glitch, CoolTrainer♀-type move, Double distort CoolTrainer♀ corruption, Yami Shop glitch
Walk through walls ledge method, museum guy method, Rival's effect, Select glitch method (international), Brock Through Walls
ZZAZZ glitch party Pokémon box data shift glitch

(view, talk, edit)
PRAMA Initiative a également une page sur Duplicate key items glitch.

This duplicate Key Items glitch is a glitch in Pokémon Gold, Silver and Crystal, in which the player swaps two identical key items (obtained via byte shifting from ????? party overloading) in the Key Items pocket to obtain items (such as infinite use Rare Candies) or allow the player to set up an expanded Balls pocket with more than the maximum amount of items.

The reason the player obtains arbitrary items in the Key Items seems to be related to the facts that both: item quantities in the Key Items do not exist, and the game tries to merge the two stacks into one stack with a combined quantity.

Using the expanded Balls pocket, the player is able to use TMs and HMs from the wrong pocket for their own glitchy effects and arbitrary code execution (e.g. via TM33 in English Crystal, TM15 in English Crystal and TM25 in English Gold and Silver).

These TMs run code from the enemy Trainer's fifth Pokémon's nickname character 3 (TM33) or somewhere in the expanded Balls pocket.

Furthermore, the player can also enable glitch Pokédex categories (such as glitch Pokédex mode 09 in English Crystal for arbitrary code execution in the expanded Balls pocket) as well.

Via arbitrary code execution

This trick requires being able to set up arbitrary code execution on Pokémon Red, Blue, and Yellow. You may use 8F or ws m in Generation I to change the catch rate of Pokémon to value(s) corresponding to key items. (see The Big HEX List to see which IDs correspond to which key items)

Via bad clone glitch and ????? party overloading

Using tricks from ????? party overloading, the player can manipulate a key item as a held item on a Pokémon. This can be done in practise by using move PkMn w/o mail to obtain a seventh Pokémon, placing a Pokémon in slot 1 with a specific move then performing 1-4 shifts (depending on the position of the move) to shift the move ID into an equivalent held item ID. (see The Big HEX List to see which IDs correspond to which moves and held items)

Infinite items examples

Example 1:

If we have the following items:

Lost Item

Lost Item

Card Key

Basement Key


Then swapping the first Lost Item with the second Lost Item will make us lose the original second Lost Item and Card Key but the second Lost Item will turn into a Master Ball with quantity 133 (Basement Key's index number). The Master Ball can be used infinitely because it is in the wrong pocket.

If we have the following items:

Lost Item (index no. 130)

Lost Item (index no. 130)

Card Key (index no. 127)

Basement Key (index no. 133)

Cancel (index no. 255)

If we swap the first Lost Item with the second, we lose the original second Lost Item and the Card Key, but the second Lost Item will turn into a Master Ball with quantity 133 (Basement Key's index number). The reason why the second item turns into a Master Ball in this example is because the Card Key is index number 127 (7F) and the Lost Item is index number 130 (82). Adding these together gives 257, but since items are defined by one byte, this becomes 257 modulo 256 or 1, which is Master Ball's index number.

Therefore we get:

Lost Item (index no. 130)

Master Ball (index no. 257 == 1) x133

CANCEL (index no. 255)

Example 2:

If the sum of the first Key Item's index number and the item below the second Key Item is greater than 100, then the third item is not lost, but becomes a BLK Apricorn (index no. 99). The second item identifier becomes equal to that of the sum of the first Key Item index number and the original third item minus 99. Its quantity is derived from the new third item identifier.

For example, consider the following Key Items pack:

Lost Item (index no. 130)

Lost Item (index no. 130)

Master Ball (index no. 1) x7

Bicycle (index no. 7) Cancel

If we swap the first Key Item with the second this gives us:

Lost Item (index no. 130)

Rare Candy (index no. 32 [130+1-99] )

BLK Apricorn (index no. 99)

Bicycle (index no.7)

CANCEL (index no. 255)

Expanded items pack

If you want to set up the expanded Balls pocket, change the catch rate of two Pokémon to 128 and 67 each. When traded to a Generation II game they will be holding Machine Parts and Secretpotions.

  1. On the game with two SecretPotions and two Machine Parts
  2. Put both Machine Parts in the last two slots of the Key Items pocket
  3. Swap both items, which will turn into a single slot
  4. Remove the Cancel item
  5. Put both SecretPotions in the last two slots of the Key Items pocket
  6. Swap these, and all bytes up to the Cancel in the Balls pocket will be shifted upwards

Expanded Balls pocket

Using specific duplicate key items, it is possible to enable the expanded balls pocket, which can later be used for memory corruption by swapping items in the pocket or arbitrary code execution via TMs/HMs outside of the correct pocket or glitch Pokédex categories.

First the key items pocket must be filled with 25 items including two Machine Parts and two Secretpotions:


  1. Put both Machine Parts in the last two slots of the Key Items pocket
  2. Swap both items to create Iron x99 and Blk Apricorn x10
  3. Put both SecretPotions in the last two slots of the Key Items pocket
  4. Swap these, and all bytes up to the Cancel in the Balls pocket will be shifted upwards, with the ID of the first item becoming the number of Balls.

Note that this is not the only way to access the expanded balls pocket. The Pokémon Speedruns wiki details a different method involving two Itemfinders.

YouTube video

YouTube video by ChickasaurusGL