Guides for this game say that dropping the key is random, but actually it isn't random.
In truth, the game uses memory address 0x41B to track how many Key Guardians you've killed. It uses memory address 0x419 to track how many Key Guardians you need to kill before a key is dropped.
On the first level, you must kill 4 key guardians. It doesn't matter what order you kill them in. The 4th will always drop the key.
On the first level, the key guardians are the Green Skeletons, or the Orange Goblins. Regardless of what else you kill, or how much frame delay, the only thing that effects key drop is the guardians killed. You can tell they are key guardians, because unlike every other unit, these do not respawn when re-entering the screen, and killing them increments 0x41B.
This mechanic doesn't seem to be recorded in any of the FAQs. Now that you know about it, you can route your levels based on the locations of the key guardians and always have reproducible results. Note that some guardians only appear when entering a screen from a specific direction.
For example, in the first level, if you drop into the first pit, there is no goblin. But if you go to the right and then quickly turn back to the left, the goblin will appear.
My suggested path in level 1:
Go right and kill the skeleton (1)
Drop down and go left to kill a goblin (2)
Go right and kill a goblin (3)
Go Up Right and kill a skeleton (4)->Pick up key
Now go to exit.
These 4 are the best located enemies. Note that compared to the current WR, this swaps (2) and (4) which reduces backtracking.
On hard mode, if it matters:
In level 2: Jellyfish and Mermen are the guardians. Kill 3
L3: Skeletons and Crocs: Kill 8
I wonder if there's a known way to manipulate the key to have it. I noticed (at least in chapter 4-1) on the second key guardian, i was able to get a key.
Another thing that i was wondering, Does every stage have different memory sddress? You mentioned that Chapter 1 needs to get 4
I think each stage might be a slightly different memory address, but very close together. I forget now. There is a number you need to hit, and a number that you have. It should be right around 0x419-0x41B at least on stage 1.
But yes, you need exactly 4 key guardian kills on stage 1. The path I show above kills the 4 closest guardians in the fastest order. If you follow this path, it will always drop a key on the same enemy every time.
I didn't check how many kills you need on chapter 4, but mind you that normal/hard mode might change the numbers.
So, what is the best way to determine the number of Key Guardians for each stage? I personally think that sub 40 could be more achievable
what is the best way to determine the number of Key Guardians for each stage?
Play using BizHawk emulator with the Hex Editor on, and you can see the RAM values directly.
thanks for the tip! Gonna do some research with it and try routing things out!