RPG Maker MV monster drop item quest when switch is on?

I'm trying to make a quest when the quest is activated (switch is on) , monsters drop a certain quest item and after the quest is finished (switch is off) those monsters stop dropping the quest item. Can someone help me? Sorry for bad english.
'Game Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" (implementation) questions go in the Support forum for the engine you are using.
Moved to: RPG Maker MV
Are the monsters set up as random encounters or as events?

If they're set as events, have the monsters defined twice in the database - once with the "special" drop items and once with the normal drop items. Set up duplicate troops as well - one for the "special" drop monsters, and one for the "normal" drop monsters. Then in the event, check to see if the switch is on - if it is, call Battle Processing for the "special" troop, and if it's not, call Battle Processing for the "normal" troop.
Are the monsters set up as random encounters or as events?

If they're set as events, have the monsters defined twice in the database - once with the "special" drop items and once with the normal drop items. Set up duplicate troops as well - one for the "special" drop monsters, and one for the "normal" drop monsters. Then in the event, check to see if the switch is on - if it is, call Battle Processing for the "special" troop, and if it's not, call Battle Processing for the "normal" troop.

It's for random encounter monsters, is it possible ?
I don't know if you could do it without a plugin.

You might try setting up the monsters the same way, then add a troop event page conditioned by that switch to run just at the start of battle - if the switch is on, transform each enemy from the "normal" to the "special". But I think that would show a message that they're transforming, which you probably wouldn't want.

I haven't experimented a lot with what can be done on the troop pages.

You could still use an event and "fake" random encounters. I am thinking if you wanted an encounter every 40-60 steps, you could do something like this:

Create a parallel process event on that map.
Code:
Set a variable to a random number between 40 and 60.
Add the current number of steps to the variable (current steps is in Game Data > Other).
Loop
  Wait 10 frames (so as not to cause lag)
  Put current steps into a second variable
  If the second variable is greater than or equal to the first variable then
    If the switch is on then
      call Battle Processing with the "special" troop
    Else
      call Battle Processing with the "normal" troop
    End
    Set the first variable to a random number between 40 and 60
    Add the current number of steps to the variable
    (this is just resetting so the next encounter happens in 40-60 steps)
  End
Repeat Above


What's happening above is that when you enter the map, you're saying "in the next 40-60 steps the player takes, there's going to be an encounter". Then you're just monitoring for that number of steps to be taken. When it is, you do a battle - the monsters fought will depend on whether that switch is on or not. After the battle, you're recalculating when the next random encounter is going to happen, then go back to waiting/checking mode again. When you leave the map, the whole process stops. When you re-enter the map, it all starts again, in 40-60 steps.
@kazze If you want it to be incorporated in the regular drops then you'll need to use a plugin. First you'll need to download Yanfly's Extra Enemy Drop plugin and place in the plugin folder that is located in the JS folder of your project folder. Then add this into the notetag box of the enemy you want:

<Conditional Item x Drop>
SWITCH X ON: +100%
</Conditional Item x Drop>

Replace the x after Item with the ID number of the item you want the enemy to drop and replace the x after switch with the switch number that you are using. Now that specific item will only drop when that specific switch is on.
@kazze If you want it to be incorporated in the regular drops then you'll need to use a plugin. First you'll need to download Yanfly's Extra Enemy Drop plugin and place in the plugin folder that is located in the JS folder of your project folder. Then add this into the notetag box of the enemy you want:

<Conditional Item x Drop>
SWITCH X ON: +100%
</Conditional Item x Drop>

Replace the x after Item with the ID number of the item you want the enemy to drop and replace the x after switch with the switch number that you are using. Now that specific item will only drop when that specific switch is on.

Thank you, I think I need to look up every yanfly plugin from now on.

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mv-monster-drop-item-quest-when-switch-is-on.103953/