“Growing” shop

Hi I had a question about how to make like a growing shop I’m sure it’s not a unique idea and someone has accomplished this.

For example if a shop sells a potion after the potion is purchased the next time they visit they will sell a greater potion.

I want to give the impression that the shop owner took the money and invested it into better items.

I haven’t been able to figure out how to make this happen.
Moved to: MZ Support
One simple-ish way could be to save the money the player has before opening the shop scene in a variable and another variable for the money after the shop scene. If the player has less money then subtract the before money variable with the after variable. What remains is what the shops profit. Then add that value to the variable that represents how much money the player has spent at the shop.
Use the variable to set up conditional branches that opens more and more upgraded shops.
One simple-ish way could be to save the money the player has before opening the shop scene in a variable and another variable for the money after the shop scene. If the player has less money then subtract the before money variable with the after variable. What remains is what the shops profit. Then add that value to the variable that represents how much money the player has spent at the shop.
Use the variable to set up conditional branches that opens more and more upgraded shops.
Thanks! Im gonna give this a try tonight!
unless the shop only sold 1 item, saving the amount of gold may not be effective. What if you buy a different item? What if you sell items?

You could make use of a plugin.
http://www.yanfly.moe/wiki/Shop_Common_Events_VisuStella_MZ
Okey nice! I have the subscription to yanfly. I take a look at this. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/growing-shop.141294/