[FROG] Magic - How to increase the spell slots through a parameter's value?

Hello! I've been using Frogboy's Magic Plugin recently (https://forums.rpgmakerweb.com/index.php?threads/frog-magic-supercharge-your-class-mechanics.99243/), and it' really good!
This plugin allows you to use a Magic system similar to the one used in Dungeons & Dragons, with spells requiring slots to be casted, each spell requiring a different slot level and so on.
There is only one thing that've i been missing though: it is possibile to modify the number of spell slots of an actor by using one of their parameters? Like, for example, could i do that the actor has a number of level 1 spell slots to which i add their Intelligence parameter?
Thanks in advance!
I don't have the time to do a lot of research into the plugin, but I did take a brief glimpse into it, searched for "slot" through the code, and I notice that a lot of functions are working off of a method called getActorMaxSlot.

Code:
FROG.Magic.getActorMaxSlot = function (actor, stypeId) {
    if (typeof actor == "number") actor = $gameActors.actor(actor);
    actor = actor || {};
    stypeId = stypeId || 0;

    // Return Max Spell Level
    var maxSpellLevel = FROG.Magic.getClassMagic(actor, stypeId, "maxSpellLevel");
    if (maxSpellLevel && maxSpellLevel.length >= actor._level) {
        var maxLevel = maxSpellLevel[actor._level - 1];
        if (maxLevel || maxLevel === 0) {
            return maxLevel;
        }
    }

    // Search through Spells Per Day, Spells Known and Spells Retrievable to find Max Slot
    var actorMagic = FROG.Magic.getActorMagic(actor, stypeId);
    if (actorMagic && actorMagic.max && actorMagic.max.length) {
        for (var i=actorMagic.max.length-1; i>=0; i--) {
            if (actorMagic.max[i] > 0) return i;
            if (actorMagic.retrievedMax[i] > 0) return i;
            if (actorMagic.known[i] > 0) return i;
        }
    }

    return -1;
}

You might want to try placing a return of a custom value somewhat early in the method (perhaps before the whole Return Max Spell Level section), and see what happens. For a very simple example, you could do something like:

return actor.agi;

As a more practical example you might do something like:

return Math.floor(actor.agi * 0.05);

which would (theoretically, if this approach works) make an actor's Max Slots equal to one slot per 20 AGI that they have.

This would likely just be a starting point since the script seems to offer a lot of other mechanics that may manipulate/override the slot max, such as "Spells per Day" stuff, and I'd have to spend more time than I have now to be sure whether or not this method is used in the interface where you set spells into slots. But hopefully it gives you a good idea of how you might manipulate this kind of value in that script, and serve as a good start if you want to look into it yourself, or if another scripter can help you.
I don't have the time to do a lot of research into the plugin, but I did take a brief glimpse into it, searched for "slot" through the code, and I notice that a lot of functions are working off of a method called getActorMaxSlot.

Code:
FROG.Magic.getActorMaxSlot = function (actor, stypeId) {
    if (typeof actor == "number") actor = $gameActors.actor(actor);
    actor = actor || {};
    stypeId = stypeId || 0;

    // Return Max Spell Level
    var maxSpellLevel = FROG.Magic.getClassMagic(actor, stypeId, "maxSpellLevel");
    if (maxSpellLevel && maxSpellLevel.length >= actor._level) {
        var maxLevel = maxSpellLevel[actor._level - 1];
        if (maxLevel || maxLevel === 0) {
            return maxLevel;
        }
    }

    // Search through Spells Per Day, Spells Known and Spells Retrievable to find Max Slot
    var actorMagic = FROG.Magic.getActorMagic(actor, stypeId);
    if (actorMagic && actorMagic.max && actorMagic.max.length) {
        for (var i=actorMagic.max.length-1; i>=0; i--) {
            if (actorMagic.max[i] > 0) return i;
            if (actorMagic.retrievedMax[i] > 0) return i;
            if (actorMagic.known[i] > 0) return i;
        }
    }

    return -1;
}

You might want to try placing a return of a custom value somewhat early in the method (perhaps before the whole Return Max Spell Level section), and see what happens. For a very simple example, you could do something like:

return actor.agi;

As a more practical example you might do something like:

return Math.floor(actor.agi * 0.05);

which would (theoretically, if this approach works) make an actor's Max Slots equal to one slot per 20 AGI that they have.

This would likely just be a starting point since the script seems to offer a lot of other mechanics that may manipulate/override the slot max, such as "Spells per Day" stuff, and I'd have to spend more time than I have now to be sure whether or not this method is used in the interface where you set spells into slots. But hopefully it gives you a good idea of how you might manipulate this kind of value in that script, and serve as a good start if you want to look into it yourself, or if another scripter can help you.

I see, i'll look it up then. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/frog-magic-how-to-increase-the-spell-slots-through-a-parameters-value.120663/