Simple Item Limit

I looked around for a tutorial on this and even a plugin but no luck, hopefully this workaround will solve some issues but it's not perfect. I bet Yanfly will be creating an Item Limit plugin in the future at some point but for now here's a simple common event to get those of us who want that kind of thing by.

Spoiler
First you'll need to create the item you want to limit, in my case it was Iron Ore but anything that's already there is just as good.

Iron Ore.PNG

Next you'll need to create a common event

1. Set up the Variable 

Ore Vari.PNG

2. Next you'll need to create a conditional branch that will take notice when your number of Iron Ore goes above 20

Ore condi.PNG

3. The next step is filling in the details below which are pretty simple. Just make text that says you can't carry that much of x item and decrease it's value by one. Receiving the item in bulk causes the script to repeat until the number is reduced to the one you specify but it should never be more than 2 or 3.

item limit.PNG

It's as easy as doing the same for other items you want to limit or even making a carry basket of some sort so that the item can't even be picked up the first place unless they have it...

Like I said this is a simple workaround until Yanfly or someone else works on a better way but I can't Jave Script to save my life so I settled with this.

Hope this helps some people and if you have questions I'm happy to answer them 😀
There's a note-tag in Yanfly's YEP Core to set a maximum number of items, <Max Item: X>.
Ah I see, well not everyone will want to use item plugins so I'll keep it here
There's a note-tag in Yanfly's YEP Core to set a maximum number of items, <Max Item: X>.
Sorry if this is a dumb question, but does this mean you can limit a specific item or is this a general limit on all items?
Itemcore by yanfly works really well, you just add which items u want to stack and which ones don't then limit the max items held. though, it does count key items, not sure how to change that.
There's a note-tag in Yanfly's YEP Core to set a maximum number of items, <Max Item: X>.

I seem to be having issues with Yanfly's item limit. I enter the item limit yet my character can still exceed the limit... I have no clue how to fix this problem and no forums have shown an answer to a similar issue.
the notetage <Max Item: x> is placed in the Items notetags,
if you have a potion for max 20, than put it in the potion notetage field <Max Item: 20>

the param might be the default for all items, but notetags restrict the limit of that item itself.
the notetage <Max Item: x> is placed in the Items notetags,
if you have a potion for max 20, than put it in the potion notetage field <Max Item: 20>

the param might be the default for all items, but notetags restrict the limit of that item itself.

So I've been testing it a ton and I now figured out my restrictions. When given items from enemies and events (chests) they will forcibly push me over the item limit (I'm assuming to avoid breaking game or something) however when purchasing items from the shop, it will indeed prevent you from going over the limit.

Also I put the <Max Item: x> in multiple notetags for multiple items and they did not restrict the limit for those items at all, so as of right now the only way to do such is to have a total limit from the plugin manager, and then remove any item drops from chests and enemies if I want to ensure that the limit is never exceeded.

I've been at this for hours, upon hours. I don't think it is possible to make such a limit at this point.
if it doesn't work, and the note tag is correct, there is another plugin conflicting it,
yo should turn off all plugins and only core engine and see if it works, if it does,
turn of the plugins 1 by 1 untill it stops working to find the culprit.
if it doesn't work, and the note tag is correct, there is another plugin conflicting it,
yo should turn off all plugins and only core engine and see if it works, if it does,
turn of the plugins 1 by 1 untill it stops working to find the culprit.


I figured out my problem. Also, just to note I was trying to do all of this with Item Core not Core Engine.

I didn't have core engine plugged in, and now I realize that Item Core isn't even necessary with CoreEngine to do what I was trying to accomplish.

Needless to say that with Core Engine, I get the ability to stack items and limit items as intended. Thanks for the help!
I actually was thinking of doing this myself in my game. So thank you for sharing another option outside of using a plugin! The pictures are a great help too since I'm a visual person when it comes to learning. It's also good to know too that there is a plugin that gives the same result.

The more options the better. ♥

Original thread: https://forums.rpgmakerweb.com/threads/simple-item-limit.53403/