I've recently devised a way to allow the player to switch classes mid game. I realized there was an issue though, let's say the player is level 5 in class A. They've unlocked 3 skills, but now they want to try class B. They switch over and see that they still have the skills from class A. This is a problem, I want to make it so that whenever the player switches classes, they do not have any of the skills from the previous class.
I did some searching and found this code from a previous post on the forums here, here's the code I'm referring to. Full credit to the original poster Trihan for the code.
This code allows me to remove all learned skills, I plugged it in to the common event prior to switching classes so now... Whenever the player switches from class A to class B, they have no skills from the previous class. Problem solved right? Well no...
You see, I'd like to make it so that whenever the player returns to class A - that they regain the skills they've already learned without the hassle of learning all of them all over again. It would be a pain to have to watch the text say "So and so learned this skill!" every single time the player switched classes. On top of that, I have a system involved so that the player must choose which skills they wish to keep as they only have access to 8 at a time. If switching classes requires the player to reselect every skill over and over, that would be a serious problem. To top it all off, the player has access to skill cards which means they can teach a specific class a skill that isn't even available to learn from leveling up.
So my question is as the title suggests, is there a plugin or script that I could run to retain the skills that each class contains as to allow for a fresh start when switching classes and retaining skills when returning to a previously leveled class? Thanks for your time and I appreciate all help given!
I did some searching and found this code from a previous post on the forums here, here's the code I'm referring to. Full credit to the original poster Trihan for the code.
const actor = $gameActors.actor(1);[I]const skills = actor.skills();[/I][I]for (let i = 0; i < skills.length; i++) {[/I][I] actor.forgetSkill(skills[i].id);[/I]}This code allows me to remove all learned skills, I plugged it in to the common event prior to switching classes so now... Whenever the player switches from class A to class B, they have no skills from the previous class. Problem solved right? Well no...
You see, I'd like to make it so that whenever the player returns to class A - that they regain the skills they've already learned without the hassle of learning all of them all over again. It would be a pain to have to watch the text say "So and so learned this skill!" every single time the player switched classes. On top of that, I have a system involved so that the player must choose which skills they wish to keep as they only have access to 8 at a time. If switching classes requires the player to reselect every skill over and over, that would be a serious problem. To top it all off, the player has access to skill cards which means they can teach a specific class a skill that isn't even available to learn from leveling up.
So my question is as the title suggests, is there a plugin or script that I could run to retain the skills that each class contains as to allow for a fresh start when switching classes and retaining skills when returning to a previously leveled class? Thanks for your time and I appreciate all help given!