EDIT: It seems like the plugin commands do work; however, when a class has its requirements met, not matter what -- it gets priority to removed classes. Is there a way to bypass this?
As in have a class unlocked for some people, but have it removed from others?
I'm having a hard time getting the "UnlockClass", "RemoveClass", "UnlockClassAll" and "RemoveClassAll" to work at all.
I checked the other plugin commands and they are able to function fine... but I'm at a lost as to how come these aren't responding at all.
} else if (command === 'UnlockClass') {
this.unlockClass(args);
} else if (command === 'RemoveClass') {
this.removeClass(args);
} else if (command === 'UnlockClassAll') {
this.unlockClassAll(args);
} else if (command === 'RemoveClassAll') {
this.removeClassAll(args);
is what is used for interpreting the plugin command
and these are the functions of each command.
Game_Interpreter.prototype.unlockClass = function(args) {
var actorId = parseInt(args[0]);
var actor = $gameActors.actor(actorId);
if (!actor) return;
var classId = parseInt(args[1]);
if (!$dataClasses[classId]) return;
actor.unlockClass(classId);
};
Game_Interpreter.prototype.removeClass = function(args) {
var actorId = parseInt(args[0]);
var actor = $gameActors.actor(actorId);
if (!actor) return;
var classId = parseInt(args[1]);
if (!$dataClasses[classId]) return;
actor.removeClass(classId);
};
Game_Interpreter.prototype.unlockClassAll = function(args) {
var classId = parseInt(args[0]);
if (!$dataClasses[classId]) return;
$gameParty.unlockClass(classId);
};
Game_Interpreter.prototype.removeClassAll = function(args) {
var classId = parseInt(args[0]);
if (!$dataClasses[classId]) return;
$gameParty.removeClass(classId);
};
Then these are the Actor & Party functions:
Game_Actor.prototype.removeClass = function(classId) {
if (this._unlockedClasses === undefined) this.initClasses();
if (!this._unlockedClasses.contains(classId)) return;
if (classId === this._classId) return;
var index = this._unlockedClasses.indexOf(classId);
if (index >= 0) this._unlockedClasses.splice(index, 1);
this.refresh();
};
Game_Party.prototype.removeClass = function(classId) {
if (this._unlockedClasses === undefined) this.initClasses();
if (!this._unlockedClasses.contains(classId)) return;
if (classId === this._classId) return;
var index = this._unlockedClasses.indexOf(classId);
if (index >= 0) this._unlockedClasses.splice(index, 1);
};
None of them are responsive... I am running Core Engine 1.25 on MV 1.5.1 and version 1.13 ClassChangeCore.
I'm just wondering if there was anything changed with how these are being read. I remember being able to use them back in MV 1.1.0
It would really appreciated for any help.
Thanks.
YEP_ClassChangeCore
● ARCHIVED · READ-ONLY