MV Yanfly's Skill learn-, Classchange core- and Skill Core -Plugins.

Hello folks!
Second time posting on this Forum, please be gentle. 😀

I'm currently facing a problem with said plugins i can't seem to fix on my own, so I'm turning to you guys.

The way i have set up my classes is that each class has learnable "skills" to unlock certain types of equipment.
For example the Fighter class can learn "Medium Amor Mastery" in order to then equip this type of armor. Same for weapons.
While this works just fine, the problem arises as soon as any character starts with an advanced class/gear.

So my "Berserker" Character, who is already above the fighter class is supposed to start out with already advanced gear, like a greataxe and Medium armor already equiped. Like so:
Thaz gear.JPG


In order to give him his more advanced gear by default, i have to give him "Equip Weapon: Greataxe and Equip armor: Medium Armor" in order to have him hold it by default. If i do that however, the plugin obviously does not register the character having "unlocked" these skills already, resulting in the skills still being learnable like so:
Thaz skills.png

Learning that skill results in no effect obviously as it technically is already.

Question is: How can i have the character "spawn in" with his appropiate gear and have the plugin show the skills as "learned"?

Note: I have no experience with scripting, so if that is the solution, it would be much appreciated if someone could provide said code snipped and how to use it.
If all the Berserker classes will have the skill by default, you can just go to the Class tab and add the skills in as learnt at level 1. Hope this helps.
If all the Berserker classes will have the skill by default, you can just go to the Class tab and add the skills in as learnt at level 1. Hope this helps.

Sadly it's only that one character that's supposed to have that. I thought about doing that but that would be very suboptimal. Hopefully someone has a way to solve this.
You might have to do some eventing. During the recruitment/joining of the Berserker (could be even in the beginning of the game if he is in your initial party), have a Common event that runs when a switch is on, and that switch is turned on when the character joins the party. Within that common event, you can use scripts to add the skills to the actor, with the script call $gameActors.actor(id).learnSkill(skillId).
Example, Actor 5 needs to learn Skill 13, the script will be:
$gameActors.actor(5).learnSkill(13)
You might have to do some eventing. During the recruitment/joining of the Berserker (could be even in the beginning of the game if he is in your initial party), have a Common event that runs when a switch is on, and that switch is turned on when the character joins the party. Within that common event, you can use scripts to add the skills to the actor, with the script call $gameActors.actor(id).learnSkill(skillId).
Example, Actor 5 needs to learn Skill 13, the script will be:
$gameActors.actor(5).learnSkill(13)
Thanks for the reply @zelanius
That's what i thought too. will that script call make skill learn system recognize the skills as learned tho?
By right, it should make the system recognize that the skill is learnt. If that doesn't work, you can always try the below within the Notebox of the skill itself (replacing the "skillID" with the actual number), but not sure if this will work.
<Learn Require Eval>
user.forgetSkill(skillId)
</Learn Require Eval>
By right, it should make the system recognize that the skill is learnt. If that doesn't work, you can always try the below within the Notebox of the skill itself (replacing the "skillID" with the actual number), but not sure if this will work.
<Learn Require Eval>
user.forgetSkill(skillId)
</Learn Require Eval>

I think the above should work then. Do i actually have to set up the event right before joining tho? I mean the actors are saved regardless, no? Shouldn't it be possible to just make an event right at the intro for example, giving him the gear and skills required long before the player actually "meets" the character?

Is there also a script call to give my character equipment he cannot technically wear? (since i can also not give medium armor since that is attached to medium armor mastery, wich he recieves via the script call.)
I think the above should work then. Do i actually have to set up the event right before joining tho? I mean the actors are saved regardless, no? Shouldn't it be possible to just make an event right at the intro for example, giving him the gear and skills required long before the player actually "meets" the character?
It really depends. Do you plan to do any other effect on the actor when they join (e.g. initializing their level, etc)? If not, I think you can just set up the event right up front. If you are doing other things when they join, then it might be best to have it as part of a joining event.

Is there also a script call to give my character equipment he cannot technically wear? (since i can also not give medium armor since that is attached to medium armor mastery, wich he recieves via the script call.)
It depends on how you setup the skill, I guess. If your plan is to add the trait to allow equipment upon learning the skill, I believe it should work. However, just in case, there is also a way to have the skill add a state using YEP's Auto Passive States plugin, and then have that state add the trait to allow equipping the Medium Armor.

Lastly, you can make it such that everyone always have the states, but the state will only activate if they learnt the appropriate skills, by adding the below Notetag into the State's notebox.
<Custom Passive Condition>
if user.isLearnedSkill( skill_id ) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
It really depends. Do you plan to do any other effect on the actor when they join (e.g. initializing their level, etc)? If not, I think you can just set up the event right up front. If you are doing other things when they join, then it might be best to have it as part of a joining event.


It depends on how you setup the skill, I guess. If your plan is to add the trait to allow equipment upon learning the skill, I believe it should work. However, just in case, there is also a way to have the skill add a state using YEP's Auto Passive States plugin, and then have that state add the trait to allow equipping the Medium Armor.

Lastly, you can make it such that everyone always have the states, but the state will only activate if they learnt the appropriate skills, by adding the below Notetag into the State's notebox.
<Custom Passive Condition>
if user.isLearnedSkill( skill_id ) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

Yes, I am using the passive States plugin (wich is how the skills work Greataxe mastery gives the class the passive state wich allows it to equip certain gear.)
Now i just need a way to give my character his appropiate starting gear since he cannot wear it by the defaults of the editor. Thus i cannot select it in an event either.
ah, that's simple enough:
$gameActors.actor(actorId).changeEquip(slotId, $dataArmors[n]);
ah, that's simple enough:
$gameActors.actor(actorId).changeEquip(slotId, $dataArmors[n]);

Thanks alot for the help! Gonna try these and see if it works. May or may not be back for more later. ;D
good luck! ^-^
good luck! ^-^

I'm assuming the weapon equivalent call of this
$gameActors.actor(actorId).changeEquip(slotId, $dataArmors[n]);
would just be $dataWeapons then?
yup, you are absolutely right. All credits to the script call list
yup, you are absolutely right. All credits to the script call list

True. One day i'll be able to wrap my head around the script call shenanigans. Thanks for the assist!
Oh yeah. Issue resolved. Can be closed.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-skill-learn-classchange-core-and-skill-core-plugins.130983/