RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Inventory Max-Out Script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 76
RMRK Junior
I would like to make a conditional branch where it detects if x amount of items are in inventory. If x >= (let's say) 50 Then display message "Inventory is Full." Else [Actions here]

How do I do this? Can I do it with a script?

**
Rep: +0/-0Level 76
RMRK Junior
Use Control Variables > Item. Then, use Conditional Branch: <Variable> 50 or lower.
Hope this answered your question!

I actually meant not one item, but all items in inventory. So if all items in inventory >= 50 Then display message = "Inventory full blah blah blah.."

*
Rep: +0/-0Level 83
Do you mean if you have 49 potions and 1 stimulant, the result would be 50? or do you mean 50 different types of items? < .<

If you mean the former, use this scriptlet:

Code: [Select]
class Game_Party
  def item_total
    n = 0
    for i in @items.values+@weapons.values+@armors.values
      n += i
    end
    return n
  end
end
class Game_interpreter
  def item_total
    return $game_party.item_total
  end
end

To use in a conditional branch, just use:

Coditional Branch: Script: item_total >= 50

If you meant types of items, $game_party.items.size is what you'd use.