Drop mechanics
Guides
/
Drop mechanics
Updated 9 years ago by Dragonfangs

Practical stuff:

The game does a couple of calculations based on the enemy's position, its index in RAM and multiple RNG values to get a number between 1 and 1024 (the calculation is explained in the "Technical Mumbo Jumbo" part if you're actually interested). Controlling this number in any meaningful way is not reasonable in real time, for all practical reasons it is truly random.

This number is then tested against the drop rates in: http://www.speedrun.com/mzm/guide/z48ik If it's bigger than 1024-(rate for power bombs) you get a power bomb drop, otherwise if it's bigger than 1024-(pb rate)-(super rate) you get a super and so on, continuing with Missiles, Large health and Small health. After your drop is decided however, it can transform into something else based on your current resources.

For health(big and small) it does the following checks:

If health is not full: drop normally otherwise, if missiles are not full: drop a missile if both health and missiles are full: drop normally anyway

For everything else, it does the following:

Is the resources in question not full: drop normally otherwise, if health is not full: drop a large health otherwise, as long as you have the item unlocked: drop normally anyway or finally, failing everything else: drop a small health

So when looking at the drop tables, you can (in cases that matter) add both health drop rates to missile drop rate if you're full on health. And if anything else is maxed out, add it to large health drop rate.

Technical Mumbo Jumbo:

The game uses two RAM values for the RNG calculation: 0x3000C77 and 0x3000002. I will refer to them as "frame1" and "frame2" respectively in the formula. These change every frame but can also change by invoking random elements (like checking for drops).

The formula starts as follows (% denotes a modulo operation):

((frame1 + 1) % 256 + ((frame2 + 1)/16) + (enemy's index in the list of enemies) + (enemy x position) + (enemy y position)) % 32

the result will then be used as an index to fetch a number from this list, I'll refer to the fetched number as "listRNG": {13, 2, 6, 8, 7, 9, 14, 10, 2, 4, 14, 4, 12, 15, 13, 12, 11, 1, 3, 15, 0, 6, 7, 8, 11, 5, 0, 3, 5, 1, 9, 10}

the calculation continues:

((frame1 + 1) % 256 + (frame2 + 1) + listRNGĀ¤256) % 1024

and the resulting number is compared against the drop rates.

Note that metroids, in order to give two drops, are technically two enemies, with the second one dying at the same time and in the same location as the first one. So the only thing different between the two drops is the enemy index.

Game stats
Followers
768
Runs
1,889
Players
408
Latest news
Nintendo Switch Online allowed for Speedruns

Hey everyone,

the newly released Nintendo Switch Online version has been added as a platform for Speedruns. The game rules have been updated. If you want to perform a speedrun on NSO, you should carefully read the rules regarding NSO and follow the instructions.

Have fun on your next mission!

5 months ago