I would love to have a class change plugin that works in battle as I have a character that can change classes (modes) and elements in each mode, and she also has different skills that only work in one mode with some skills that work in both modes. I did try making a skill using a common event but her class doesn't change in battle and her skills that are blacked out in the 1st mode are still blacked out and it makes her stats reset to level 1 stats despite her initial level being at 40..
Changing class in battle
● ARCHIVED · READ-ONLY
-
-
Use with Yanfly's Class Change Core (make you sure set the default unlocked classes in Yanfly's plugin the parameters to your liking)
Terms of Use: Credit DreamX for the extension and Yanfly for the original script.Spoiler(function () { Game_Actor.prototype.totalClassChange = function (classId) { if (Imported.YEP_ClassChangeCore) { var previousClass = this.currentClass().id; var previousExp = this._exp[this.currentClass().id]; var previousLevel = this._level; var previousHpRatio = this.hpRate(); var previousMPRatio = this.mpRate(); this.changeClass(classId, true); this.removeClass(previousClass); this.forgetClassSkills(previousClass); this._exp[classId] = previousExp; this._level = previousLevel; this._hp = Math.floor(this.mhp * previousHpRatio); this._mp = Math.floor(this.mmp * previousMPRatio); console.log(this._level); this.refresh(); } else { return; } }; Game_Actor.prototype.forgetClassSkills = function (classId) { if (!$dataClasses[classId]) return; $dataClasses[classId].learnings.forEach(function (learning) { this.forgetSkill(learning.skillId); }, this); };})();
With Yanfly's Battle Action Sequences 1, you can use it like this in the skill's notetag:
<setup action>
eval: user.totalClassChange(2);
</setup action>
Change 2 to the class id you want to change to.