I didn't realize I flipped the function xD. Working as needed now! Could a future iteration of the plugin add a parameter boolean of whether a skill is learned in order for it to gain exp? Would make life a lot easier down the line ^_^'.
Glad it's working!
I'll review the code to check how complex adding that parameter can be. If it turns out to be simple, I could add it before releasing the official update. If not, I'll add that to my backlog and come back to it someday
😀
Separate question:
Only because I'm not seeing it with 8am while feeding my 1 year old son eyes. Is there a way to prevent Enemies from gaining skill levels altogether?
I know I can prevent specific skills from leveling as a solve, but I have some skills that Actor's can use to so that isn't ideal.
Currently the plugin has a parameter to disable level up messages for enemy skills, but not to prevent them from leveling up altogether. That is a nice new feature, though... and I believe it won't be too much work. I'll need to review the code to confirm that, but if it is not a big change, I may add this before officially releasing version 1.2.2.
🙂
Last Question as I'm designed with your plugin in mind, does X Type 1 count purely on Skill Use, or is it also factoring in Hits/Number of targets for that use?
Say if I cast Fire on 3 enemies at once, will that only count as 1 use still?
Type 1 progression (which is Skill Uses) counts how many times the skill has been triggered, regardless of how many targets or how much damage it causes. So with your example, even if the Fire skill targets 3 enemies, it will count a single use.
I'm trying to run a match vs Skill Levels and am pretty sure I need to use the `$gameSystem.hasSkill` script call, however it requires me to add in the actorId. Is there any way you anyone can think of to avoid this or get the script to point to the current actor?
When you use the $gameSystem.hasSkill function, what the plugin really does is use the actor ID passed as parameter to get the actor object and call its hasSkill function. Since you already have an actor variable inside the function you're editing, you can use the actor's hasSkill function directly. So, using your own code example:
JavaScript:
Game_Actor.prototype.checkEquipRequiriments = function(actor, item) {
let result = true;
let reg = /<require\s+([\w\s]*?)>/g;
let match;
while (match = reg.exec(item.note)) {
match = match[1].split(/\s/);
switch (match[0]) {
case "level":
if (result) result = actor.level >= match[1];
break;
...
case "sLevel":
if (result) result = actor.hasSkill(match[1], match[2]);
break;
The actor's hasSkill function has two parameters, one for the skill ID, and another for the required minimum skill level. The level is optional, if not provided it will only check if the skill has been added to the actor's mastery database. So, if you call actor.hasSkill(99, 2), for example, it will return true if the actor has skill 99 in its database with a level equal or higher to 2.