Dynamic Item Cap

Hey everyone,

I am aware of yanfly item Cap limit. I understand you can just add a fixed number. Is there a way to customize this? For an example, if the player is level 2 therefore the new Max will be change to 2. It'll increase as your level increases. I think I tried everything with no success.

I've moved this thread to Plugin Support. Thank you.


Moved there as it seems you are asking for help with a plugin.
Thank you. How can I use this to change the Max Item to match the player's level?
Thank you. How can I use this to change the Max Item to match the player's level?

I don't know how you want it but something like this would work probably? Put as plugin high on list or whatever. Actor 1 level ups increases maxItems by 1
Code:
Game_Actor.prototype.levelUp = function() {
    this._level++;
    if (this._actorId === 1) {
        $gameSystem._maxItems += 1
    }
    this.currentClass().learnings.forEach(function(learning) {
        if (learning.level === this._level) {
            this.learnSkill(learning.skillId);
        }
    }, this);
};
I don't know how you want it but something like this would work probably? Put as plugin high on list or whatever. Actor 1 level ups increases maxItems by 1
Code:
Game_Actor.prototype.levelUp = function() {
    this._level++;
    if (this._actorId === 1) {
        $gameSystem._maxItems += 1
    }
    this.currentClass().learnings.forEach(function(learning) {
        if (learning.level === this._level) {
            this.learnSkill(learning.skillId);
        }
    }, this);
};
I'll try this. I was hoping to use the existing plugin, add in the notetag <Max item: game players level>. But the engine doesn't register the the actors level.

Original thread: https://forums.rpgmakerweb.com/threads/dynamic-item-cap.119133/