Page 1 of 1

[16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 9:13 pm
by someone1337
I wanted to watch a little more accurate production stats than the highly rounded ones, you get in the Production overview ('p')
(which would be a separate feature enhancement request: show the exact counts as mouse-over-popup ;)

Anyway. I used this code, to print all my production stats:

Code: Select all

/measured-command local f = game.forces["player"]
for k, v in pairs(f.item_production_statistics.input_counts) do 
	if f.item_production_statistics.output_counts[k] then
		log(k..": "..v.." -> "..f.item_production_statistics.output_counts[k].." ("..(v-f.item_production_statistics.output_counts[k])..")")
	else
		log(k..": "..v.." -> 0 ("..(v)..")")
	end
end
When writing and testing the else-part of that loop, i found out that the production stats seem to only register the production, but not the consumption of building-ingredients.

For example:
substation-2: 13 -> 0 (13)
substation-3: 13 -> 0 (13)
substation-4: 13 -> 0 (13)
I use bob's power mod and build a few substation mk4's, which needs one substation mk3 (plus some other stuff), which needs substation mk2 (plus some other stuff).

The production stats (printed/logged and the production overview 'p') would imply that I should have 39 substations and that i somehow spawned the more advanced ones, because i did not need the lower-tier ones to produce the advanced ones, while i only have 13 substation MK4's.

Re: [16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 9:58 pm
by Bilka
I bet this is because you handcrafted those things. Handcrafted consumption currently isnt counted, that's another bug. So your bug would be a duplicate.

Re: [16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 10:00 pm
by Rseding91
Thanks for the report. Exactly what items are you expecting to be in the production/consumption stats that aren't and what method are you expecting them to get into those stats? Hand crafting/assembling machine/other ?

If hand crafting, intermediate products crafted and then immediately consumed by the crafting in progress aren't counted towards produced or consumed as an intended simplification of the crafting queue.

Re: [16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 10:35 pm
by someone1337
Rseding91 wrote:Thanks for the report. Exactly what items are you expecting to be in the production/consumption stats that aren't and what method are you expecting them to get into those stats? Hand crafting/assembling machine/other ?

If hand crafting, intermediate products crafted and then immediately consumed by the crafting in progress aren't counted towards produced or consumed as an intended simplification of the crafting queue.
I am handcrafting only "substation mk4". I dont cancel the queue or anything.
I get the substations mk4, and the production stats show the production of the intermediate substations, but not their consumption.

I would expect the stats to be something like this:
substation-2: 13 -> 13 (0)
substation-3: 13 -> 13 (0)
substation-4: 13 -> 0 (13)

Re: [16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 10:37 pm
by Rseding91
someone1337 wrote:
Rseding91 wrote:Thanks for the report. Exactly what items are you expecting to be in the production/consumption stats that aren't and what method are you expecting them to get into those stats? Hand crafting/assembling machine/other ?

If hand crafting, intermediate products crafted and then immediately consumed by the crafting in progress aren't counted towards produced or consumed as an intended simplification of the crafting queue.
I am handcrafting only "substation mk4". I dont cancel the queue or anything.
I get the substations mk4, and the production stats show the production of the intermediate substations, but not their consumption.
Yes, that's working as intended (for now). Items consumed are not counted because you can cancel crafting and get them back. Items produced are counted because you can't un-produce the item.

Re: [16.28] Production stats seem incorrect

Posted: Wed Mar 07, 2018 10:41 pm
by someone1337
It wont even increment the consume substatsion-3 counter, if i handcraft "substation mk3" and when finished, i handcraft "substatsion mk4"

Re: [16.28] Production stats seem incorrect

Posted: Mon Jul 30, 2018 10:59 pm
by sawbladex
Rseding91 wrote:
someone1337 wrote:
Rseding91 wrote:Thanks for the report. Exactly what items are you expecting to be in the production/consumption stats that aren't and what method are you expecting them to get into those stats? Hand crafting/assembling machine/other ?

If hand crafting, intermediate products crafted and then immediately consumed by the crafting in progress aren't counted towards produced or consumed as an intended simplification of the crafting queue.
I am handcrafting only "substation mk4". I dont cancel the queue or anything.
I get the substations mk4, and the production stats show the production of the intermediate substations, but not their consumption.
Yes, that's working as intended (for now). Items consumed are not counted because you can cancel crafting and get them back. Items produced are counted because you can't un-produce the item.

You can cancel crafting with buildings.

Just deconstruct the building.