Special 0x56 – Swarm-roaming Pokémon changer
Receives Arguments? YES.
Variable 0x8004 has a long key:
0 to 0x3fff: faced as pokemon number
0x4000-> 0x8015: faced as pokemon number IN the variable stored in 0x8004
0x8000-> 0xfffc: not defined
0xfffd-> specific pokemon stored at a pointer kept in two variables, 0x8008 0x8009. I already explained how that worked before
0xfffe-> specific pokemon stored at a pointer, that must be placed by hand in 0x0203f488
0xffff-> specific pokemon stored at the LoadPointer location
-----------------------
Variable 0x8005 has the chances of appearance
Those chances are calculated by number of pokémon in 65536 encounters
0x0 means as rare as a shiny
0x7fff is 50% chance
0xffff means always. No chance of non-appearance
-------------------------
Variable 0x8006 is the quantity
0x1 means the pokémon will only appear once, 0x2 two times… until 255 appearences(0xff)
0x0 means unlimited appearances. Recommended for Swarm-like events
-------------------------
Variable 0x8007 lower half is the location, and the upper half is the level the pokémon is found in. Used to avoid "underwater Charizard"-like scenarios.
First 4 bits of the word are the location values. 0x0 does the same as 0xf, that is, the pokémon is found anywhere you want.
Bit 0 = grass
Bit 1 = surfing
Bit 2 = tree\rock-smash
Bit 3 = fishing
So 0x9 (1001b) would mean that the pokémon is found on grass and by fishing
The upper half is the level of a roaming pokémon. For instance, if you want a lv. 80 pokémon in the wild grass only, use setvar 0x8007 0x5001
Returns values? No
All of those make anyone be put off by this code, but don't be. This code is one of the most useful in this entire hack. Basically, it lets you create two types of events that everyone missed in Fire Red: Swarms and Roaming Legendaries.
I know the Legendary dogs roamed Kanto, but I didn't know how so I made up my version. Basically, this code replaces one normal wild pokémon and places on its stead one we really want to appear. You can only replace the level for Roaming codes, that is, only for the ones in that 0x8006 = 1. For swarms, however, you cannot. That is the pokémon there will always be at the area's level. But the level problem can be solved easily with something I will talk at the bottom.
You might have noticed that the variable 0x8004 key has something interesting near the bottom: The ability to load predefined pokémon. They must be at a full 100 bytes, but that way you can fight specific pokémon you pre-selected, just like Pal-park on the DS versions. That opens the window for a number of possibilities, such as having to bring a specific pokémon to someone, like a runaway pokémon, complete with that NPC's OTID and Name.
Also 0xfffe makes you input the pokémon by hand. If you never used this code before, most likely you will be surprised by a very well trained ?????????. Use, as always, writebytetooffset to prevent that disaster.
Special 0x57 – Swarm-roam Pokémon canceller
Receives Arguments? No.
Returns values? No
Cleans all, including the pokémon.