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
FuriousGeorge
FuriousGeorge
Posts: 51


5/24/2017
FuriousGeorge
FuriousGeorge
Posts: 51
This is a fantastic quality of life improvement. Thank you for working on this. I know the math gets funky in there, but good on ya!
0 link
Vulpex
Vulpex
Posts: 390


5/24/2017
Vulpex
Vulpex
Posts: 390
I like it! Going to change a few interesting things when it comes to buying/selling dynamics but it is a good change.
0 link
Hutton
Hutton
Posts: 276


5/25/2017
Hutton
Hutton
Posts: 276
A dynamic that is still in place, and I don't know if this is a problem or there by design, is that transports of every size are put on a trajectory to reach a B/S power of zero on the same turn. I've noticed this when I have tried to stagger two transports to be going back and forth between a market. They will always end up operating right next to each other. Even if one arrives as the other is almost empty (or full) the second will suck up all the volume until they are equailized. It's not game breaking, but it doesn't feel right that if a bunch of units of different sizes arrive at a market at different times they will all always finish their bussiness within a turn or so. To break that you could leave B/S power as fixed to cargo capacity without regard to how much has been used. Or give units a slight boost to B/S for every consecutive turn a unit is performing a buy or sell order.

That's if you think the issue I described is even an issue.
0 link
EdwardBishop
EdwardBishop
Posts: 15


5/25/2017
EdwardBishop
EdwardBishop
Posts: 15
Hutton wrote:
Or give units a slight boost to B/S for every consecutive turn a unit is performing a buy or sell order.


This would be amazing; persistence paying off!
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/25/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
I havn't found a good way to calculate the fact that you have enough BS power to take half the volume of 1000 this turn from the 12 other people competing with you, but you have your 4 cargo space left. So I give you the 4 units and let the other split it, but now the other guy who was going to take 20, can now take 300 but only 30 units of cargo left so hes really taking 30 and letting the rest split with the other 10 people etc.

its like I would have to loop through all the buyers in BS order to determine exactly what they are taking and what is remaining before I can move to the next guy. And even that wouldn't be accurate because in order to know he CAN take 4 I have to calculate against everyone BS power first to make that determination. =)
0 link
Hutton
Hutton
Posts: 276


5/25/2017
Hutton
Hutton
Posts: 276
I didn't follow any of that.

I understood that you were saying you can't do something because you would have to solve for everybody before you could solve for the first person and that would change the answer for everyone else, but I don't understand what situation that is preventing.
0 link
Hutton
Hutton
Posts: 276


5/25/2017
Hutton
Hutton
Posts: 276
Are you saying a situation where you let a unit have more buying power than it's actual cargo space throws the calcualation for the other buyers into chaos? You could just let them split the remainder evenly. And if that fills up the next guy you split his remainder. Every body gets a piece when a big transport tops off it's cargo hull and pulls up stakes. The little units would benefit the most, proportionally.
0 link
^Obsidian Church^
^Obsidian Church^
Posts: 8


5/27/2017
Interesting... so now buying something of 500 quantity per turn is more effective with 6 transports at 500 cargo each than one transport with 3000 cargo? (Adjusts market manipulation tactics to match.)
0 link






Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software