Globally Fluctuating Marketplace using Memorystore

Hello,
sorry in advance if this is hard to understand or too long. It might also belong in Scripting Support, but I decided that it is more of a game design question.

The goal
I want to make a globally affected marketplace. I don’t want players to directly buy and sell items to each other, but rather the amount of items being bought/sold in the past hour/minute to affect the sell and buy prices for it. The reason I want it to be done this way is that I have some items that fit into this category that are very easy to get, and some that are very hard to get. I am not expecting players to buy the easy to get items, but I want selling them to be an option and still be based on pseudo-supply and demand.

Possible method
First of all, is this a good idea at all? I’m not sure if this is a game mechanic I should pursue in the first place. However, after some thought it does seem to me to be the best way to have strategy in buying and selling crops.

One of my ideas is to take the total number of sold goods in the past hour, as well as the total number of purchased goods, and depending on that set a price for them using some math equation (making the number go higher with exponential decay based on less items sold and more bought, and lower based on more items sold and less bought).

The issue with this method is that my game isn’t popular and these numbers will be low most of the time, so I think prices will be really high and overpowered at the start and if the game picked up they would be super inflated and low. I suppose 0 items being sold total could make average prices for all items, but as soon as anything is bought or sold I want the prices to reflect it accurately. My main issue is the edge cases of this scenario.

Is this a good idea to make a system such as this? Is there something I am missing? What would be a good way to go about doing this?
I am open to any suggestions.

1 Like