Yanfly Skill Mastery - Update traits Help

Plugin used:

Yanfly Skill core
Yanfly Skill mastery

I need help increasing the state rate per mastery.
I mean like lvl 1 poison skill have 20% chance of inflicting poison, lvl 2 have 30% chances of poison of inflicting poison and so forth.
Can someone help me with this ?

Thank you
My suggestion would be to apply the poison using the Damage Formula or a skill effect plugin so that you can customize the chance of it being applied to take the skill level into consideration.
This cannot be done without using his other plugins, Damage Formula for example. You can make a custom damage formula for each skill, which can manually set the chance of your poison based on skill level.
If you are already using Yanflys Skill Core plugin, you could add more effects with custom values at the end of your skill.
I haven't tried it yet, but something like this should work:
Code:
<after eval>
if (target.result().isHit()) {
  var chance = 0.1 + 0.1 *
      user.skillMasteryLevel(item.id);
  var effect = {
    code : Game_Action.EFFECT_ADD_STATE,
    dataId : 20,
    value1 : chance,
  };
  this.applyItemEffect(target, effect);
}
</after eval>
For the "add state" effect, you would have to replace the value for "dataId" in line 7 with the ID of your Poison state.
The "value1" in line 8 contains the application chance (1.0 equals 100%).

This way to add effects will not be recognized by the effectivity test in the menu though, so if you use this on a "friendly" skill and try to apply the skill on an ally in the menu, the game might think the skill will be ineffective and prevent you from using it if it does not have other qualities.
If you are already using Yanflys Skill Core plugin, you could add more effects with custom values at the end of your skill.
I haven't tried it yet, but something like this should work:
Code:
<after eval>
if (target.result().isHit()) {
  var chance = 0.1 + 0.1 *
      user.skillMasteryLevel(item.id);
  var effect = {
    code : Game_Action.EFFECT_ADD_STATE,
    dataId : 20,
    value1 : chance,
  };
  this.applyItemEffect(target, effect);
}
</after eval>
For the "add state" effect, you would have to replace the value for "dataId" in line 7 with the ID of your Poison state.
The "value1" in line 8 contains the application chance (1.0 equals 100%).

This way to add effects will not be recognized by the effectivity test in the menu though, so if you use this on a "friendly" skill and try to apply the skill on an ally in the menu, the game might think the skill will be ineffective and prevent you from using it if it does not have other qualities.

Thanks I will let you know if it is working or not tonight
This cannot be done without using his other plugins, Damage Formula for example. You can make a custom damage formula for each skill, which can manually set the chance of your poison based on skill level.

Even without other plugins, you can already use the damage formula box of skills to do this. Only downside is you need to write it in a single line box, so it can be confusing, but it can be done.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-mastery-update-traits-help.114233/