MV Help! [YEP_X_EquipSkillTiers]

I'm trying to find a script call with the same effect as the following notetag:
<Skill Tier 1 Slots: +1>
The reason I can't use a notetag in this situation is because it's for my stat allocation system which also allows players to upgrade the number of skill slots. It is all done in @SomeFire's Skill Tree plugin. Basically, the player "learns" a skill that triggers a common event that contains a script call which increases the player's skill slots for a certain skill tier by +1. The same common event then causes the player to "unlearn" said skill so that he/she can increase skill slots multiple times. I'm not certain, but perhaps one of the following functions is involved?
Spoiler: processESTierNotetags2
JavaScript:
DataManager.processESTierNotetags2 = function(group) {
    var note1 = /<(?:SKILL TIER)[ ](\d+)[ ](?:SLOTS|SLOT):[ ]([\+\-]\d+)>/i;
    for (var n = 1; n < group.length; n++) {
        var obj = group[n];
        var notedata = obj.note.split(/[\r\n]+/);

    obj.equipTierSlot = {
      1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0
    };

        for (var i = 0; i < notedata.length; i++) {
            var line = notedata[i];
            if (line.match(note1)) {
                var tier = parseInt(RegExp.$1).clamp(1, 6);
        obj.equipTierSlot[tier] = parseInt(RegExp.$2);
            }
        }
    }
};
Spoiler: getEquipSkillTierCount
JavaScript:
Game_Actor.prototype.getEquipSkillTierCount = function(tier) {
    var value = 0;
    for (var i = 0; i < this.battleSkillsRaw().length; ++i) {
      if (this.battleSkillsRaw()[i] === 0) continue;
      var skill = $dataSkills[this.battleSkillsRaw()[i]];
      if (skill.equipTier === tier) value += 1;
    }
    return value;
};
Spoiler: getEquipSkillTierMax
JavaScript:
Game_Actor.prototype.getEquipSkillTierMax = function(tier) {
    var value = Yanfly.Param.ESTierMaximum[tier];
    value = value.clamp(0, this.maxBattleSkills());
    value += this.actor().equipTierSlot[tier];
    value += this.currentClass().equipTierSlot[tier];
    for (var i = 0; i < this.battleSkillsRaw().length; ++i) {
      var skill = $dataSkills[this.battleSkillsRaw()[i]];
      if (skill) value += skill.equipTierSlot[tier];
    }
    for (var i = 0; i < this.states().length; ++i) {
      var state = this.states()[i];
      if (state) value += state.equipTierSlot[tier];
    }
    for (var i = 0; i < this.equips().length; ++i) {
      var equip = this.equips()[i];
      if (equip) value += equip.equipTierSlot[tier];
    }
    return value.clamp(0, Yanfly.Param.EBSMaxSlots);
};
Edit: I just tried $gameParty.menuActor().equipTierSlot[1] += 1; but to no avail...
You could avoid mucking about in the code by using states granted by the skill/common event. Yanfly's plugin says the notetag in your title works on states.
There were issues when I tried using multiple states with those notetags. For some reason, the math wasn't checking out. I need to manipulate the number of slots for a specific tier separate from the total number of skill slots.

I ended up using the states method as you suggested, but I had to edit a bit of the plugin's code in order for the math to work as intended. Basically, I had to edit line 379 of YEP_X_EquipSkillTiers.js from:
  • var value = Yanfly.Param.ESTierMaximum[tier];
to...
  • var value = 1;
Anyway, thanks for the states suggestion. With this, I've finally finished my stat allocation system in its entirety, yay!
Hello. 👋
Spoiler: Alternative Solution
Since you're overwriting a function you might as well overwrite that this way:
JavaScript:
Game_Actor.prototype.getEquipSkillTierMax = function(tier) {
    var value = Yanfly.Param.ESTierMaximum[tier];
    value = value.clamp(0, this.maxBattleSkills());
    value += this.actor().equipTierSlot[tier];
    value += this.currentClass().equipTierSlot[tier];
    for (var i = 0; i < this.battleSkillsRaw().length; ++i) {
      var skill = $dataSkills[this.battleSkillsRaw()[i]];
      if (skill) value += skill.equipTierSlot[tier];
    }
    for (var i = 0; i < this.states().length; ++i) {
      var state = this.states()[i];
      if (state) value += state.equipTierSlot[tier];
    }
    for (var i = 0; i < this.equips().length; ++i) {
      var equip = this.equips()[i];
      if (equip) value += equip.equipTierSlot[tier];
    }
    value += this._customESTslot[tier] || 0; // add this line
    return value.clamp(0, Yanfly.Param.EBSMaxSlots);
};

Then in your common event script call:
JavaScript:
var tier = 1;    // skill tier; modify as necessary
var user = $gameParty.menuActor();
if (!user._customESTslot) user._customESTslot = [0, 0, 0, 0, 0, 0, 0];
user._customESTslot[tier] += 1;
Use an array of size 7 so you don't have to worry about index numbers.
Spoiler: NOTES
Edit: I just tried $gameParty.menuActor().equipTierSlot[1] += 1; but to no avail...
This is because equipTierSlot isn't attached to the actual actor object but rather the associated database entry of that actor.

Original thread: https://forums.rpgmakerweb.com/threads/help-yep_x_equipskilltiers.147996/