I'd like to be able to set it so a skill either misses/fails or can't be selected at all if switch/variable is set to X. I don't know if I just can't find how to do it or if i need some sort of plugin for it. Please any help will be appreciated its really important to multiple classes and skills in my game.
Switch and variable dependent skills
RPG Maker MV Supportswitches can't affect skills directly, you either need a plugin or rethink how your game works.
By default, only states can change the available skills by sealing them.
Another method would be to make the damage formula dependent on the switch, but in that case the skill would work (and need to be paid with MP/TP) and only the result would be 0 points.
Other than that, there are several plugins that do allow conditions on skill use - I think yanfly has a few methods to do that and other plugin writers might have something as well.
By default, only states can change the available skills by sealing them.
Another method would be to make the damage formula dependent on the switch, but in that case the skill would work (and need to be paid with MP/TP) and only the result would be 0 points.
Other than that, there are several plugins that do allow conditions on skill use - I think yanfly has a few methods to do that and other plugin writers might have something as well.
You can use switches and variables in the damage formula. If you want the skill to do nothing if variable 1 is greater than 3 but perform an attack if not, for instance, you could do:
$gameVariables.value(1) > 3 ? 0 : a.atk - b.def
You can also use switches. Let's say that if switch 1 is on, the attack will do 50 damage, but if it's off, it will do 0 damage. Then you could do:
$gameSwitches.value(1) ? 50 : 0
This will change the effects of your attacks based on the values of the switch or variable. You could then set the damage to 0 for one of the possible conditions, which will make the attack do 0 damage if it is true. If you want it to be disabled completely, then that would require a plugin.
$gameVariables.value(1) > 3 ? 0 : a.atk - b.def
You can also use switches. Let's say that if switch 1 is on, the attack will do 50 damage, but if it's off, it will do 0 damage. Then you could do:
$gameSwitches.value(1) ? 50 : 0
This will change the effects of your attacks based on the values of the switch or variable. You could then set the damage to 0 for one of the possible conditions, which will make the attack do 0 damage if it is true. If you want it to be disabled completely, then that would require a plugin.
Original thread: https://forums.rpgmakerweb.com/threads/switch-and-variable-dependent-skills.67047/