Quote Originally Posted by Chris Miller View Post
Here's a detailed explanation of how item drops work in Zelda 1: http://redcandle.us/The_Legend_of_Zelda#Drops
I was aware of this aspect. I am not sure how the chance to drop /anything/ works. As I said, I suspect that there is a perpetual one byte counter, and if it is above or below a specific threshold, that there is a drop; then the drop is selected from a list. If I knew what determined the drop frequency, I could script this in a matter of minutes and load it into 1st-4th.

Tracking enemy kills is actually more of a pain than it should be in ZScript at present, FWIW, partly because we do not have npc scripts yet, and those could report a message to the system that the npc died.

Any npc running by script could simply do:

if ( this->HP <= 0 ) do_npc_death_count();

A global script would then track these, and use a hardcoded drop table. I do not know how far off we are from npc scripts. I know that we need to move weapons into their own class to do weapon scripts, and that will take some doing; and will require me reworking the item and weapon editor stuff (again).

I want to make some adjustments to how noc shields work, in the process. Give npcs a long for shield type on all for sides, that has a size equal to the hitbox length on that side, but that is a topic for another day.