I've been working on a project akin to the Uncharted Waters series. If you don't know, this largely involves sailing around the world and trading in various commodities. Sorry if this topic gets complicated but it involves ideas surrounding economics.
I've already created a mechanic to reflect the change of the supply of money in a given port, IE inflation/deflation. It checks a player's gold level coming in and compares it to what it was exiting, then adjusts a port specific variable in Hime's shop manager to change the price of all items in the port to reflect the new abundance or lack of gold in that particular port.
I'd like to do the same thing, but more aggressively but only for the specific item being bought or sold. That is if someone comes and dumps 100 units of wine in london, I want the price of wine to crash, more so than just the general price level that the change in money supply will cause (100 units of wine being sold will cause lots of gold to leave the port, so overall price levels will decline anyway, I just want it to decline for wine specifically more.)
So I thought of one way of doing it...but it seems overly brute force. Any time a player talks to a shop keeper, I would run an event that catalogs their inventory as they enter, then again as they leave. This would basically be like stacking 50 or so fetch quest scipts into the event box twice, since there are about that many commodities. By comparing the two results I would know what goods traded hands. I could then change a variable for local demand of the items that had a big enough change to warrant a price fluxuation in that port. This causes another brute force problem...to store that information I will need about 2500 variables (50 ports x 50 commodities).
Part of me thinks that the inflation/deflation mechanic is good enough and hardly anyone would appreciate the difference if I went down this road for local pricing. But I wanted to check and see if there were any brilliant minds here who can think of a less lengthy way of achieving the same goals. Thanks in advance for your advice.
I've already created a mechanic to reflect the change of the supply of money in a given port, IE inflation/deflation. It checks a player's gold level coming in and compares it to what it was exiting, then adjusts a port specific variable in Hime's shop manager to change the price of all items in the port to reflect the new abundance or lack of gold in that particular port.
I'd like to do the same thing, but more aggressively but only for the specific item being bought or sold. That is if someone comes and dumps 100 units of wine in london, I want the price of wine to crash, more so than just the general price level that the change in money supply will cause (100 units of wine being sold will cause lots of gold to leave the port, so overall price levels will decline anyway, I just want it to decline for wine specifically more.)
So I thought of one way of doing it...but it seems overly brute force. Any time a player talks to a shop keeper, I would run an event that catalogs their inventory as they enter, then again as they leave. This would basically be like stacking 50 or so fetch quest scipts into the event box twice, since there are about that many commodities. By comparing the two results I would know what goods traded hands. I could then change a variable for local demand of the items that had a big enough change to warrant a price fluxuation in that port. This causes another brute force problem...to store that information I will need about 2500 variables (50 ports x 50 commodities).
Part of me thinks that the inflation/deflation mechanic is good enough and hardly anyone would appreciate the difference if I went down this road for local pricing. But I wanted to check and see if there were any brilliant minds here who can think of a less lengthy way of achieving the same goals. Thanks in advance for your advice.