Skills that have a chance on hit to apply states to the user

I have been trying to find a way to adds this through notetags with yanfly's plugins. It would be like what the skill reward plugin does, but only a chance of adding the state. Skill procs/chance on hit seems like something that someone would have done before but I cant find anything
Not sure if what you're seeking is offered as a core feature in any of Yanfly's plugins, but to implement a random chance with scripting, this is a typical approach:
Code:
if (Math.random() < 0.8) {
  // 80% chance to do this
}
This sort of thing can be used in any script context, including Yanfly's "Lunatic Mode" notetags. 🙂

Then you can do something like this, assuming the context supports a "user" variable:
Code:
user.addState(42);
Replace 42 with the ID of the state you want to add.

Note that you can also achieve all of this in the damage formula~

(Math.random returns a random number in the range [0, 1).)
yes I have it working now thank you very much 😀

although now Im having issues with the state itself I might have to make a new thread

Original thread: https://forums.rpgmakerweb.com/threads/skills-that-have-a-chance-on-hit-to-apply-states-to-the-user.107378/