Per Aspera

Per Aspera

View Stats:
mreed2 Dec 20, 2020 @ 1:10am
Commodity demand not being calculated correctly for graphs and tooltips
I was taking screenshots to add to my guide when I verified something that I had suspected before -- the graphs (available when clicking on resources in the global stockpile) are wildly inaccurate.

I was troubleshooting a steel shortfall (that I already knew the cause of -- see below).
https://steamcommunity.com/sharedfiles/filedetails/?id=2327293265
First, the demand shows zero demand for iron.
https://steamcommunity.com/sharedfiles/filedetails/?id=2327293548
There is demand for steel, of course.
https://steamcommunity.com/sharedfiles/filedetails/?id=2327294124
This shows why there is no demand for iron -- all the iron is in the factories, so zero demand -- the issue is lack of carbon. Thus, I agree with the iron graph -- illustrating this is, in fact, what I was going to add to my guide. But I dug deeper...
https://steamcommunity.com/sharedfiles/filedetails/?id=2327294522
But this graph shows zero demand for carbon -- which is absurd, the steel factories (8x level 3, all empty of carbon, all full of iron), if nothing else, should be demanding carbon.
https://steamcommunity.com/sharedfiles/filedetails/?id=2327294920
The underlying issue, which I knew before I started taking all these screenshots, is that I'm building 12x Space Elevators which are demanding all the carbon -- but...
https://steamcommunity.com/sharedfiles/filedetails/?id=2327301502
Given the default allocation of carbon, a third of my carbon should have been available for the steel factories despite the space elevators -- but it wasn't.

Yes, if all my steel factories were full of carbon, then the surplus carbon production should have been allocated to the space elevator construction (even beyond the 1/3 allocation), but this would only come into play if the steel factories were full of carbon, which they weren't.

None of the steel factories, spaceports, or plastic factories were marked with the priority flag -- I'm aware that if I marked the steel factories with the priority flag they would restart production (despite the space elevator) -- I shouldn't have to do that, though.

There are three major issues being shown here:
  1. Resource allocation isn't working at all, or isn't working as expected.
  2. Demand level shown in the graph are wildly inaccurate because they don't reflect demand from construction sites and spaceport projects.
  3. Even allowing for #2, the demand shown in the graph is still wildly inaccurate.

I have a sneaking suspicion that #3 is caused by demand only being counted if resources have been tagged to fulfill it. Which is very, very wrong, but matches my later screenshots.

https://steamcommunity.com/sharedfiles/filedetails/?id=2327305178
When I let the game run for a bit, the factories restarted production (note that the silver-grey lines are present now, indicating carbon [and iron] flagged for delivery to this factory)
https://steamcommunity.com/sharedfiles/filedetails/?id=2327306366
Because the space elevators had largely satisfied their demand for carbon.
https://steamcommunity.com/sharedfiles/filedetails/?id=2327305504
Carbon demand is going up
https://steamcommunity.com/sharedfiles/filedetails/?id=2327307791
And so is iron demand

To be clear: In the graphs shown, the demand for iron being 0 is correct, because all the steel factories were full of iron and new construction / spaceport / space elevator demand isn't shown in the graphs (I don't like this decision, but I can live with it).

But the carbon graph was simply wrong -- unfulfilled demand should be shown on the graph -- in fact, it is more important to show this sort of demand than the type that is shown ("fulfilled demand" -- demand where a good is tagged for delivery, but not yet delivered) because unfulfilled demand indicates that the player needs to build more mines while the second indicates that the player might potentially be able to improve his/her logistics.

You might want o illustrate demand with a stacked graph (from Excel) -- unfulfilled demand would be shown in red, as it is today, and fulfilled demand would be shown in yellow. The downside is that you would have to fill these graphs in (down the axis) so that the stacking effect would be visible, but if you did I think most players would understand that the two sorts of demand are added together to get "Total demand".

You would also need tool-tips that appear when hovering over the graphs or the legend that better describe what the "fulfilled" and "unfulfilled" mean, of course.
Last edited by mreed2; Dec 20, 2020 @ 11:24am
< >
Showing 1-15 of 18 comments
Bowi Dec 20, 2020 @ 5:30am 
That's too long for me to read, but if those graphs (which I used previously) are innacurate, that's problematic. :(
mreed2 Dec 20, 2020 @ 10:59am 
tl;dr version:

The demand graph and calculation only takes into account demand that has managed to tag goods for delivery.

If you have an actual shortage of goods (carbon in my example) then the demand graph will fall to, and stay at, zero despite the fact that you have factories looking for carbon.
Bowi Dec 20, 2020 @ 11:07am 
That's weird... Thanks for the tl;dr. 😅
Bowi Dec 20, 2020 @ 11:21am 
That's OK, because this graph shows zero demand for steel.
There is a 4.7/month demand in the screenshot... I don't understand.
mreed2 Dec 20, 2020 @ 11:24am 
My error -- you are correct, there is demand for steel (from parts factories).

It doesn't change the actual bug, and I've edited the original message.
Bowi Dec 20, 2020 @ 12:16pm 
Very interesting read. I hope devs will improve this. :)
BobthenotsoGreat Dec 20, 2020 @ 12:35pm 
This is post patch but pre hotfix yes?
mreed2 Dec 20, 2020 @ 12:49pm 
No, this is post patch / post hotfix.

I haven't seen any bugs reported for the graphs, so I'm pretty sure that this is new to the developers.
Bowi Dec 20, 2020 @ 1:25pm 
I don't really understand "potential demand" and "potential production" either...

I noticed that even supply chains that meet the current demand can definitly drop to 0 (as in "shortage") is they don't meet the "potential demand".
Last edited by Bowi; Dec 20, 2020 @ 2:04pm
mreed2 Dec 20, 2020 @ 1:32pm 
Potential demand = the total number of input slots of all of your factories / colonies combined for that good. If you have 4 food factories and 2 plastics factory, your potential demand for chemicals is 4*6 = 24 for the food factories, and 2*6=12 for the plastics factory, for a total demand of 24. This is further modified by the factory level, I think, but that's the basic calculation.

Potential production = the total number of output slots of all of your factories / mines for that good. If you have 12 water mines, your production is 12*6=72. Again, this is modified by the mine / factory level.

Neither take into account special projects (space ports or space elevators) or new construction.

Note that the plastics and electronics "Potential demand" charts are rather useless, because they include all the potential demand from all the maintenance towers -- and that adds up very, very quickly.

Acutal demand is supposed to measure the number of currently open "Input" slots you have, modified by factory type, but it doesn't -- that's the bug I'm reporting.

Actual production measures the number of goods actually produced (placed in the Output bin) during some relatively short period of time and seems to work as expected.
mreed2 Dec 20, 2020 @ 1:38pm 
Also, note that an Input slot that is filled (has a good actually residing in the slot, waiting to be used) is properly excluded from the "Actual Demand" calculation. A filled input slot cannot generate demand, so until the slot is actually emptied the demand is zero. This is most common in regards to Food and Water, because colonies have a very long production cycle, especially when they only have a small number of people staffed.

Also, note that if you are demand limited (that is, your source buildings are stalling with full output bins because nobody currently wants the good) you'll see the supply and demand lines converge, and then move up and down in a synchronized way. This is expected behavior, with the varation occurring because the up-stream buildings (the ones that generate the demand for the good you are looking at) are filling up their Input slots very quickly -- since most of the Input slots are filled, little demand is shown on the chart.

The charts work as intended, as long as you don't have a resource shortage -- that's when they break altogether. The problem is that during a resource shortage is when you are most likely to consult the charts, so...
BobthenotsoGreat Dec 20, 2020 @ 1:59pm 
Something changed when they removed the global item count from the spaceports. It looks like the demand for them is gone in the graph.

Is it possible that all of your carbon was in transit to the steel (total 56 potential) 61 in stock. So the reason demand is 0 is it's on its way and demand is met. Any surplus is sucked into the spaceport (which is 0 demand on the graph).

I think the problem is spaceport related graph wise. I will check it out in my game.
Bowi Dec 20, 2020 @ 2:10pm 
Thanks for your work, mreed2. 🙂
BobthenotsoGreat Dec 20, 2020 @ 2:13pm 
It's possible that resource allocation doesn't work like intuition says it should. If it's 33% across 3 it might not mean 1 to each for each 3 produced.

It could be if you have natural 50 demand and spaceport needs 200 and construction needs 50 it will allocate 1-4-1 as the spaceport overall demand is 4 times as high. Going to check that to...somehow.
Last edited by BobthenotsoGreat; Dec 20, 2020 @ 2:15pm
mreed2 Dec 20, 2020 @ 2:14pm 
Even then, some carbon should have gone to the steel factories.
< >
Showing 1-15 of 18 comments
Per page: 1530 50