MV Yanfly's Skill Mastery System

I am using Yanfly's Skill Mastery System for RPG Maker MV linked below and I want to create a system such that when a skill levels up, a new stronger skill is learned. I run into an issue similar to another post where the new skill is learned only after the previous one is used again after meeting the required level. Ideally, the new skill is learned at the same the previous skill levels up.

Plugin:

Similar post (made a new to avoid necroposting):

code:
<After Eval>
if (user.skillMasteryLevel(item.id) >= 1) {
user.learnSkill(53);
}
</After Eval>

Thank you in advanced!
It seems to me to be as straightforward as the mastery level is increased after the skill has entirely completed - whereas After Eval is still while the skill is active. So using After Eval for this won't work because the mastery happens after it.

Also, that code isn't awesome because it would be trying to teach the actor the new skill every time they use the old one once it hits level 1.

My first question is:
I want to create a system such that when a skill levels up, a new stronger skill is learned

Does it really need to be an actual different skill? Between the damage formula, notetags, and Action Sequences, you can modify everything about how the skill works by referencing its mastery. The only things you can't change, as far as I know, are the skill's name and its icon.

If the answer is yes, you need to change the skill's name, then you'll need to do some workaround to check after the mastery stuff has run.

I would try this:
Make a blank state in your database. I'm going to use state ID 69, obviously you replace it with whatever you have.
Give your skill the following notetag:
Code:
<Before Eval>
if (user.skillMasteryLevel(item.id)<1)
{
    user._skillId = item.id;
    user.addState(69);
}
</Before Eval>
Then give that state the Yanfly Buffs & States notetag:
Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1)
    user.learnSkill(53);
delete user._skillId;
user.removeState(stateId);
</Custom Turn End Effect>
Also, that code isn't awesome because it would be trying to teach the actor the new skill every time they use the old one once it hits level 1.
Ahh, thanks for that! I am still a newbie when it comes to all this, so I appreciate any pointers.

As for the below:
Does it really need to be an actual different skill? Between the damage formula, notetags, and Action Sequences, you can modify everything about how the skill works by referencing its mastery. The only things you can't change, as far as I know, are the skill's name and its icon.
It doesn't have to be, but some of the skills in my game are buffs that apply a state to the user (example below) and I can't seem to find any documentation from Yanfly regarding increasing parameters within a state with mastery level. Ideally, I'd like for the Sturdy Shield skill to apply the state onto the user and with each level up of the skill, increase the parameters of the state by 3% each level up to level 10 going from Defense/M.Defense *120% to Defense/M.Defense *150%. Do you know if something like that is possible ?
1698725259404.png


1698725293104.png



in the meantime, the notetags you provided worked! this is a good workaround if what I mentioned above isn't possible. Thank you!

as an aside, did the yanfly wiki get moved or is it down? I can't seem to access the site
Do you know if something like that is possible ?
Not with Yanfly plugins, but there are a number of other plugins that allow you to use calculations for parameters in states.

There's Quasi's Params Plus and Hakuen Studio's Dynamic Parameters.

as an aside, did the yanfly wiki get moved or is it down? I can't seem to access the site
Works fine for me just now.
thanks, i'll give those a shot. and thats odd i keep getting File not found 404 error
1698728381555.png
Ah shucks I got this actually. When my character levels up a skill, it gets replaced by whatever new skill I put in the notetag...

It's been forever tho, I "think" I had someone make an edit for me...

<Custom EXP Mastery Formula: 150>
<SKILL EVOLVE: 19>
<SKILL EVOLVE LEVEL: 1>
<Hide if Learned Skill: 19>

That's the tags I got... Essentially putting the required amount of uses to a fixed number, then the skill evolves into a new one and hides the old one.

As I said I think it's an edit someone made for me, but they didn't leave anything in the help file. Perhaps I could send my version over?
Ah shucks I got this actually. When my character levels up a skill, it gets replaced by whatever new skill I put in the notetag...

It's been forever tho, I "think" I had someone make an edit for me...

<Custom EXP Mastery Formula: 150>
<SKILL EVOLVE: 19>
<SKILL EVOLVE LEVEL: 1>
<Hide if Learned Skill: 19>

That's the tags I got... Essentially putting the required amount of uses to a fixed number, then the skill evolves into a new one and hides the old one.

As I said I think it's an edit someone made for me, but they didn't leave anything in the help file. Perhaps I could send my version over?
Of course, if you think it will help!
I would try this:
Make a blank state in your database. I'm going to use state ID 69, obviously you replace it with whatever you have.
Give your skill the following notetag:
Code:
<Before Eval>
if (user.skillMasteryLevel(item.id)<1)
{
user._skillId = item.id;
user.addState(69);
}
</Before Eval>
Then give that state the Yanfly Buffs & States notetag:
Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1)
user.learnSkill(53);
delete user._skillId;
user.removeState(stateId);
</Custom Turn End Effect>
Is it possible for this to be tweaked to add a message to the user in-battle that the new skill is learned? I found it a bit jarring that suddenly a skill has been replaced. It doesn't seem like it would belong in the Custom turn end effect states notetag because then the message would appear after every turn, so im struggling to find an appropriate place for it with the code.
It doesn't seem like it would belong in the Custom turn end effect states notetag because then the message would appear after every turn
No it wouldn't? You put it in the same conditional that gives the new skill - that code will only run once in the game.
No it wouldn't? You put it in the same conditional that gives the new skill - that code will only run once in the game.
This code below in the state runs every other turn. Do you know where I may be going wrong?

Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1)
    user.learnSkill(53);
$gameMessage.add(user.name() + ' learned Sturdy Shield + !');
delete user._skillId;
user.removeState(stateId);

</Custom Turn End Effect>
This code below in the state runs every other turn. Do you know where I may be going wrong?
try changing it to this:
Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1){
    user.learnSkill(53);
    $gameMessage.add(user.name() + ' learned Sturdy Shield + !');
    delete user._skillId;
    user.removeState(stateId);
}
</Custom Turn End Effect>
try changing it to this:
Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1){
    user.learnSkill(53);
    $gameMessage.add(user.name() + ' learned Sturdy Shield + !');
    delete user._skillId;
    user.removeState(stateId);
}
</Custom Turn End Effect>
That did the trick, I should've known it was syntax. Thank you! I have much to learn...
This code below in the state runs every other turn. Do you know where I may be going wrong?
You need to add braces when you have more than one statement after a conditional.

try changing it to this:
You don't necessarily want to put all of that inside of the conditional. The state and skillId should delete every time, not only when the condition is triggered. That way you don't have any extra garbage stored on the actor in the save file and there's no chance of confusion between skill activations.

Removing the state will also prevent it from trying to check the level and such every single turn.

Code:
<Custom Turn End Effect>
if (user.skillMasteryLevel(user._skillId)==1)
{
    user.learnSkill(53);
    $gameMessage.add(user.name() + ' learned Sturdy Shield + !');
}
delete user._skillId;
user.removeState(stateId);
</Custom Turn End Effect>
You don't necessarily want to put all of that inside of the conditional.
Yeah, admittedly I wasnt looking at the thread, just the last response. But at some point afterwards I looked at it and DM'd them that same update alongside a few suggestions like having the mastery skills follow the previous skill in the database so that so that the state could be reused for other sets of skills
Code:
<Custom Action End Effect>
if (user.skillMasteryLevel(user._skillId)==1){
    user.learnSkill(user._skillId+1);
    $gameMessage.add(user.name() + ' learned ' +$dataSkills[user._skillId+1].name +' !');
}
delete user._skillId;
user.removeState(stateId);
</Custom Action End Effect>
It wasnt terribly relevant to the thread itself so I didnt make it a reply to the thread
You need to add braces when you have more than one statement after a conditional.
Ahh I see. i was wondering why there were no braces in the original code yet it still worked as intended.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-skill-mastery-system.162511/