Jump to content

User:CytricAcid/Beginner's Guide To ACE/US Red and Blue Guide: Difference between revisions

m
(→‎3. Setting up our first code: Changed Full Heal ×2 to Full Heal ×3 to avoid potentially unsafe filler code.)
 
(3 intermediate revisions by 2 users not shown)
Line 1:
If you are a Wiki Contributor and would wish to edit this page, let me know on Discord. This is a collaborative effort!
 
{{Guides header|ItemDex/RB:093{{!}}8F (Red/Blue)|thing=item}}
 
===WARNING===
Certain steps in this guide will lead you to a game state where a mistake could crash the game, or worse, delete your save file. Make sure to double and triple check your setup and follow instructions properly before using any glitch items!
Line 85 ⟶ 88:
=== Get a ×255 item stack ===
[[File:Oldman1.png|thumb|Step 2: Just in case you don't remember, this NPC is [[Old man glitch|''the'' old man]].]]
[[File:Missing_image8F PP Up Quantities.jpgpng|160px|thumb|Step 5: PP Up ×129 and PP Up ×255 should look like these respectively. (TODO: Add screenshot)]]
The goal of this step is to get a stack of any item ×255 in the bag. Since the normal limit for an item stack is ×99, this goal will require a glitch. Namely, we will duplicate the 6th item in the bag by encountering either [[MissingNo.]] or [['M (00)]] through the [[old man glitch]].
 
Line 92 ⟶ 95:
# '''Go to Viridian City, and talk to the old man who shows you how to catch Pokémon. Watch his catch demonstration''' (by saying "No" when he asks if you are in a hurry).
# '''Immediately Fly to Fuchsia City<ref group="note">The more well-known location to perform the old man glitch is the eastern coast of Cinnabar Island, but it actually works with any "eastern shore tiles" that can be reached from a Fly destination without going through an area with grass encounters. This guide will use the shore tiles on the east side of the Seafoam Islands because they are closer to a location that can help us get 8F easily later.</ref>''' (without otherwise leaving Viridian City).
# '''From Fuchsia City, Surf down and then left to reach this location:'''<br />[[File:Missing_image.jpg]]Seafoam (TODO:Islands AddOld screenshot)Man Glitch Location.png|160px]]
#* For safety, save the game now, since there is a possibility we may need to reset later.
# '''Surf along the shore for wild encounters. We are looking for the glitch Pokémon [[MissingNo.]] or [['M (00)]]<ref group="note">As mentioned on the [[old man glitch]] page, the possible encounters depend on the player's name, but at least one of the glitch Pokémon we are looking for should always be available.</ref>, which looks like one of these:'''<br />[[File:MissingNo._RB_SGB.png]][[File:Kabutops_fossil.png]][[File:Aerodactyl_fossil.png]][[File:Pokémon_Tower_ghost.png]]
Line 102 ⟶ 105:
 
=== Perform dry underflow ===
[[File:PP Up Dry Item Underflow.png|160px|thumb|Step 4: The classic setup for dry underflow. Make sure that at this point your item count is exactly 1.]]
[[File:PP Up x1 Dry Item Underflow.png|160px|thumb|Step 5: The item count is 0 now, so be extra careful here.]]
[[File:PP Up Dry Item Underflow Completed.png|160px|thumb|Step 6: You should be able to scroll down again, even past the 20th item.]]
Now that you have a ×255 item stack, you can save the game and experiment with it if you want to.
 
{{Explanation|×255 item stacks and the item count|contents=The most notable property of the ×255 item stack is its tendency to [[Item stack duplication glitch|duplicate itself]]. For example, with PP Up ×255 as the 6th item in your bag, toss (or deposit into your PC) the entire stack of your 5th item. Your 5th item is now PP Up ×255 (as expected), but your 6th item is ''still'' PP Up ×255, meaning that you have two of those stacks now. However, if you only had 6 items to begin with, now you actually only have 5 items ''even though you can see PP Up ×255 as your 6th item''. That 6th item will "act like the Cancel button", meaning that you won't be able to scroll past it, and if you press the A button on it, instead of bringing up the use/toss menu, you will exit the item menu. This may be confusing at first, but just keep in mind that the game keeps track of your ''item count'' (which is supposed to be the number of item stacks you have) and your item list separately. Try not to decrease your item count too much prematurely (although you should be fine if you don't toss, use or deposit from your ×255 item stack unless instructed to).}}
 
This may be confusing at first, but just keep in mind that the game keeps track of your '''item count''' (which is supposed to be the number of item stacks you have) and your item list separately. Try not to decrease your item count too much prematurely (although you should be fine if you don't toss, use or deposit from your ×255 item stack unless instructed to). We will be performing '''item underflow''', which means that eventually we will decrease the item count a lot — namely, decrease it to -1, but it takes some careful setup to avoid being stuck at 0.}}
In order to obtain 8F, we want to perform [[dry underflow]], which involves decreasing the item count a lot — namely, decreasing it to -1. For this purpose, we need to make use of a somewhat obscure functionality of the item menu: Pressing the Select button on two items allows you to swap items. Furthermore, if they are the same type of items, those item stacks are combined into one stack instead as long as the total number of items is not more than 99. This decreases the number of item stacks (i.e. decreases the item count) and we will ultimately use this to bring the item count to -1.
 
In order to obtain 8F, we want to perform [[dry underflow]], which involves decreasing the item count a lot — namely, decreasing it to -1. For this purpose, we need to make use of a somewhat obscure functionality of the item menu: '''Pressing the Select button on two items allows you to swap items.''' Furthermore, if they are the same type of items, those item stacks are combined into one stack instead as long as the total number of items is not more than 99. This decreases the number of item stacks (i.e. decreases the item count) and we will ultimately use this to bring the item count to -1.
 
{{color|red|The below steps may cause you to lose some items from your inventory. In the grand scheme of things that is not that important since eventually you will be able to get any item in any quantity back with ACE, but you do need a few items later (or a bit of money to buy them) to get things going smoothly.}}
Line 112 ⟶ 120:
# '''Make sure to have at least two item stacks above your topmost ×255 item stack. Also make sure that you have access to your topmost ×255 item stack, and it is not "acting like the Cancel button"''' (i.e. make sure that pressing the A button on it brings up the use/toss menu, and does not exit the item menu).
# '''Get rid of all other items above your topmost ×255 item stack''': Deposit all Key items and other things you want to keep into the PC, and toss all unimportant items.
#* Your ×255 item stack should duplicate itself and fill your inventory, likeso this:<brnow />[[File:Missing_image.jpg]]you (TODO:should Addhave screenshotat (orleast wouldthree a×255 textitem list work better here?))stacks.
# '''If necessary, start tossing the second ×255 item stack until your item count is 1.''' You will know that your item count is 1 when you are no longer able to toss your second ×255 item stack because it is acting like the Cancel button, and you are no longer able to scroll to your third item stack.
# '''Toss 253 from your first ×255 item stack, so that you have 2 left.'''
#* Your inventory should now look like this:<br />[[File:Missing_image.jpg]] (TODO:the AddPP screenshotUp can be anything, as long as all three stacks are the same kind of item):
#** PP Up ×2
# '''Swap your first item stack (the ×2 stack) and second item stack''' (by pressing the Select button on the first item stack and then on the second item stack).
#** PP Up ×255
#* They will combine into a ×1 item stack like this:<br />[[File:Missing_image.jpg]] (TODO: Add screenshot)
#** PP Up ×255
# '''Swap your first item stack (the ×2 stack) and second item stack''' (by pressing the Select button on the first item stack and then on the second item stack). They will combine into a ×1 item stack.
#* {{color|red|At this point, don't accidentally exit your item menu by pressing A or B. Otherwise you will be unable to proceed, and the best course of action is to reset the game to load your last save file and try again.}}
# '''Swap your first item stack (the ×1 stack) and second item stack again.''' They will combine into a ×0 item stack.
#* They will combine into a ×0 item stack like this:<br />[[File:Missing_image.jpg]] (TODO: Add screenshot)
#* If you've done everything correctly, you should be able to scroll down again, even past the Cancel button and past the 20th item (normally the maximum number of items of your bag). What happened is that you have decreased your item count to -1, but since the game is not designed to handle a negative item count, it becomes 255 instead, giving you access to 255 items. You can now start the next section.
{{clr}}
 
=== Obtain 8F ===
Once you have access to the [[expanded item pack]], obtaining 8F, or indeed any item in the game, is quite easy. The reason is that the contents of the expanded item pack actually correspond to unrelated game data — such as your coordinate on the map — so they can be easily manipulated. On the other hand, that also means that messing with the contents of the expanded item pack may affect the game state, and can even be dangerous. Follow the below steps in order to obtain 8F safely.
# '''From Fuchsia City, Surf down and left again to reach this location, then go another two tiles to the left to reach the second:'''<br />[[File:Missing_imageRoute 20 8F location.jpgpng|160px]]<br (TODO/><br />[[File:Real AddRoute screenshot)20 8F Location.png|160px]]
# '''Scroll down to the 35th item in your expanded item pack. It should be 8F.'''<ref group="note">The 35th item corresponds to your X coordinate on the current map (i.e. it decreases as you go left, and increases as you go right, as long as you don't leave the current map). This location is on the Route 20 map, which is the single widest map in the game, allowing you to obtain many useful items this way.</ref><br />[[File:Missing_image.jpg]]Route (TODO:20 AddExpanded screenshot)Item Pack 8F.png|160px]]
# '''Swap this item with a useless item in your main inventory.''' (The ×0 stack at the top of your inventory you've just created in the previous section should work fine: You should have at least two ×255 stacks of the same item below, which can duplicate themselves if you somehow need more.)
# '''Immediately Fly away.<ref group="note">By swapping the 35th item, you have corrupted your X coordinate, so trying to move around on the map may have unexpected and confusing effects. Depending on which item you swapped it may be possible to leave the map by Surfing and/or walking, but the safest option is to just Fly away. There is a technique named the [[Celadon looping map trick]] which makes use of such a X coordinate corruption to obtain items with too large an internal ID to be obtained on Route 20, but you won't really have a need for that since once you set up ACE you can obtain any item more easily.</ref>'''
Line 182 ⟶ 192:
The final step is to spell out the arbitrary code you want to execute with items in your inventory. We will start with some simple codes both to verify that your party setup is correct, and to take full control of your inventory (i.e. get any item in any quantity) in order to facilitate making more complicated codes.
 
=== Get any item quantity ===
Arrange your items as follows, starting from the first item in your inventory:
* 8F<ref group="note">Technically, 8F can be in any slot of your inventory, but this slot is the most convenient.</ref>
Line 209 ⟶ 220:
 
After making sure everything is set up correctly, use 8F. The quantity of the second item should have increased by 1, even going over 99 (which eliminates the need to use MissingNo. to duplicate items in the future).
 
There is a slightly different variant of this code that you may find more convenient (depending on the quantities you need and/or your willingness to do some math): Replace Full Heal ×3 with Revive ×3, which will cause 8F to decrease the quantity of the second item by 1 instead of increasing it. At first glance this may not seem that useful, but the point is that this can decrease the quantity from 1 to 0 without deleting the item stack. As mentioned earlier, a ×0 item stack is equivalent to ×256, so you can then get any quantity ''n'' you want by tossing 256-''n'' from the item stack.
 
=== Get any item ===
Arrange your items as follows, starting from the first item in your inventory:
* 8F
* (Any unimportant item)
* Lemonade ×(the ID of the item you want)
* X Accuracy ×32
* Water Stone ×3
* TM01 ×(any)
You can find out the ID of any item from [[The Big HEX List]].
{{Explanation|title=ASM translation|contents=
Again, initially <code>hl</code> = $D322.
{{{!}} class="wikitable"
! Item slot !! Item stack !! Hex !! ASM !! Comments
{{!}}-
{{!}} 3rd {{!}}{{!}} Lemonade<br />×<ID> {{!}}{{!}} 3E<br /><ID> {{!}}{{!}} '''ld a, <ID>''' {{!}}{{!}} Loads <ID> into the register a
{{!}}-
{{!}} 4th {{!}}{{!}} X Accuracy<br />×32 {{!}}{{!}} 2E<br />20 {{!}}{{!}} '''ld l, 0x20''' {{!}}{{!}} hl = $D320 (the kind of the second item)
{{!}}-
{{!}} rowspan=2 {{!}} 5th {{!}}{{!}} rowspan=2 {{!}} Water Stone<br />×3 {{!}}{{!}} 22 {{!}}{{!}} '''ld [hli], a''' {{!}}{{!}} Sets the value at $D320 to <ID>
{{!}}-
{{!}} 03 {{!}}{{!}} inc bc {{!}}{{!}} Filler
{{!}}-
{{!}} 6th {{!}}{{!}} TM01 {{!}}{{!}} C9 {{!}}{{!}} '''ret''' {{!}}{{!}} Returns control to the calling routine
{{!}}}
* Again, the "×3" in "Water Stone ×3" is a filler that can be replaced by anything that don't actively mess up the rest of the code (in particular, ×2 may work with some setups).
}}
 
After making sure everything is set up correctly, use 8F. The second item should become the item you want.
 
=== More codes ===
At this point, you should have full control over your inventory, which would make it easy to spell out any future codes. See [[Generation I item codes]] for some examples of what you could do with ACE.
 
== Notes ==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.