Expanded item pack

From Glitch City Wiki
Revision as of 08:59, 26 February 2015 by >ISSOtm (→‎Item underflow glitch: Added credit for the old method, and added the "dry" new one (https://www.youtube.com/watch?v=ZyppANEvnh8))

The expanded items pack is a glitch in the first generation of Pokémon.
It can be activated by many glitches, the most used method being the Item underflow duplication glitch and allows the player to edit arbitrary RAM locations.


Activation

Item underflow glitch

This method was discovered by MrWint. To activate this glitch, the player needs, in their first two item slots  :
(Any cheap item)x any qty
(Any item)x 255

Moreover, the player must have an item removable by an event (a drink for the Saffron guards, a fossil, etc.) NOTE : it is not recommended to have other items than these in your bag.

The player should open their item inventory, and toss their first item until the Item menu stops "responding".
Then the player should remove an item from their inventory with an event. Then, opening the Item pack allows the player to edit arbitrary RAM portions as if they were items.

Explanation

When the first item stack is tossed, the game decreases the owned item counter (located at hex:D31C) by 1. It then makes the item x255 erase the item tossed. But because dec:255 equals hex:FF and the game considers FF as the ending marker, the 255 items aren't overwritten, nor the following ones.
The process repeats until the item counter reaches 0, which makes the first item act as the Cancel button. Then giving out an item makes the game decrease the item counter once more, which underflows to hex:FF. The player can then access 255 items, which is far beyond the normal limit.

"Dry" item underflow glitch

According to ChickasaurusGL's Youtube video, this has been found by Luckytyphlosion.

It is a better method because it doesn't require the Saffron guards to be thirsty, neither a Fossil.
Also, it can be done with the PC items, allowing to edit more RAM addresses that were only accessed through ACE or map FE

You will need 2 different tossable items, and a stack of 255 items. Steps to reproduce :

  1. Order your items so that your 2 tossable items are in slots 1 and 2 and the item x255 is in slot 3.
  2. Toss everything below the item x255.
  3. Toss the top two items so you have three items x255 (item count=1)
  4. Toss 253 of the first item x255.
  5. Swap item 1 with item 2.
  6. Swap item 1 with item 2, again.

You can also do this with items below the third (and initial) 255 stack. You need to count how many items you have, then after step 3 toss the top item x255 the number of items you initially had -2.


By Save corruption

This method has many downsides (similar to the Japanese Dokokashira door glitch) but can be triggered very early in the game and is sometimes used to beat the game in 0:00

The first requirement is that the player must never have created a Save file.
If one was created, go to the title screen, do not enter the Continue/New Game/Options menu. Hold the down arrow and Select in the same time, and press the B button.
WARNING ! This will completely destroy and overwrite your current save file !
Select "Yes" and skip the title screen.
The Continue option shouldn't be present. Hit New Game, and pick names ASH and BLUE. Then open the start menu, hit Save and get prepared (if on an emulator, a save state is recommended to save much time). You need to hit Yes and reset your game between the time the Yes/No box disappears and the instant the Saving... text appears.
At this point, there are three possibilities :

  1. A text box pops saying "The save file is destroyed !". You reset too early, try again.
  2. A Continue button is present, but your Pokemon menu isn't accessible. You reset too late, erase the save file and try again.
  3. A Continue button appears on the homescreen, and you can access a glitchy Pokémon menu. Swap any of the first 6 Pokémon (first or second is recommended) with the tenth (it should be just offscreen). Now you can access 255 items in your pack !


By ACE

If you can use arbitrary code execution, you may run the following code (both with 8F and ws m)
Lemonade x255
TM34 x211
hex:1C (Earth Badge) x201
This basically changes the item counter to hex:FF


Using Gameshark

The code 01FF1CD3 should set the expanded item pack correctly ; although with Gameshark, you don't much need this trick because you can edit RAM without this trick.


Using this trick

Notice : when scrolling down the list, the cursor may seem to freeze ; in that case hit A until the cursor responds again. This happens when the game prints a large name which spans multiple lines.

Like said earlier, it can be used to speedrun the game, as changing the 36th item allows to change warp locations.
Here is a list of interesting items to mess with : <help is needed there>


Returning the Item pack to normal

This is very simple : you need to buy three items to return your menu to normal.
Warning : the first item will be lost !

With ACE, the following code should work :
Lemonade x(# of items in your inventory before the glitch)
TM34 x211
hex:1C (Earth Badge) x201