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.
Putting a maximum on the number of items

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 88
I beat Twilight Princess faster than you
Is there a way to limit the maximum amount of a certain item you can have?

Also, is there a way to make an item stay with you even when you have zero of it? E.g. a container of water. Whenever you get water, the number of containers increases, representing hte amount of water it holds increasing. But when you run out of water, the water container still remains there.

The first question is more important than the second.

First post, woot.

~Arkhan
Current Project ~ Avatar: The Last Airbender RPG
Just as a note, I fully understand variables and switches, so there's no need to treat me like a noob :D

**
Rep:
Level 88
Shut up and leave me alone!
With the water thing, let's say you fill the bucket up at a fountain. Then you would make an event that when you click on the fountain, your items change. It would take away one emtpty bucket, but give you one full bucket. To make it seem as it's the same item when it's really too different items.

I also added a sound in that sounds like water rushing into the bucket as well as a message that says something like, "You have filled your bucket up with water"


*Sorry, I misspelled some things in my little picture, I was rushing!
Hi...

***
Rep:
Level 88
Smarter than the average bear
also note the MAXIMUM amount of items you can have is in the script editor:
In Game_Party  this line here
Code: [Select]
@items[item_id] = [[item_number(item_id) + n, 0].max, 99].min

Change the "99" to whatever you want. If you look further down in the editor you'll see the limits of armors and weapons too.

***
Rep:
Level 89
slate furry thing
To continue what italianstal1ion said- check Scene_Shop too. Otherwise you'll be able to still buy 99 of items but the overflow from the Game_Party maximum will disapear.

Hmm... this makes me think that maybe I could limit normal items to 25 while weapons only 5.