MZ Trying to create a Usage-Based Experience System

I don't know what I'm doing at all, but gosh darn I'm a big proponent of throwing yourself into the deep end, so I'm trying to write a plugin pretty much without any understanding of what I'm actually accomplishing. I think I'm close to making it so that you get skill experience every time you use a skill, but so far I'm getting nothing. If somebody could help point me towards the right direction (if I'm even doing it right), I'd really appreciate it.

JavaScript:
// Skill System //

(function() {
//======================================================================//

var _Scene_Boot_start = Scene_Boot.prototype.start;
Scene_Boot.prototype.start = function() {
  _Scene_Boot_start.call(this);
  DataManager.processSkillEXP();
};

DataManager.processSkillEXP = function() {
  for (var i = 1; i < $dataSkills.length; i++) {
    var skill = $dataSkills[i];
      skill._skillEXP = Number();
  }
};

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  return skill._skillEXP
};

Game_BattlerBase.prototype.Current_Skill_Exp = function(skill) {
  return this.Skill_EXP(skill);
};

Game_BattlerBase.prototype.Change_Skill_EXP = function(skill) {
    return this._skillEXP += 16;
};

// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target) {
  return this.subject().Change_Skill_EXP
};

Game_Action.prototype.apply = function(target) {
    const subject = this.subject()
    const result = target.result();
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(subject)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};


//======================================================================//
})();

Quick addendums: I'm currently using the skill cost spot to show me the skill experience, and I know you can integrate functions into already existing code, so I do plan on cleaning up the Game_Action.prototype.apply function.
This is in no way to discourage you, but is this endeavor for fun or because you couldnt find a skill leveling plugin you liked?
I don't know what I'm doing at all, but gosh darn I'm a big proponent of throwing yourself into the deep end, so I'm trying to write a plugin pretty much without any understanding of what I'm actually accomplishing. I think I'm close to making it so that you get skill experience every time you use a skill, but so far I'm getting nothing. If somebody could help point me towards the right direction (if I'm even doing it right), I'd really appreciate it.

JavaScript:
// Skill System //

(function() {
//======================================================================//

var _Scene_Boot_start = Scene_Boot.prototype.start;
Scene_Boot.prototype.start = function() {
  _Scene_Boot_start.call(this);
  DataManager.processSkillEXP();
};

DataManager.processSkillEXP = function() {
  for (var i = 1; i < $dataSkills.length; i++) {
    var skill = $dataSkills[i];
      skill._skillEXP = Number();
  }
};

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  return skill._skillEXP
};

Game_BattlerBase.prototype.Current_Skill_Exp = function(skill) {
  return this.Skill_EXP(skill);
};

Game_BattlerBase.prototype.Change_Skill_EXP = function(skill) {
    return this._skillEXP += 16;
};

// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target) {
  return this.subject().Change_Skill_EXP
};

Game_Action.prototype.apply = function(target) {
    const subject = this.subject()
    const result = target.result();
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(subject)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};


//======================================================================//
})();

Quick addendums: I'm currently using the skill cost spot to show me the skill experience, and I know you can integrate functions into already existing code, so I do plan on cleaning up the Game_Action.prototype.apply function.
Before I help you with this, could you please just clarify for me whether you wrote the code in its entirety yourself or whether it was obtained from an AI chat prompt?
Is it that bad? No, I'm writing it myself by looking at other plugins and the core script and trying to figure out how what works in those would work in mine.

This is in no way to discourage you, but is this endeavor for fun or because you couldnt find a skill leveling plugin you liked?

Both. I want a skill leveling plugin that works exactly like how I want it. I was able to Frankenstein up a pretty solid version of what I want in VX Ace using a couple of scripts from Himeworks and Fomar.

I've made some adjustments.

JavaScript:
// Skill System //

(() => {
//======================================================================//

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  const skillexp = Number();
  return skill._skillEXP = skillexp
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return this.Skill_EXP(skill);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill) {
    return this._skillEXP += 16;
};

// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target) {
  if (this.subject().isActor()) {
    this.subject().Change_Skill_EXP()}
};

Game_Action.prototype.apply = function(target) {
    const result = target.result();
    const subject = this.subject()
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(subject, value)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};


//======================================================================//
})();

It's not crashing, but it's not doing anything.
Take a peek at this plugin and see if it suits your needs:




Also be careful with double posting. It reaaaaallly pisses off the mods lol
Are you writing the script to help in learning Java? Because if not, I'm pretty sure you can make work-around via common events, variables, formula tweaking and conditional branching. Granted, it'd be pretty rough and I'm not sure if all the mechanics would also exist in MZ (I have yet to purchase MZ) but I'd be happy to help if you ever need help with that (or other complex eventing)
No, I'm pretty sure I want to make this myself.
I think it's cool that you're working on learning this; once it starts making sense, you can get the engine to do pretty much anything, but it can be a lot to wrap your head around at first (I know, because my head is still not wrapped).

I would suggest downloading that TAA plugin from up yonder ^ and taking a look at what makes it tick. Definitely don't copy from it (plagiarism is pretty icky), but without having looked at it myself, if it's doing the same thing you're trying to do and verifiably working, it might help you get an idea of how to go forward. My skills in this area are pretty weak, so I don't want to offer a bunch of things that somebody else will just have to correct me on later, but just comparing my trash to something that I know works has helped me unravel some problems that are actually outside of my skill set.

Finally, this:
Before I help you with this, could you please just clarify for me whether you wrote the code in its entirety yourself or whether it was obtained from an AI chat prompt?
AI is pretty advanced these days (at least compared to the chatbot I made in C fifteen years ago or whatever), but don't trust it to write code. I work on a pretty major Large Language Model AI that boasts being able to generate code, but my personal experience is that fixing whatever it spits out is more work than figuring out how to do it right in the first place, especially in a specific context like this.

There is some good news: the same cool dude I quoted has a really legit and thorough tutorial on using JS in RMMV...which is different from RMMZ, but there's enough overlap that it could be really useful to run through.

Edit: To emphasize the last point, the post for that plugin says it works for MV and MZ, so don't discount learning things from the previous RM iteration.
Is it that bad? No, I'm writing it myself by looking at other plugins and the core script and trying to figure out how what works in those would work in mine.
Okay, if there was no AI involved I'll happily help you.

1. Change_Skill_EXP takes skill as a parameter, but when you call it in Apply_Change_Skill_EXP you aren't providing an argument to it, so it has no reference for what skill to use.

2. When you call Apply_Change_Skill_EXP, you're sending both "subject" and "value" to it as arguments, but the function only takes "target" as a parameter, so value isn't doing anything.

3. This part needs a major rework:

JavaScript:
Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  const skillexp = Number();
  return skill._skillEXP = skillexp
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return this.Skill_EXP(skill);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill) {
    return this._skillEXP += 16;
};

So Skill_EXP is creating a variable called skillexp with a value of Number() (which will always be 0, because that's the default value of the Number constructor) then returning skill._skillEXP = skillexp.

So you're setting the skillEXP property of the skill to 0, then returning it. Returning it is pointless here because nothing needs to use the value afterwards, but what's even worse is that you're modifying a direct property of a data object, so that will change the skillEXP on the skill for any party member that might use it, and also if you change the value in one playthrough then load a save in the same game session, the changed value will still be the same because data objects come from the json files and not the save game.

So then you have Current_Skill_Exp, which returns this.Skill_EXP(skill). So we're calling the same problematic function and returning its value to a caller that does nothing with it.

Then Change_Skill_EXP, which returns this_skillEXP += 16.

Okay, so in that function, "this" is a Game_Actor instance, so this._skillEXP is referencing a property called _skillEXP on the actor. But this is a single value, and you're not using the "skill" parameter here at all, so it's just a single, static value on an actor that will never be associated with any particular skill. This needs to be an array so that you can store a separate value for each skill they use.
Okay, if there was no AI involved I'll happily help you.

1. Change_Skill_EXP takes skill as a parameter, but when you call it in Apply_Change_Skill_EXP you aren't providing an argument to it, so it has no reference for what skill to use.

2. When you call Apply_Change_Skill_EXP, you're sending both "subject" and "value" to it as arguments, but the function only takes "target" as a parameter, so value isn't doing anything.

3. This part needs a major rework:

JavaScript:
Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  const skillexp = Number();
  return skill._skillEXP = skillexp
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return this.Skill_EXP(skill);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill) {
    return this._skillEXP += 16;
};

So Skill_EXP is creating a variable called skillexp with a value of Number() (which will always be 0, because that's the default value of the Number constructor) then returning skill._skillEXP = skillexp.

So you're setting the skillEXP property of the skill to 0, then returning it. Returning it is pointless here because nothing needs to use the value afterwards, but what's even worse is that you're modifying a direct property of a data object, so that will change the skillEXP on the skill for any party member that might use it, and also if you change the value in one playthrough then load a save in the same game session, the changed value will still be the same because data objects come from the json files and not the save game.

So then you have Current_Skill_Exp, which returns this.Skill_EXP(skill). So we're calling the same problematic function and returning its value to a caller that does nothing with it.

Then Change_Skill_EXP, which returns this_skillEXP += 16.

Okay, so in that function, "this" is a Game_Actor instance, so this._skillEXP is referencing a property called _skillEXP on the actor. But this is a single value, and you're not using the "skill" parameter here at all, so it's just a single, static value on an actor that will never be associated with any particular skill. This needs to be an array so that you can store a separate value for each skill they use.

Okay, so I think I've made some edits in line with what you're saying. I don't quite get what you mean by turning Change_Skill_EXP into an array, though.

JavaScript:
// Skill System //

(() => {
//======================================================================//

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  return skill._skillEXP = [];
};

Game_BattlerBase.prototype.skillEXP_Growth = function(value) {
  return 1 * this.userskillexpmult;
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return Math.max(this.Skill_EXP(skill), 0);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
    return this._skillEXP += 16;
};

// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target, subject, skill, value) {
  if (this.subject().isActor()) {
    this.subject().Change_Skill_EXP() * (100 * target.targetskillexp)}
};

Game_Action.prototype.apply = function(target) {
    const result = target.result();
    const subject = this.subject()
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(subject, value)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};


//======================================================================//
})();

Ignore userskillexpmult and targetskillexp, those are parameters I've defined in another plugin. They're just elemental rates I've given names to.
Okay, so I think I've made some edits in line with what you're saying. I don't quite get what you mean by turning Change_Skill_EXP into an array, though.

JavaScript:
// Skill System //

(() => {
//======================================================================//

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  return skill._skillEXP = [];
};

Game_BattlerBase.prototype.skillEXP_Growth = function(value) {
  return 1 * this.userskillexpmult;
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return Math.max(this.Skill_EXP(skill), 0);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
    return this._skillEXP += 16;
};

// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target, subject, skill, value) {
  if (this.subject().isActor()) {
    this.subject().Change_Skill_EXP() * (100 * target.targetskillexp)}
};

Game_Action.prototype.apply = function(target) {
    const result = target.result();
    const subject = this.subject()
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(subject, value)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};


//======================================================================//
})();

Ignore userskillexpmult and targetskillexp, those are parameters I've defined in another plugin. They're just elemental rates I've given names to.
Okay, you want each skill to have its own experience point value, right?

But the way you've coded it, there is a single _skillEXP property on the actor, so you can only ever have one single experience value that's shared across all skills. You need to create what's called an array, which is a type of object that can hold multiple values in a single variable.
Something like this perhaps
JavaScript:
Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  this._skillEXP ||= [];
  return this._skillEXP[skill.id]
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return Math.max(this._skillEXP[skill.id], 0);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
    this._skillEXP ||= [];
    return this._skillEXP[skill.id] += value;
};
Something like this perhaps
JavaScript:
Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  this._skillEXP ||= [];
  return this._skillEXP[skill.id]
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return Math.max(this._skillEXP[skill.id], 0);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
    this._skillEXP ||= [];
    return this._skillEXP[skill.id] += value;
};

I'm still getting errors
1690188908867.png
I'm still getting errors
View attachment 270494
On what line?

1690189650421.png

You're still calling Change_Skill_EXP without providing a value to the skill parameter, and

1690189673266.png


Your parameter list for Change_Skill_EXP is target, subject, skill, value; so you're currently putting "value" into the "subject" variable.
1690189873819.png

2036 of rmmz_managers
Can you show the stacktrace from the console?
I'm still getting errors
You need to show your code...nothing that TheoAllen gave you has a property of 3.

I know you said you like to jump into the deep end, but I would suggest that you back up and just do some basic tutorials. You doing this without understanding any of the syntax or terminology is like coming into your first piano lesson and saying "I don't know how to read music, which is my first finger, or what the notes on the keyboard are. Teach me to play the Moonlight Sonata."

I'm not going to speak for Trihan or TheoAllen who are trying to help you, and saying this with all kindness: but reading this thread seems like it's a waste of everyone's time. You could've spent a small fraction of the 5 hours between Trihan's post and yours doing a w3schools tutorial to learn about what arrays are.
You need to show your code...nothing that TheoAllen gave you has a property of 3.

I know you said you like to jump into the deep end, but I would suggest that you back up and just do some basic tutorials. You doing this without understanding any of the syntax or terminology is like coming into your first piano lesson and saying "I don't know how to read music, which is my first finger, or what the notes on the keyboard are. Teach me to play the Moonlight Sonata."

I'm not going to speak for Trihan or TheoAllen who are trying to help you, and saying this with all kindness: but reading this thread seems like it's a waste of everyone's time. You could've spent a small fraction of the 5 hours between Trihan's post and yours doing a w3schools tutorial to learn about what arrays are.
JavaScript:
(() => {
//======================================================================//


Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  this._skillEXP ||= [];
  return this._skillEXP[skill.id]
};

Game_Actor.prototype.Current_Skill_Exp = function(skill) {
  return Math.max(this._skillEXP[skill.id], 0);
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
    this._skillEXP ||= [];
    return this._skillEXP[skill.id] += value;
};


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
return this.drawText(this._actor.Current_Skill_Exp(skill), x, y, width, "right");
};

})();

Yeah I'm getting the error even with just this script turned on and nothing else.

EDIT: the 3 is coming from the skills list. I use skill 3 as a divider. When I removed that, it moved to the next available skill.

EDIT 2: Okay, progress. I put "this._skillEXP = []" into the initMembers call, and now the game doesn't crash when loading up the skill scene. It does, however, show the Skill Experience as NaN, which is like the exact opposite of what I wanted.

JavaScript:
// Skill System //

(() => {
//======================================================================//

Game_BattlerBase.prototype.Skill_EXP = function(skill) {
  this._skillEXP ||= [];
  return this._skillEXP[skill.id]
};

Game_Battler.prototype.initMembers = function() {
    Game_BattlerBase.prototype.initMembers.call(this);
    this._actions = [];
    this._speed = 0;
    this._result = new Game_ActionResult();
    this._actionState = "";
    this._lastTargetIndex = 0;
    this._damagePopup = false;
    this._effectType = null;
    this._motionType = null;
    this._weaponImageId = 0;
    this._motionRefresh = false;
    this._selected = false;
    this._tpbState = "";
    this._tpbChargeTime = 0;
    this._tpbCastTime = 0;
    this._tpbIdleTime = 0;
    this._tpbTurnCount = 0;
    this._tpbTurnEnd = false;
    this._skillEXP = [];
};

Game_Actor.prototype.Change_Skill_EXP = function(skill, value) {
  this._skillEXP ||= [];
  return this._skillEXP[skill.id]++
};

Game_Actor.prototype.Current_Skill_EXP = function(skill) {
  return Math.max(this._skillEXP[skill.id], 0);//Math.max(this._skillEXP[skill.id], 0);
};


// =============
// Apply Skill Experience
// =============

Game_Action.prototype.Apply_Change_Skill_EXP = function(target, skill, value) {
  if (this.subject().isActor()) {
    this.subject().Change_Skill_EXP(skill)}
};

Game_Action.prototype.apply = function(target, skill) {
    const result = target.result();
    const subject = this.subject()
    this.subject().clearResult();
    result.clear();
    result.used = this.testApply(target);
    result.missed = result.used && Math.random() >= this.itemHit(target);
    result.evaded = !result.missed && Math.random() < this.itemEva(target);
    result.physical = this.isPhysical();
    result.drain = this.isDrain();
    if (result.isHit()) {
        if (this.item().damage.type > 0) {
            result.critical = Math.random() < this.itemCri(target);
            const value = this.makeDamageValue(target, result.critical);
            this.executeDamage(target, value);
            this.Apply_Change_Skill_EXP(skill, value)
        }
        for (const effect of this.item().effects) {
            this.applyItemEffect(target, effect);
        }
        this.applyItemUserEffect(target);
    }
    this.updateLastTarget(target);
};

// =============
// Draw Skill level
// =============


const SLvl = ["", "Lvl. 1", "Lvl. 2", "Lvl. 3", "Lvl. 4",
              "Lvl. 5", "Lvl. 6", "Lvl. 7", "\u2605 MAX!"];


Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) {
  return this.drawText(this._actor.Current_Skill_EXP(skill), x, y, width, "right");
};


//======================================================================//
})();

But hey, every time it doesn't crash probably means I'm getting closer. Probably.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-create-a-usage-based-experience-system.159602/