So I came across a thread on the Glitch City forums involving what happens when a Pokemon with an invalid species index gets hacked into the game. And, from what I've seen so far, it produces some pretty interesting results:
Pokemon in a box that have invalid species indexes (0x323 - 0x340)
So, for any of you that are scratching their heads at what's going on, allow me to shed some light on it. Programmed into the game is a list of Pokemon species with their associated index number to reference them easier. The list in Sun/Moon starts at hexadecimal value 0x1 (Bulbasaur), and ends at value 0x322 (Marshadow). Pokemon that have an index value outside of this range will actually still appear in the game, although they are very glitchy. As you can see in the image above, some of them have an egg sprite when in the PC, and others get stuck with the loading symbol, because the game doesn't know how to process them. There is one I found (index 0x323) that has the battle model of an egg, "Egg" as its species name, and an egg sprite when put into the box. However, rather than being an egg that hatches, it has stats, a nature, an ability, attacks, et cetera, so it can technically go into battle*. It's things like this that I find make this world of Gen VII glitch Pokemon interesting.
* Actually, the game crashes when it's sent or switched into battle (which may or may not be possible to fix via a ROM patch), but you get the gist.
So what can and can't I do with these Glitched Pokemon?
Alright, so there are obviously things that you can't do with these Pokemon, and I'll try to outline them as much as I can. If I'm missing or forgetting something, let me know.
Manage these Pokemon in your PC boxes and your party (although it has been reported to crash the game at higher indexes)
View the summary and quick details if in the PC (same as above)
Use items on them (including Rare Candies)
View them in Pokemon Refresh
Put them in Poke Bank (with a chance of getting banned)
Not much else, but a lot of things are untested, so I'll put them in a separate list below.
Battle with these Pokemon (crashes)
Go online using the Pokemon (Wonder Trade, GTS, etc.)
Tell me if you find anything else!
Putting these Pokemon into the day-care
Infrared / Local trading
Other things I haven't thought of yet.
Okay, cool, so how do I obtain such Pokemon?
Since PkHex limits the species indexes to only valid ones, we will need to use a modded version that allows us to create invalid Pokemon. I'm not sure if it's against the rules to put a direct link to this program, so I'll put a link to the Glitch City thread that has it: http://forums.glitchcity.info/index.php?topic=7730.0 (Created by Wack0. Scroll down to find the post with the Google Sites mirror, since the original host is dead).
Everything is the same, despite it being an old build, except in the species and attack selectors, you can choose every single possible index number, all the way up to 0xFFFF. We can select one, and place the resulting Pokemon into a slot in our save's box. Import the save using your preferred save manager, and that's all there is to it!
KEEP IN MIND: This modded version of PkHex has to load and sort through 66,338 entries in the species drop-down (0x0 - 0xFFFF plus every pokemon species), and even more in the attack drop-downs. As such, this version is EXTREMELY laggy for all computers. I might create a new program to circumvent this, but in the meantime, this is all we have. I'd suggest not even going into the attacks tab and leave it as the default moveset, just because it takes so long to load.
Let me know what you think of this concept! Thank you for reading, and have a nice day!