Thanks for the interest and help, pirohiko!
So I went and made a LUA script to help plan things out. It determines what you get as item drops for a given configuration of monsters.
saved = savestate.object()
itemaddress = 0x60C0
quantaddress = 0x60C1
for invhex = 0x60C0, 0X60FF do
memory.writebyte(invhex, 0x0)
end;
savestate.save(saved)
for rnghex = 0,0xFF do
savestate.load(saved)
memory.writebyte(0x16, rnghex)
emu.frameadvance()
item = string.upper(string.format("%02x",memory.readbyte(itemaddress)))
quant = string.upper(string.format("%02x",memory.readbyte(quantaddress)))
rng = string.upper(string.format("%02x",rnghex))
if memory.readbyte(quantaddress) ~= 0 then
emu.print("RNG = ",rng," Item = ",item," Quantity = ",quant)
end;
end;
emu.pause()
Output is follows:
RNG: The value at $16.
Item: The index of the item you get from the current enemy configuration for a given RNG.
Quantity: How much of Item you get for a given RNG.
If there are more than one type of item won, you can determine what else you get by editing itemaddress and quantaddress to point the needed inventory slots.
Example of use
You encounter three Shadows. After destroying them, you position the game to the frame right before $16 changes. Run the script. Now you know that you can get two eyedrops from a group of three shadows if $16 is #77, #FE, or #FF at the end of combat.
In order to get the output you want, you need to position the game to one frame before $16 changes! [/s]Also be sure to leave the appropriate address empty, or else you might be reading an item that's already there![/s]
Edit: Script updated so that the previous stricken notes are now no longer a concern.