(Solved)Level up, learn skills for each actor

Hi!

There are over 100 actors in my game.
Obviously, different actors learn different skills, so you need to create different skills for each actor.
However, since the job is fixed at 8, it cannot be done with the level-up skill in the job.


I found learning skills when leveling up in the YEP plugin,
There is no exact condition for learning at a certain level, and it is a phrase that you learn when you level up, so you can learn a skill just by going up from level 1 to 2.


I found something similar in the HIME plugin, but this plugin is currently difficult to work with.

Are there any similar plugins or scripts available?
Why does Level Up Growth Effects not meet your needs here?
Why does Level Up Growth Effects not meet your needs here?

<Level Up Learn Skill: x>
Upon leveling up, this will teach the actor skill x.
- Replace 'x' with the ID of the skill you wish to teach the actor.

At what level, where do you set conditions such as learning this skill?
I couldn't use it because I couldn't set it up.

The description only tells you to enter the skill ID with X.

Actor #1
Learn ID XXX at level 10, YYY at 15, ZZZ at 20
Actor #2
Learn ID AAA at level 10, WWW at 15, QQQ at 20

It should be able to learn this way, but the exact settings of the level are not visible in the note tag.

If not, am I just not understanding it?
Code:
<Custom Level Up Effect>
if (actor.level >= 10) {
  actor.learnSkill(xxx);
}
if (actor.level >= 15) {
  actor.learnSkill(yyy);
}
if (actor.level >= 20) {
  actor.learnSkill(zzz);
}
</Custom Level Up Effect>
Code:
<Custom Level Up Effect>
if (actor.level >= 10) {
  actor.learnSkill(xxx);
}
if (actor.level >= 15) {
  actor.learnSkill(yyy);
}
if (actor.level >= 20) {
  actor.learnSkill(zzz);
}
</Custom Level Up Effect>


Oh! Thank you, I'll test it right now!
Code:
<Custom Level Up Effect>
if (actor.level >= 10) {
  actor.learnSkill(xxx);
}
if (actor.level >= 15) {
  actor.learnSkill(yyy);
}
if (actor.level >= 20) {
  actor.learnSkill(zzz);
}
</Custom Level Up Effect>

Thank you very much!

Works well thanks!
Code:
<Custom Level Up Effect>
if (actor.level >= 10) {
  actor.learnSkill(xxx);
}
if (actor.level >= 15) {
  actor.learnSkill(yyy);
}
if (actor.level >= 20) {
  actor.learnSkill(zzz);
}
</Custom Level Up Effect>

Oh, just one more last minute, please.

If i want to learn multiple skills at level 10

<Custom Level Up Effect>
if (actor.level === 10) {
actor.learnSkill(12);
actor.learnSkill(13);
actor.learnSkill(14);
} else if (actor.level === 20) {
actor.learnSkill(16);
}
</Custom Level Up Effect>

Can I write something like this?
Yep, you absolutely can, but make it >= rather than === just in case your actor goes up multiple levels, and make them if statements rather than else if. I edited my post with that when I realised. You probably won't have anything that makes your actor gain like 11 levels in one go but I like to code for every possibility.

Out of curiosity, if all you want is for actors to learn certain skills at certain levels, is there a reason you can't just use the default skill learning section in the database?
Yep, you absolutely can, but make it >= rather than === just in case your actor goes up multiple levels, and make them if statements rather than else if. I edited my post with that when I realised. You probably won't have anything that makes your actor gain like 11 levels in one go but I like to code for every possibility.

Out of curiosity, if all you want is for actors to learn certain skills at certain levels, is there a reason you can't just use the default skill learning section in the database?

It seems to have changed a little from the previous code.
Is the changed code more reliable to use?

It seems to be comparing when it is greater than or equal to 10. Are you preparing for when it raise the level by more than 10 at a time?


+)
That's right, but it's a bit curious, the original code worked fine even though I had written an event that raised levels 50 or more at a time.

However, the newly written code seems to be much more stable, so I'll use it.



++)

Out of curiosity, if all you want is for actors to learn certain skills at certain levels, is there a reason you can't just use the default skill learning section in the database?

Does this question mean the skill you learn by level in class?
If so, the reason is that the game has 8 classes fixed (for later equipment and variable checks)
By contrast, the number of actors is about 130.
However, this is because each actor needs to learn different skills.

For example...
Actor #1 is a warrior and class #1.
Actor #2 is a wizard and class #1.

In this case, if you set class 1 to learn magic skills, actor 1 will be able to use magic even though he is a warrior.

Of course, there are ways to differentiate between types such as magic and skills, but some actors can use both, but some actors should not learn certain skills.
Using the same class for multiple classes seems kind of inefficient to me, but I'm not the one making your game so it's not for me to question. 🙂

Yeah, the latter code will be more reliable for multiple level ups.

Original thread: https://forums.rpgmakerweb.com/threads/solved-level-up-learn-skills-for-each-actor.125035/