Limited number of items in shop stock

Hello all

I am looking for a way to limit the item in stock for my shops for a game that revolves around trading. So I can go into a shop and there is 1 copy of a book and I can only buy that 1 copy then its out of stock.

I know there is a Himi Works script that does it, but that does lots of things I dont need.

There is also a Galv script which does even more that I dont need.

I could also do with a way of randomly generating stock. Say a shop is capable of stocking 5 different items, but it might randomly generate 2 of an item and 1 of a different item and the rest is out of stock.

I know I could use an event so that you go into a shop and can buy something by talking to the owner, but I would rather use the shop interface.

I guess its one of those things that sounds easier then it is, but any help is greatly appreciated.
In all cases, you'll need a script for this it is not possible to limit shop stock in default - and the most commonly used scripts for this option you already know.


Please give more details why you can't use those scripts, then someone else can make you another one.


I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.
Both of the methods I know, Himeworks and Galv scripts, offer lots of additional features I just dont want or need.

Could some one help with a tiny script that just limits items in a shop?
If you buy a book from one shop, does that mean other shops are now out of stock as well?


Or does the limitation only apply to that specific shop?


If you require limitations for each and every shop, individually, then the script would need to also know how to distinguish one shop from another.
I want to say that the Community Resource Pack for steam has a store limit script in there. If not there's definitely one in the DS resource pack. 
Thanks for both of your replies.

Tsukihime - If I sell a book in one place, I still want another store to carry the book.

Uzuki - I will look at the community resource pack first, if theres nothing in that I will opt for the DS pack.
Actually I might be missing something, but I bought the DS pack and but I cant find a item stock limit script in there.
Pondis, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

If you want to add something, please just edit your previous post.

To get the script : In the Resource Pack, there is a folder 'Scripts'  In there is Zalerinian's demo which contains the shop script.  Open it up in your editor and you will see the script and how to use it.
Sorry, didnt mean to keep filling the thread.

So I bought DS+ pack, found the game and the script Shops but it only sets whether a shop will buy what it sells, or will buy anything. I want to limit the amount of items the shop has in stock.

Am I missing some other script in there? 

Original thread: https://forums.rpgmakerweb.com/threads/limited-number-of-items-in-shop-stock.42749/