Hey guys, I wanted to design a leveling system where enemies would drop items that give you a random stat bonus in order for the player to get stronger. However, I want the enemy to just yield one of the possible pool of items. Any way to achieve this?
How do I guarantee just one item drop out of a pool of many?
RPG Maker MZ SupportThe best way I can think of, without a custom plugin, is to turn on a Switch at the beginning of each battle (using a Turn 0 event). Then, have each enemy drop a dummy item representing the enemy you just beat - for example "Harpy Orb". Finally, create an Autorun Event on the map (or maybe with an Autorun Common Event - I forget whether Switch-based Common Events can run during battle and you don't want it to run until returning to the map) which has that Switch as a requirement. For each Orb, run the random calculation at this point to determine which stat is awarded, by choosing a random number (Control Variables) and then running a set of Conditional Branches to award a different stat based on the number selected. Maybe the Harpy Orb awards STR if the number is 1-3, AGI, if it's 4-8, and LUK if it's 9-10, whereas the Slime Orb awards STR if the number is 1-4, DEF if it's 5-7, and MDF if it's 8-10. Have some way (a graphic effect, a musical stinger, or a text box) to let the player know which stat increased. At the end of this Event, be sure to turn off the Switch so it doesn't keep running.
Creating a plugin to award exactly one drop from a list of possible drops, presumably based on the odds entered in the database drop rates, would be doable and would probably be a moderate-difficulty plugin to make. It's something you could ask for in JS Plugin Requests and hope that someone is kind enough, or sees enough use in it, to make it for you.
Creating a plugin to award exactly one drop from a list of possible drops, presumably based on the odds entered in the database drop rates, would be doable and would probably be a moderate-difficulty plugin to make. It's something you could ask for in JS Plugin Requests and hope that someone is kind enough, or sees enough use in it, to make it for you.
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-guarantee-just-one-item-drop-out-of-a-pool-of-many.131633/