PokéBase - Pokémon Q&A
0 votes
466 views

After I caught missingno. in red, I got another HM for FLY. And it won't let me store either in the PC, so what's wrong with it? Is it a glitch? Does missingno. have anything to do with it?

by
edited by
I didn't get 128 because you can only have 1 hm at a time. And you can't even hold 100 items so yeah, I think the game would break...
Then maybe that's the answer.
You *can* hold 100 items. You can hold as many as 255 (which is the limit of an 8-bit integer). The game never expects you to get more than 99, but obviously that can be bypassed with glitches. You can see this in effect if you look for videos of the item duplication glitch -- there is a visual bug where the first digit is supposed to be, but it behaves correctly.
I'm not sure how this interacts with items like HMs that don't display a quantity, which may have something to do with the answer to this question. Can anybody reproduce what OP describes where HMs are duplicated as separate items in the bag when the item duplication glitch happens? (The usual effect is to increase the count of the item in question by 128, not create new bag items.)
This is pure speculation, but the code probably prevents HMs from being deposited at all, regardless of what quantity you have (Probably because they didn’t intend for there to be multiple HMs in a bag). The bag items are probably all objects in C++ (and all share a property of quantity and displaying quantity), and certain key items would have properties (like a Boolean or something) that determines if you can put it in the PC to begin with- it wouldn’t need to care if the quantity were greater than 1, just that there is room to store it. :P

All of the HMs probably have a quantity value, but the developers made it impossible to get more than 1 by normal means, unaware that the amount could change with glitches they didn’t know about. It’s just a logical step in game programming to prevent items from leaving you that could potentially soft-lock you or be difficult/pointless not to carry around everywhere. :P
According to this answer, it is possible to put HMs in the PC in Gen 1: https://pokemondb.net/pokebase/340734#a345340

Please log in or register to answer this question.