How to change max amount of item slots?

Hello! By title, you may already understand the question uwu
I wanna to change the maximum amount of item slots, but not the item "stacks".
Is there any way to do this? Thanks! <3
Are you already using any inventory scripts or is this for an out-of-the-box VX Ace?
No, i dont use any inventory scripts right now, just default inventory from rpg maker.
Does VX Ace even have a maximum number of item slots? The only max I'm aware of is the 99 for individual item counts.
Yea! Thats exactly why i'm asking, actually. I sure there's may be some way, with script or without it.
Oh wait, so you want to *add* a limit to the number the party can hold, not remove one! Right?
Omg, you got me right!
Sorry, i may sound confusing, mostly because english isnt my first language and i dont sure how to show my questions sometimes uwu
So you know a way??
Add this as a new script.

Code:
Game_Party.class_eval do
  def max_item_slots
    return 5
  end

  alias_method :tlb_gain_item, :gain_item
  def gain_item(item, amount, include_equip = false)
    if all_items.count >= max_item_slots
      $game_message.add("Unable to gain " + item.name + ", insufficient inventory\nspace.")
      return false
    end
    tlb_gain_item(item, amount, include_equip)
  end
end

Change 5 to whatever number you want to limit the party to, and you can change the message as well if you want.

(note that this uses all_items, which will include equipment. It will need a slight tweak if you only want to limit non-equippable items)
You can also use yanfly adjust limits script, but it doesn't have that nice message.
Yanfly's Adjust Limits script only allows you to change the stack size; it doesn't have anything for limiting inventory slots.
limiting inventory slots
Oh, Didn't read you script properly. The conversation was a little confusing and I thought he wanted item limit.

Didn't thing there was a slot limit. Very cool
Yea, even if it may include equipment - its totally fine!
Thank you so much guys!! <3

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-max-amount-of-item-slots.123353/