[16.28] Production stats seem incorrect

Bugs that are actually features.
Post Reply
someone1337
Fast Inserter
Fast Inserter
Posts: 128
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

[16.28] Production stats seem incorrect

Post 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.
Attachments
factorio-current.log
(81.57 KiB) Downloaded 85 times

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [16.28] Production stats seem incorrect

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.28] Production stats seem incorrect

Post 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.
If you want to get ahold of me I'm almost always on Discord.

someone1337
Fast Inserter
Fast Inserter
Posts: 128
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: [16.28] Production stats seem incorrect

Post 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)
Last edited by someone1337 on Wed Mar 07, 2018 10:37 pm, edited 1 time in total.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [16.28] Production stats seem incorrect

Post 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.
If you want to get ahold of me I'm almost always on Discord.

someone1337
Fast Inserter
Fast Inserter
Posts: 128
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: [16.28] Production stats seem incorrect

Post by someone1337 »

It wont even increment the consume substatsion-3 counter, if i handcraft "substation mk3" and when finished, i handcraft "substatsion mk4"

sawbladex
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Jul 29, 2018 8:43 pm
Contact:

Re: [16.28] Production stats seem incorrect

Post 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.

Post Reply

Return to “Not a bug”