SHARE
TWEET

ON THE TOPIC OF GEN I ITEM DUPLICATION

ISSOtm Nov 20th, 2017 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ON THE TOPIC OF GEN ONE ITEM DUPLICATION
  2. or
  3. WHY ACE REALLY BLOWS SHIT UP (and makes your life much more convenient)
  4.  
  5.  
  6. You can get 0 of an item. It may sound stupid, but it's actually *the best*.
  7. You know how the bag is arranged in entries ? Like, "Poké Ball x42". The entry is basically one byte telling "these are Poké Balls", and another one telling "there are 42 of these".
  8. You see, the game is programmed so that when you give, use or toss items and you wind up with 0, the entry is removed from the bag.
  9. So normally there's no entry with a quantity of zero. But you *can* make that happen with ACE.
  10. So the game never expects you to do that. How does it react, then ? It might sound weird, but even though you have 0 of that item, for most purposes it's as if you had 256.
  11. Why that is, is both simple and complicated. First, let's see how the game handles removing items from your inventory.
  12.  
  13. 1. Decrease the quantity of the entry by the number to be removed.
  14. 2. If the result is exactly zero, then delete the entry.
  15.  
  16. Furthermore, the game doesn't "auto-clear" x0 entries from the bag. They are only cleared if (and only if, mind you) items get removed from your inventory. Because you'd never supposed to get a x0 entry otherwise, huh ?
  17. So, consider a x0 entry. If you toss 0 items, then (0 - 0) = 0 == 0 thus the entry is cleared.
  18. If you toss 1 item, then (0 - 1) = 255 != 0 so the entry isn't clea-- WAIT HOW DO I HAVE 255 ??
  19. That's the complicated part. Computers are limited machines (that's why you have 4GB or 8GB of RAM, and that makes a difference). So computers can't store infinitely large numbers. There are boundaries.
  20. What happens if you cross either of these boundaries ? You *wrap back* to the other one. For reasons I won't explain because I'm not typing up a programming course, the boundaries for an item quantity are 0 and 255.
  21. That's why 255 + 1 = 0. You can also reverse the equation and 0 - 1 = 255. Which is why tossing 1 out of your stack of 0 gives 255.
  22. Protip : try using SELECT to merge an entry of 255 items and another entry of 1 of the same item. Do the math to figure out why it's logical.
  23.  
  24. So, why is getting 0 of an item *the best* ? Easy : since tossing any non-zero amount is equivalent to tossing that amount from 256, you essentially have 256 items (and that's an absolute max) but only if you start tossing.
  25. You really have 0 of that item, though.
  26.  
  27. Ok, how to get 0 of an item. Easy.
  28.  
  29. Item              Qty
  30. ws m              
  31. Item to get 0 of  *  1
  32. Poké Ball         * 43
  33. Revive            *201
  34.  
  35. The good thing about this is that you can obtain an entry with *any quantity* extremely easily with this. Let's say you want a stack of 201 items, starting from four of them (because why not).
  36. With Missingno :
  37. 1. Toss 3 (you have 1)
  38. 2. Encounter/capture Missingno (you have 129)
  39. 3. Toss 56 (you have 73)
  40. 4. Encounter/capture Missingno (you have 201)
  41. This involves a fair bit of menuing, and also setting up a Missingno encounter at least once. It will be twice WAY more often, tho.
  42. With a x0 stack :
  43. 1. Toss 3 (you have 1)
  44. 2. Use the setup (you have 0, "kinda" 256)
  45. 3. Toss 55 (you have 201)
  46. This still involves pressing UP fifty-six times, but you don't have to ever leave the item screen, and you can repeat very easily. Plus it forgives mistakes very easily.
  47.  
  48.  
  49. Our next talk will cover how to automate pizza cooking and coffee brewing using ws m, including a full HTCPCP on Pokémon Red (with a custom Moomoo Milk addition to the protocol).
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top