Jump to content

Expanded item pack: Difference between revisions

>ISSOtm
(→‎Item underflow glitch: Added credit for the old method, and added the "dry" new one (https://www.youtube.com/watch?v=ZyppANEvnh8))
 
(48 intermediate revisions by 5 users not shown)
Line 1:
{{Major glitches}}
The '''expanded items pack''' is a glitch in the first generation of Pokémon.
{{PRAMA|item-underflow-glitch}}
<br/>
An '''expanded item pack''' is a [[glitch derivative]] in {{RBY}} and {{GSC}}; in which the player can access items at a position from beyond the maximum limit imposed by the game.
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.
 
For example, in Red, Blue and Yellow the normal maximum number of bag items is 20 and the maximum number of stored PC items is 50 and under normal circumstances, trying to obtain another item will bring up a message that there is no more space.
 
In actuality, the maximum amount of items that the player can use, swap or toss is 255 or whichever value a 'number of items' address, such as D31D (Red/Blue, D31C (Yellow) (number of items in the overworld item pack) becomes corrupted to.
= Activation =
== Item underflow glitch ==
This method was discovered by MrWint.
To activate this glitch, the player needs, in their first two item slots :
<br/>
(Any cheap item)x any qty
<br/>
(Any item)x 255
 
==Attributes of items beyond the item limit==
Moreover, the player must have an item removable by an event (a drink for the Saffron guards, a fossil, etc.)
The items and quantities beyond the imposed item limit represent unrelated memory addresses with values interpreted as items or quantities. The memory addresses follow on as expected.
''NOTE'' : it is not recommended to have other items than these in your bag.
 
See the following articles for more specific information:
The player should open their item inventory, and toss their first item until the Item menu stops "responding".
 
<br/>
*[[Expanded bag item documentation (Generation I)]]
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.
*[[Expanded PC item documentation (Generation I)]]
*[[Expanded bag item documentation (Generation II)]]
 
===Examples===
For expanded bag items in Red, Blue and Yellow, addresses D344 and D345 (-1 in Yellow) are used for item 20 and item 20's quantity respectively. Item 21 (RB: D346, Y:D345) is also used as FF (Cancel) as an item end of list address when the player has a properly terminated list of 20 items.
 
Item 21's quantity (RB: D347, Y:D346) marks the start of unrelated memory addresses; namely it is the first money byte (multiples of 10,000 in [[wikipedia:binary coded decimal|binary coded decimal]]) hence changing the value of item 21's quantity will affect the multiple of 10,000 in the player's money (e.g. changing the value to 153, hex:99 will give the player 99XXXX money)
=== 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.
Another example is how item 36 quantity (RB: D365, Y:D364) represents the exit location for many maps.
 
===Equation===
The following equation can be used to find what memory address an item represents or the other way around. That memory address +1 will represent a quantity.
 
Memory address = [First item position address -1] + [Cursor positon] + ([Cursor position -1])
 
Example for expanded bag items in Pokémon Red and Blue:
*D365 (exit destination) = D31D (number of items) + (x) + (x-1)
*D365-D31D=0x48
*0x48/2=0x24
*D31D + 0x24 + 0x23 = D364
 
From this we can gather that item 36 (0x24 in hexadecimal) represents D364 (which is the 'block-x' value that is either 00 ("j." or "x") or 01 (Master Ball)). This means that D365 (map exit) represents item 36's quantity.
 
Note that this equation does not apply for items 129 (0x81) through to 256 (0x00) because those items represent items 1-128 again.
 
== Returning a bag of 255 items back to normal (Generation I) ==
This is very simple : you need to buy three items to return your menu to normal.
<br/>
Warning : the first item will be lost !
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.
 
With [[arbitrary code execution]], the following code should work :
=== "Dry" item underflow glitch ===
<pre>
According to ChickasaurusGL's Youtube video, this has been found by Luckytyphlosion.
Lemonade x(# of items in your inventory before the glitch)
TM34 x29 (x28 in Yellow)
TM11 x201
</pre>
 
== Generation I activation ==
It is a better method because it doesn't require the Saffron guards to be thirsty, neither a Fossil.
<br />
Also, it can be done with the PC items, allowing to edit more RAM addresses that were only accessed through ACE or [[Map_254_(Yellow)|map FE]]
 
=== By underflow ===
You will need 2 different tossable items, and a stack of 255 items.
There are two known ways of tricking the game into decrementing the item count when it is already 0, which causes the it to underflow to 255. Both methods require an item stack of something x255:
Steps to reproduce :
* [[Item underflow glitch (event method)]]
<br />
* [[Dry underflow glitch]]
# Order your items so that your 2 tossable items are in slots 1 and 2 and the item x255 is in slot 3.
# Toss everything below the item x255.
# Toss the top two items so you have three items x255 (item count=1)
# Toss 253 of the first item x255.
# Swap item 1 with item 2.
# Swap item 1 with item 2, again.
 
==== Methods to obtain x255 stack ====
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.
{{MissingNo. underflow}}
 
=== By save corruption ===
 
== 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
<br/><br/>
Line 56 ⟶ 71:
Select "Yes" and skip the title screen.
<br/>
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.
<br/>
At this point, there are three possibilities when booting the game again :
# A text box pops saying "The save file is destroyed !". You reset too early, try again.
# A Continue button is present, but your Pokemon menu isn't accessible. You reset too late, '''erase''' the save file and try again.
# 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 the [[ZZAZZ glitch]]===
Using the ZZAZZ glitch, it is possible to make all FF bytes up to the terminator in the player's bag disappear and then perform the [[ZZAZZ glitch#party Pokémon box data shift glitch|party Pokémon box data shift glitch]].
 
The party Pokémon box data shift glitch will shift all bytes in the player's inventory up to the FF upwards, therefore, having an item such as a TM01 (hex:BF) in the first position of the bag would allow for hex:BF (dec:191 items).
== By ACE ==
 
If you can use arbitrary code execution, you may run the following code (both with 8F and ws m)
This glitch may stop working later in the game due to FF values appearing in the memory before the bag addresses.
 
=== By arbitrary code execution===
If you can use [[arbitrary code execution]] (ACE), you may run the following code for the English games (both with 8F for {{RB}} and ws m for {{Y}}).
<br/>
<code>
Lemonade x255
<br/>
TM34 x211x29 (x28 in Yellow)
<br/>
TM11 x201
hex:1C (Earth Badge) x201
</code>
<br>
This basically changes the item counter to hex:FF
This basically changes the item counter to hex:FF.
 
=== Using Gameshark ===
The Gameshark code 01FF1CD3 (Yellow) or 01FF1DD3 (Red/Blue) will give the player 255 items.
 
=== By [[Glitch City RAM Manipulation]] ===
== Using Gameshark ==
By having 50 slots filled in the PC, GCRM can turn this number to 109 ; it is then possible to retrieve a stack of 255 items, and perform either method of item underflow (see above).
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.
 
This method has the enormous advantage that it doesn't require [[Missingno]], which is good for EU {{RB}} and US {{Y}} players.
 
However, since the PC has 109 items accessible, storing items is likely to corrupt game data instead of returning the PC to normal. The best solution is [[Arbitrary code execution]], although retrieving 59 items from the PC will also work (but it's difficult).
 
== Generation II activation ==
{{incomplete}}
One can access an expanded Poké Balls pocket through [[duplicate key items glitch]] abuse.
 
== Notes ==
*In Red, Blue and Yellow, when scrolling down the list, the cursor may seem to freeze ; in that case hit B until the cursor responds again. (If A is used, and is pressed while a long-name item is selected the game will crash and save data may be partially overwritten.) This happens when the game prints a large name which spans multiple lines.
*In Pokémon Crystal, the glitch description of item hex:00 will usually freeze the game. This can be avoided if the player presses Select on another item to bring up the text "Where should this be moved to?" before scrolling down.
*The expanded item pack is useful for Pokémon 'glitched' speedruns as it allows the manipulation of many addresses such as map destinations, text pointers (for [[text pointer manipulation]]) and so on.
 
= 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.
<br/><br/>
Like said earlier, it can be used to speedrun the game, as changing the 36th item allows to change warp locations.
<br/>
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.
<br/>
Warning : the first item will be lost !
 
With ACE, the following code should work :
<br />
<code>
Lemonade x(# of items in your inventory before the glitch)
<br/>
TM34 x211
<br/>
hex:1C (Earth Badge) x201
</code>
 
[[Category:Generation I glitches]]
[[Category:Miscellaneous glitches]]
[[Category:Stubs]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.