It is all so confusing to me, but it does not seem to be affecting any other yields than the one sold.
It is renamed Mercantile Percent in the code.
It is then smashed together with Yield Bought Total, so that Yield Bought Total ends up a meager percentage of itself, nothing total about it whatsoever.
Yield Bought Total is then included in the formula that I tried to explain last week.
Could you give an example of the perfect supply and demand based system in Europe? I need some kind of mental-picture-priming to wrap my brain around how to set it up. I am a 'can only steer a moving vessel' kind of person, so I need something to work with to get myself reacting and adjusting or there is just nothing up there. I throw formulas, values and numbers at the wall hoping that something sensible comes out of my own reaction to it.
I really like the 'can only steer a moving vessel' expression. I am often the same way, I'm going to borrow that.
I have thoughts on the perfect supply & demand system, but I'd like to better understand what is currently happening so hopefully we can tap into that instead of reinventing things from scratch. Based on what you said above, I think this is the current formula:
Code:
YieldBoughtTotal
------------------------------- = X
iPriceChangeThreshold
X + iBuyPriceLow + RANDBETWEEN(iBuyPriceHigh,(iBuyPriceLow + 1)) = Y
((iPriceCorrectionPercent * Y) - iBuyPriceLow) > RANDBETWEEN(1,100) = Price Change
I did more testing using the base WTP mod. I was wrong, the price of individual goods does change more if you sell that specific good. But there is quite a bit of overall change. In my test, over the course of 260 turns I sold 9,600 fur, 6,000 silver and 6,000 exotic wood. I bought 6,000 tools and 3,000 everyday clothes.
After all that, 13 goods increased in price from turn 1 (all increased by 1), 16 goods stayed (or went back to) the same price they started with, and 70 goods dropped in price.
Of those 70, 17 only dropped by 1. 30 dropped by 2. 17 dropped by 3, and 6 dropped by 4 or more with a drop of 7 from silver being the largest. Note that the iPriceCorrectionPercent value for all goods is 1 except gold & gems (where it is 0) and silver (where it is 5). 19 goods dropped to their minimum.
Strangely, after buying 10 galleons full of tools it had no impact on the price of tools whatsoever.
I also did a trial where I traded absolutely nothing for 260 turns, just hit enter. In that trial, 13 goods increased in price (all increased by 1), 38 goods stayed the same, and 48 decreased in price. Of those that dropped in price, 37 dropped by just 1, and 11 dropped by 2.
For these tests I removed all AI players, so there was no bleed over effect of the AI trades.
I guess doubling Europe sell prices won't work unless we also double the Africa prices, and then we are back at square 0. There is
EUROPE_MARKET_CORRELATION_PERCENT in GlobalDefinesAlt which will cause the prices to drop when flooding a market with a yield. Maybe keeping it a bit higher is good enough. Once the prices have tanked and the Natives have run out of money, we have no choice but to crawl to the king and pay him to lift an embargo here or there.
I found a comment from ray on Discord about this, he said that each European port for each player is separate from the others, but the EUROPE_MARKET_CORRELATION_PERCENT value is how the different markets affect each other. I'm not sure where that value is called, and how it is factored into the above formula, but it seems like a good thing that each port is separate, but can affect each other's prices a bit.
Other questions I have. Where is the Dutch mercantilism trade factored in? There is something in Global Defines linking the price of a raw good to the manufactured good, when does that enter the equation? The above formula results in a "price change" but what decides whether it changes the price up or down? Also, the numerator in that equation is goods sold (to Europe) is there nothing that considers goods bought in Europe?