Dynamic Item Cap

Ruth Studio

Veteran
Veteran
Joined
Oct 19, 2017
Messages
40
Reaction score
20
First Language
English
Primarily Uses
RMMV
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.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,381
Reaction score
8,537
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.


Moved there as it seems you are asking for help with a plugin.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
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);
};
 

Ruth Studio

Veteran
Veteran
Joined
Oct 19, 2017
Messages
40
Reaction score
20
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,545
Members
137,834
Latest member
EverNoir
Top