Limited Inventory

No need for a script unless you're trying to set different limits for each type of item or something like that. All of the RPG Makers already provide what you need (with a default limit of 99) - just go into the script editor and change a single number.

For example, in VX Ace, the method is in Game_Party:

#--------------------------------------------------------------------------
# * Get Maximum Number of Items Possessed
#--------------------------------------------------------------------------
def max_item_number(item)
return 99
end

Just change 99 to 20 and voila.

Even if you want to set individual limits for a few items, that can be done very easily inside this method, since "item" is already being passed in. Check item.id in a "case"-type branch or even a series of "if" statements, and return different values based on the item.id and you're good!
No need for a script unless you're trying to set different limits for each type of item or something like that. All of the RPG Makers already provide what you need (with a default limit of 99) - just go into the script editor and change a single number.

For example, in VX Ace, the method is in Game_Party:

#--------------------------------------------------------------------------
# * Get Maximum Number of Items Possessed
#--------------------------------------------------------------------------
def max_item_number(item)
return 99
end

Just change 99 to 20 and voila.

Even if you want to set individual limits for a few items, that can be done very easily inside this method, since "item" is already being passed in. Check item.id in a "case"-type branch or even a series of "if" statements, and return different values based on the item.id and you're good!
Woah! I didn't know that!
@Wavelenght
That is interesting
I didn't know it since I'm new to VXAce.
I can do it since I know Ruby.

Thank you too much.

Original thread: https://forums.rpgmakerweb.com/threads/limited-inventory.90215/