This is a pretty neat trick.
Random enemies!
I make use of the Random Number generator and have some comparison commands decide which monster gets loaded into the scene. In this example, I have 2 monsters, Gato, and Masa& Mune. Only one of them will load, based on the random number written to memory. Walk into Gato's Exhibit and Gato may be there, but the next time, maybe Masa & Mune will be there waiting. Imagine dungeons and areas where the monsters can be as unpredictable as you want (with a little work
).
If there are 255 possible random numbers to be generated, you could code in a monster for each possibility.
That would make for an awesome Colloseum type area (think FF6), where one party member is chosen, to face a random monster, and win a random prize...
Here is my code, not copied from anywhere in the ROM, just sort of thrown together (I'm surprised it works).
The Random Number is written to a different space in memory (It's 8 bytes off) but it's easy enough to see where using Geiger's Debugger RAM viewer. (That's why my comparison checks are checking a different location than what the Random Number command says it's writing to).
So much cool stuff to do with this one....