% Chance to resist Taunt (Yanfly Plugin)

Hello everybody,

Hope you are all well!

I got a random question relating Yanfly's Taunt Plugin.

Now I am aware that these Notetags allow the user to ignore Taunts of the specific nature 100% of the time.
<Ignore Physical Taunt>
<Ignore Magical Taunt>
<Ignore Certain Taunt>

My question is, is it possible somehow to assign a percentage to this?

Something like: <Ignore Physical Taunt: 60%> That a character with this notetag has a 60% chance to resist a physical taunt.

I was first thinking of achieving this with traits and lowering the state rate for taunt, but the way how the plugin works, this would lower the chances of the caster to perform a successful Taunt overall, not specific to a certain target.

Thank you
Looking through the plugin, I don't see any Lunatic Mode available, meaning that you could not add custom conditions like "Random 60%" for taunts or ignoring taunts.

You could always make a Plugin Request to add this functionality, but thinking through the mechanic more, I don't think it's practical. Taunt (as Yanfly's plugin handles it) affects target selection, which takes place before the attack is launched. If a battler has, say, a 60% chance to ignore a taunt, then there's a 60% chance they'll be able to target anyone with a skill, or a 40% chance they'll be locked into targeting a taunter. Of course, if that 40% happens, the player could just back out and choose a new skill, or even choose that skill again and again until they're allowed to target anyone. I would recommend against trying to work this functionality into Yanfly's Plugin, as I don't think the gameplay will work in practice even if you get the code right.

I guess what you'd ideally want is to pick an enemy, and then when the action executes there's a 60% chance the battler will actually target that enemy, or a 40% chance it will hit the taunter. This can be handled to some extent by modifying the "Substitute" methods in RPG Maker MV to (for example) give a percentage chance to Substitute, rather than checking the intended target's HP and Sub'ing or not Sub'ing based on that. It gets a little trickier when you want each battler to have a different chance to ignore the Taunt, but that may also be doable.

Alternatively, you could give an Actor/Equip/whatever a percentage chance to add the Ignore Taunts state onto them at the beginning of the battle. So now you either get to ignore 100% or 0% of taunts for the entire battle, but you can (for example) allow the battler to ignore 100% of taunts in 60% of battles. Just have a common event run at the beginning of each battle (using a Turn 0 troop event that calls the Common Event) which either applies or removes the Ignore Taunt state.
@Wavelength Hm, I thought it might be a tricky one to achieve. My coding skills are pretty basic to be honest so modifying the plugin itself might be a bit to big fro me just yet. I might give it a go and try the Common Event approach you mentioned.
Thanks

Original thread: https://forums.rpgmakerweb.com/threads/chance-to-resist-taunt-yanfly-plugin.105637/