HomeDevelopment Log

Check this forum to see the progress of the game development

Buying and Selling Issues improved Messages in this topic - RSS

Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/23/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
We made some tweaks to buying and selling in the code that should mitigate a lot of the problems we have been seeing in crowded situations. Also a few tragic bugs. First a quick primer on how overcrowded buyers/sellers at a location worked:

Pretend there is a city with a popular product everyone wants to buy with a volume of 100 , lets say Water

3 ships are there trying to by it at the same
a Transport with 4000 cargo available
a Ship with 900 cargo available
a Scout that has 100

Your units "Buy/Sell Power" is determined by how much available cargo space they have, it's actually however much you are attempting to legally buy. For structures there is actually a listed Buy Sell power based on their level. The volume in the city for water is only 100, thats the most it will sell in one turn, and there is a total of 5000 BS Power trying to buy it. So the 100 is split up by the relative BSPower of all the units

4000 = 80%
900 = 18%
100 = 2%

So they will buy 80,18 and 2 units respectively. The problem is that the scout is barely taking anything and will take 50 turns at this rate. Even worse, as the cargo fills up, especially on that small scout, his BSPower becomes less and less, it's your "Available" cargo space, how much you CAN buy and if that is 4 units then that's your BS power. When its cargo goes to 99 hes goign to get a fraction wich is dropped and will take 1 unit for 50 turns, and as soon as his cargo fills up past that hes going to get a fraction of one unit which is dropped to 0. Once that happens his order is moves to the next one.

On top of this there were a couple bugs where if say a structure was trying to buy 1000 units at this location also, but couldn't afford it, his 1000 BSpower was still being added to the split against everyone else making the total available to buy much less then it was. On top of THAT problem, the cost of your buy was being calculated against your maximum cargo which is probably 5000 even though your only going to get 100 at most this caused the not enough funds messages to popup a lot more often then they should.

A lot of problems that we never saw in 4 months of Beta testing =)

So here are the changes besides the bug fixes:

Your BS power is reduced to your available cargo space already, that can't be changed, but your BS power is now also reduced to the Volume of the product you are trying to buy if its less than that. So in this city example above, everyone would come in at BSPower of 100 at most, that's the max volume of the product, less than that is your available cargo is lower. They will all split on that BSPower and this will make all 3 of those ships all buy evenly at 34 units (Buy fractions are rounded up now) That scout will still get less and less BSPower as its cargo fills up but it will be a much less dramatic falloff until the last few turns, and he will get all 100 in the end. If you were at a huge city with a 5000 volume product then the same 80,18,2 situation will show up again, but that's legitimate. 5000 are trying to buy and you want 10, you will get 0. If you want MORE BSPower at a known crowded location, come in with a bigger unit and don't reduce the amount you want, you will get much more of a share. This fix makes it more evened out in small volume situations which was the majority of the problem and causes all the pile up.

Selling has had similar tweaks and fixes in reverse. Your BSPower is lowered to your available product you are trying to sell. On ships, that is straightforward. On the ground however that gets complicated when you have 6 structures all selling the same 1000 stack of product in the same location. The BSPower of all those structures is reduced to their "share" of the same stack of product. 10 structures selling the same 1000 stack will all have a BS power of 100.

There is a funny situation which we have not addressed yet when it comes to structures selling product. When you have 1 unit of quantity left at location, and there are two of your structures there trying to sell it, neither will sell anything and that unit will remain in place. Cant split a fraction. Any fraction will do this, so 6 structures trying to sell the last 5 qty, the 5 will remain and no one will sell anything. We will fix that in the future but not right now =)

There was also an issue with the UI acting all screwy with the Buy Sell tab and the product dropdown. This should be fixed now also.

If you notice anything funny happening with buy and sells please let me know.
edited by DrDread on 5/23/2017
0 link






Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software