MZ Restocking Shops

Hello all! I've been working on some things and I'm happy to report it's been going swimmingly well! This isn't so much an issue, but rather a question.

Is there a way to have shops that restock themselves? I'm doing a day-night cycle and I was thinking of introducing shops that can run out of stuff and force the player to wait X amount of days for them to fill. I've seen there's some plugins that do the limited stock aspect (such as Trilobites' and Visustella's One Purchase) but I haven't seen anything about the restocking aspect. How could I go about implementing it?
the Trilobites should be able on restocking on condition.
read the thread or itch page if it does anything on it.

I believe he put it on the thread or on the pages if you didn't read through
them, so you can set the condition of a variable (which could increase per day).

reset it to 0 once out of stock.
Oooh, truly? I didn't see that in their Itch.io page! They did say they could restock, but from their video and what appeared on the page, it reads like it's a fixed frame wait thing!
I'm not sure, but if you wanted to do a restocking system. How I did it in a previous project, is I made it so you could actually walk around and look and the products. (Like potions and stuff on a table) then once you "bought" it. The store owner would replace it with another one. Once he ran out, he would say he was out of stock and you would have to wait for "x" number of minutes and/or hours until he could restock. And since you are doing a day/night system, this would be extremely easy as you would just tie it into that,

Not sure if this would fit with what your asking, but just thought I'd throw it out there.
Oooh, truly? I didn't see that in their Itch.io page! They did say they could restock, but from their video and what appeared on the page, it reads like it's a fixed frame wait thing!
There's an "add stock" plugin command you can use to restock manually.
Oooh! Actually Beans (Fun fact: I have a friend elsewhere with that same username, gave me a good jumpscare xD) I'd like to know how you did that! I have something very similar in mind!

And thank you Trihan, I did find your thread and see you did go a bit more into detail. I saw you responded to somebody who was using a story beat to signal the restock, but how would the restock work in a system like mine?
@AC11 !
WELL! Here goes nothing!

Say you are buying a potion. Set your potion event up like this.
1747086220301.png
1747086253412.png
THEN! Make a simple shopkeeper event with 3 event pages.
1. If it is day and the shop is open and you are talking to him. Put just normal "shopkeeper dialogue" in this one.
Example: "Hey, welcome to my shop!"

2. Make this page have a lot of conditional branches, if the "potion item" needs to be restocked, then use "set movement route" to make him walk over there and put a new one down. (Turning off switch "needPotion"

3. If it is night, and the shop is closed; he will kick you out of the shop. (Assuming you can't shop in the middle of the night. (Make it autorun, so as soon as the shop is closed, he will ask you to leave)

I hope this made sense, ask me if you need me to clarify anything. And if you see this and it's really dumb, sorry. I have the bad habit of WAY overcomplicating events.

Edit: I forgot something!
When you enter the shop, make a parallel event that sets all of the "stock" to full. (For the first time you enter) then make it so every "x" number of days. New "stock" comes in. (Like every 3 days or something.) This is of course assuming that you record the full number of days past. If you are not doing this, idk how you would set this up.
Oooh! Actually Beans (Fun fact: I have a friend elsewhere with that same username, gave me a good jumpscare xD) I'd like to know how you did that! I have something very similar in mind!

And thank you Trihan, I did find your thread and see you did go a bit more into detail. I saw you responded to somebody who was using a story beat to signal the restock, but how would the restock work in a system like mine?
So if you were doing it on a day/night trigger, you'd basically just put an add stock command into your day reset event for each shop that needs to restock, with the items they should be gaining. The stock commands can be used from anywhere, they don't have to be in the shop event itself. You could have an event on a map that restocks a shop three continents away, if you really wanted; the keys are like self switches, so based on map and event ID.
Ah I see! Thank you so much, you guys!

Beans, that sounds really cool. I'll give it a whirl when I get to the parts where this will be implemented. I'm thinking this will be perfect for a market-type scene I have in mind.

And thank you for the explanation Trihan! I'll be sure to give your plugin a go in my next paydate!
Ah I see! Thank you so much, you guys!

Beans, that sounds really cool. I'll give it a whirl when I get to the parts where this will be implemented. I'm thinking this will be perfect for a market-type scene I have in mind.

And thank you for the explanation Trihan! I'll be sure to give your plugin a go in my next playdate!
As much as I'd appreciate you as a customer, I'm honour-bound to point out that if you don't need the automatic restocking functionality, the free version of the plugin should suit your needs just fine. 🙂
Thank you for that Trihan!😍

I'll be sure to support you once I'm able to, anyways! Honesty like that deserves to be rewarded <3<3
Say you are buying a potion. Set your potion event up like this.
you made one mistake here, as you can by lots, even out of gold.
so you must need a check to check the gold, otherwise, the shop decline
of to low money 😉
@ShadowDragon !
Thanks Dude!
Sorry, I just threw this together as an illustration at the last minute!

Original thread: https://forums.rpgmakerweb.com/threads/restocking-shops.177621/