I'm using yanfly's victory aftermath plugin, and on the battle spoils screen I need a plugin that changes the loot based on all the loot there, such as for every 2 of item #3, instead give 1 of item #2 (so 7 of item 3 would give 3 of item 2 and only 1 of item 3) I would like this plugin to be able to handle multiple different items too and be able to apply to every troop encounter.
Plugin that changes drops from entire troop encounter based on enemy drops.
JS Plugin Requestsit might be possible with this plugin "YEP_ExtraEnemyDrops".
you just create a var and the drops you want drop.
so you can make a random 1-7 and the amount of items
so you can get 7 the same, or 7 different items.
I dont know lunatic code exacly, but someone can help you with it.
you just create a var and the drops you want drop.
so you can make a random 1-7 and the amount of items
so you can get 7 the same, or 7 different items.
I dont know lunatic code exacly, but someone can help you with it.
So if I understand it... you want a custom enemy drop. YEP_ExtraEnemyDrops can do that, but it's a paid plugin. And sadly, this only works on a single enemy's drops, not a troop's.
This is made even more complicated by the fact it's implied the enemy can drop an indefinite quantity of items 2 and 3. I actually have no idea if this is even possible to do what you wanted. The best I can think of a functional solution is the following:
For what I know, the <Conditional Item x Drop> tag only works on a single instance of an item, so expect a lot of copypasting. Let's say you can have a maximum of 7 instances of item 3.
For item 3, copy the following seven times:
For item 2, copy the following three times:
This also requires you to reset Variable 3 at value zero after getting the items somehow.
I have no idea if any of this works. This is perhaps the most challenging thing I tried to do with JS and I won't be surprised if there's a better way to do all of this.
This is made even more complicated by the fact it's implied the enemy can drop an indefinite quantity of items 2 and 3. I actually have no idea if this is even possible to do what you wanted. The best I can think of a functional solution is the following:
- Think of the drop rate of item 3. For the sake of simplicity, I'll go for 50%.
- The probability of dropping two instances of item 3 is 50% * 50% = 25%. This would be the probability of dropping a single instance of item 2.
For what I know, the <Conditional Item x Drop> tag only works on a single instance of an item, so expect a lot of copypasting. Let's say you can have a maximum of 7 instances of item 3.
For item 3, copy the following seven times:
Code:
<Conditional Item 3 Drop>
// Calculate the chance of getting the item
var chance = 0.5;
// Check RNG if it passed
if (Math.random() < chance) {
// You got item 3
$gameVariables.value(3) += 1;
}
// Check if Variable 3 is an odd number
if (($gameVariables.value(3) % 2) !== 0) {
// Finally, you got an Item 3
Always: +50%
}
</Conditional Item 3 Drop>
Code:
<Conditional Item 2 Drop>
// Check if Variable 3 is an even number
if (($gameVariables.value(3) % 2) == 0) {
// You got an Item 2
Always: +25%
}
// Lower Variable 3 by two
$gameVariables.value(3) -= 2;
</Conditional Item 3 Drop>
I have no idea if any of this works. This is perhaps the most challenging thing I tried to do with JS and I won't be surprised if there's a better way to do all of this.
there is an old extension that lets you drop more than one, though. http://stitchgaming.com/2016/03/nemv-quantities-yep-extra-enemy-drops-extension/
and this one by srd, not sure if it works perfectly with the one abovebut it is there.
sumrndm.site
and this one by srd, not sure if it works perfectly with the one abovebut it is there.
Enemy Bulk Drops – MV Plugin – RPG Maker MZ Plugins
Original thread: https://forums.rpgmakerweb.com/threads/plugin-that-changes-drops-from-entire-troop-encounter-based-on-enemy-drops.120321/