http://www.yanfly.moe/wiki/Skill_Mastery_Levels_(YEP)
I'm currently using the above in my project.
I'd like to create a training system. If the skill level is less than a certain value then for a price the trainer can increase it for you.
Yanfly provided the code for how to edit a skill level.
So on its own that's fine. I'm just struggling with the "If the skill level is less than" part.
And there also seems to be a code that checks the value of the skill level and runs a common event.
"The above code will make a check to see if the user's current mastery level
of the skill is greater than or equal to 3. If it is, common event 5 will be
reserved and ran once applicable." - From the help section
But when I created a common event for my trainer nothing happened.
These were "Skill Notetag" examples however.
I'm looking for a way to have the trainer check to see that the skill is less than a certain amount and then offer to train it only if it is less than said amount.
As always any help would be appreciated.
Thanks.
EDIT: If there is somehow a way to set the skill mastery level of various skills to a variable that would be most ideal.
I'm currently using the above in my project.
I'd like to create a training system. If the skill level is less than a certain value then for a price the trainer can increase it for you.
Yanfly provided the code for how to edit a skill level.
Code:
battler.gainSkillMasteryLevel(skillId, value)
So on its own that's fine. I'm just struggling with the "If the skill level is less than" part.
And there also seems to be a code that checks the value of the skill level and runs a common event.
Code:
<After Eval>
if (user.skillMasteryLevel(item.id) >= 3) {
$gameTemp.reserveCommonEvent(5)
}
<After Eval>
"The above code will make a check to see if the user's current mastery level
of the skill is greater than or equal to 3. If it is, common event 5 will be
reserved and ran once applicable." - From the help section
But when I created a common event for my trainer nothing happened.
These were "Skill Notetag" examples however.
I'm looking for a way to have the trainer check to see that the skill is less than a certain amount and then offer to train it only if it is less than said amount.
As always any help would be appreciated.
Thanks.
EDIT: If there is somehow a way to set the skill mastery level of various skills to a variable that would be most ideal.




