Spells depending on weather

Is there a way to make spells require that certain weather be active? For example, I am wanting to create an "Elementalist" class that can use certain spells when the weather is doing specific things. One example of this would be that if it is raining in my game that the elementalist is able to use water magic. I would also give her a field spell to cast that could change the weather in areas in order to allow her to use certain spells if the player chooses to change the weather. Is there anyway that this can be done, such as a plugin? I'm not very experienced with scripting so I doubt I could do something like this with script myself.
The only thing I can come up with is using change skill command via event.
Set a "weather" variable and you can randomize the values throughout the game.
After that, set a conditional branch, put the weather and change skill in that branch.

Let's say if the value is 1,
the weather will be rain and you can then add change skill:
Learn "water cannon", forget "heatwave".

However change skill can only be assigned to actors (not class).
At least that can give the effect you want if every character has an exclusive class.
But if your game allows job change, it won't work.

Hopefully someone can give a better idea,
but I hope this helps. 😀
The only thing I can come up with is using change skill command via event.
Set a "weather" variable and you can randomize the values throughout the game.
After that, set a conditional branch, put the weather and change skill in that branch.

Let's say if the value is 1,
the weather will be rain and you can then add change skill:
Learn "water cannon", forget "heatwave".

However change skill can only be assigned to actors (not class).
At least that can give the effect you want if every character has an exclusive class.
But if your game allows job change, it won't work.

Hopefully someone can give a better idea,
but I hope this helps. 😀
This definitely helps as my game is only going to have 4 characters that have a set class! Although I also have my characters learning abilities through an AP system, so that may complicate things when taking away and adding skills. I will definitely have to do some testing tonight.
I have to say first and foremost, this is something I setup in MV, and it does function off of a plugin, AS WELL AS something I setup via eventing to work with the plugin, but anyway.

The time system plugin I am using in MV allows for randomized weather effects to occur, and when they do, you can, using common events, setup exactly what you want to happen when they do. I have built a system to allow for weather effects to trigger a variable (though this could also be a switch) to change it's value when weather is active. Using this method, you could quite easily setup what you are looking to do.
I have to say first and foremost, this is something I setup in MV, and it does function off of a plugin, AS WELL AS something I setup via eventing to work with the plugin, but anyway.

The time system plugin I am using in MV allows for randomized weather effects to occur, and when they do, you can, using common events, setup exactly what you want to happen when they do. I have built a system to allow for weather effects to trigger a variable (though this could also be a switch) to change it's value when weather is active. Using this method, you could quite easily setup what you are looking to do.
To be clear, I am going to have preset weather in areas, so I don't necessarily need to have randomized weather effects, and then have the Elementalist have different "field spells" that they can use to change the weather. So, for example, If it is raining in the area the Elementalist can use her water based spells. Through a field spell (which I know how to set up) she can change the weather to be snowing. Doing this SHOULD make her water magic unuseable in battle and allow her ice based spells to be used. I'm just unsure on how I can stop her water magic from being usable while allowing her ice spells to be usable.

Edit: I'm also wanting to be able to edit this class's weakness and resistance while certain weather is active. For example, when it's raining Fire and Water elements are resisted while Lightning is now a weakness and when it's snowing she would resist Ice while being weak to Fire.

Edit 2: I also was wondering if there is a way to put a time limit on the "field spell" so that after a certain amount of time passes that the spell wears off.
In MV, Yanfly had a plugin called Skill Core that would (among other things) let you set requirements for skills, such as that a Switch must be ON in order to use the skill. So as long as you could set a Switch whenever certain weather is active (this is not hard to do, especially if you are eventing your own Weather system), you can require certain weather for certain spells.

Based on the documentation, it looks like the spiritual successor to this plugin from Visustella will let you do this in RPG Maker MZ.

There are ways to do it without a plugin (for example you could have the water spell run a common event which either runs a second spell with the actual effect for the water spell if it's raining, or a third skill with no effect at all if it's not raining). But the VS plugin will make it a lot cleaner, a lot more intuitive, and honestly easier on you in the long run.
In MV, Yanfly had a plugin called Skill Core that would (among other things) let you set requirements for skills, such as that a Switch must be ON in order to use the skill. So as long as you could set a Switch whenever certain weather is active (this is not hard to do, especially if you are eventing your own Weather system), you can require certain weather for certain spells.

Based on the documentation, it looks like the spiritual successor to this plugin from Visustella will let you do this in RPG Maker MZ.

There are ways to do it without a plugin (for example you could have the water spell run a common event which either runs a second spell with the actual effect for the water spell if it's raining, or a third skill with no effect at all if it's not raining). But the VS plugin will make it a lot cleaner, a lot more intuitive, and honestly easier on you in the long run.
Thanks! I will definitely get that plugin. Now the final thing i need to work out is if i can have the switch turn off after a certain amount of time after being active. Do you know how to, or if, thats possible?

Original thread: https://forums.rpgmakerweb.com/threads/spells-depending-on-weather.130713/