Hey, I've been trying to find a way to make the <Learn Unlock TP Mode: x> notetag for skills (which unlocks a TP Mode when learning a certain skill) work for skills learned through the Skill Learn system plugin.
I assume the notetag only checks if an actor had learned a skill through the default class skill list instead of learning it through the Skill Learn plugin. Any ideas on how to make it work?
ENHANCED TP: http://yanfly.moe/2016/01/08/yep-55-enhanced-tp/
SKILL LEARN SYSTEM: http://yanfly.moe/2015/11/14/yep-28-skill-learn-system/
I've been messing around with the code but I can't figure out how to make it work, if anyone has time I would appreciate they look into the it. Thanks!
Here's the code related to the Learn Unlock TP Mode notetag:
I assume the notetag only checks if an actor had learned a skill through the default class skill list instead of learning it through the Skill Learn plugin. Any ideas on how to make it work?
ENHANCED TP: http://yanfly.moe/2016/01/08/yep-55-enhanced-tp/
SKILL LEARN SYSTEM: http://yanfly.moe/2015/11/14/yep-28-skill-learn-system/
I've been messing around with the code but I can't figure out how to make it work, if anyone has time I would appreciate they look into the it. Thanks!
Here's the code related to the Learn Unlock TP Mode notetag:
DataManager.processETPNotetags3 = function(group) {
var noteU1 = /<(?:LEARN UNLOCK TP MODE):[ ]*(\d+(?:\s*,\s*\d+)*)>/i;
var noteU2 = /<(?:LEARN UNLOCK TP MODE):[ ](\d+)[ ](?:THROUGH|to)[ ](\d+)>/i;
for (var n = 1; n < group.length; n++) {
var obj = group[n];
var notedata = obj.note.split(/[\r\n]+/);
obj.learnUnlockedTpModes = [];
for (var i = 0; i < notedata.length; i++) {
var line = notedata;
if (line.match(noteU1)) {
var array = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']');
obj.learnUnlockedTpModes = obj.learnUnlockedTpModes.concat(array);
} else if (line.match(noteU2)) {
var range = Yanfly.Util.getRange(parseInt(RegExp.$1),
parseInt(RegExp.$2));
obj.learnUnlockedTpModes = obj.learnUnlockedTpModes.concat(range);
}
}
}
};
var noteU1 = /<(?:LEARN UNLOCK TP MODE):[ ]*(\d+(?:\s*,\s*\d+)*)>/i;
var noteU2 = /<(?:LEARN UNLOCK TP MODE):[ ](\d+)[ ](?:THROUGH|to)[ ](\d+)>/i;
for (var n = 1; n < group.length; n++) {
var obj = group[n];
var notedata = obj.note.split(/[\r\n]+/);
obj.learnUnlockedTpModes = [];
for (var i = 0; i < notedata.length; i++) {
var line = notedata;
if (line.match(noteU1)) {
var array = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']');
obj.learnUnlockedTpModes = obj.learnUnlockedTpModes.concat(array);
} else if (line.match(noteU2)) {
var range = Yanfly.Util.getRange(parseInt(RegExp.$1),
parseInt(RegExp.$2));
obj.learnUnlockedTpModes = obj.learnUnlockedTpModes.concat(range);
}
}
}
};
Game_Actor.prototype.learnSkillTpMode = function(skill) {
var length = skill.learnUnlockedTpModes.length;
for (var i = 0; i < length; ++i) {
var tpMode = skill.learnUnlockedTpModes[tpMode]
if ($dataTpModes[tpMode]) this.unlockTpMode(tpMode);
}
var length = skill.learnUnlockedTpModes.length;
for (var i = 0; i < length; ++i) {
var tpMode = skill.learnUnlockedTpModes[tpMode]
if ($dataTpModes[tpMode]) this.unlockTpMode(tpMode);
}