How would I go about limiting the inventory so that the player can only have 9 of any item at any given time, rather than the default 99?
Change Max Item Limit from 99 to 9
RPG Maker MZ SupportGenerally speaking you'd want a plugin for this, e.g.
Alternatively you could just have item count checks in every event that adds an item, set up a loot-bag system or similar for battle drops if necessary, etc.
JavaScript:
/*:
* @target MV MZ
* @plugindesc Set max inventory stack size to 9.
* @author Caethyril
* @url https://forums.rpgmakerweb.com/threads/160268/
* @help Free to use and/or modify for any project, no credit required.
*/
// Override
Game_Party.prototype.maxItems = function(item) {
return 9; // originally 99
};
That works, thank you!
Is there any sufficient way to change equipment types max limit like this? Uh, I mean armor types. I've made it up to 99 since I was creating passive skills like equippable armors.
@mahadeva - this thread is about item stacks in MZ's inventory. The solution I provided should work for MV or MZ, and applies to all Items, Weapons, and Armors.
Your question may be about something different. In that case please make a new thread. 👋
Your question may be about something different. In that case please make a new thread. 👋
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/change-max-item-limit-from-99-to-9.160268/