EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

Incorrect production statistics #205

Closed EarendelGames closed 1 year ago

EarendelGames commented 2 years ago

spiral_power: "0.5.116, statistics is wrong. antimatter canister consumption is too low. each arcosphere collector consumes 10 antimatter canister. As I reported a long time ago, the fusion test data is also wrong."

daviscook477 commented 2 years ago

it's definitely a catalyst issue. the antimatter canister is a catalyst in the arcosphere collector recipe (so it won't be tracked according to this post https://forums.factorio.com/viewtopic.php?f=23&t=66664&p=406556&hilit=catalyst+consumption#p406556)

Probably a similar thing is happening for the fusion test data since it is a catalyst in the recipe ingredients. It appears that any ingredient marked as a catalyst does not count in consumption stats, and any result marked as a catalyst does not count in production stats.

spiralpower commented 1 year ago

Hi, I'd like to post the multiple statistics issues I found in 0.6 somewhere. Is this the right place or is the discord better? There can be more than one cause.

InappropriatePenguin commented 1 year ago

@spiralpower, here would be fine.

spiralpower commented 1 year ago

Ok. First, I present the datas. 250h stable with 210 spm.

1 Beryllium powder: prod < cons

2 Holmium powder: prod < cons ( a bit, maybe )

3 Iridium: powder: prod < cons Iridite: prod < cons

4 Crushed vulcanite: prod > cons

5 Vitamelange spice: prod >> cons Vitamelange extract: prod < cons

11 Stone brick: prod < cons ( Possible measurement error, but noted just in case )

6 Sand: prod < cons

7 Naquim powder: prod > cons Refined naquitite: prod > cons

8 Fusion test data: prod >> cons ( I posted before )

9 Antimatter canister: prod >> cons ( I posted before )

10 Steam: prod > cons ( Trivial difference, but even at 50h there is a 3k/m gap, so it may not be a measurement error )

spiralpower commented 1 year ago

prod < cons problem could be a case of below. Negotiations with the factorio developers will be necessary, as it should be necessary to improve the factorio api in order to fix it. https://forums.factorio.com/viewtopic.php?f=23&t=90157

Wiwiweb commented 1 year ago

All of the "prod < cons" are because at some point, a product is output as a "catalyst" to prevent it from being affected by productivity. But that has the side-effect of not counting that output in production graphs. It's unfixable without Factorio giving us a way to mark an output as "not affected by prod" but still "counts in production graphs", as you've seen in that thread.

Going through the pictures:

I can fix those: iridium, iridium-ore-crushed, vulcanite-crushed, vitamelange-spice, vitamelange-extract, naquium-powder, naquium-crushed.

spiralpower commented 1 year ago

Ah, thank you. I am not so sure about stone brick. How about this one.

Fusion test data: prod >> cons ( I posted before )

spiralpower commented 1 year ago

Thank you for fixing in 0.6.90. It looks fine for the part that has been corrected. Once my save is able to get 250 hours of stats, I will check the stats.

spiralpower commented 1 year ago

Here are the latest statistics in 0.6.90. Those that have resolved the problem will not be listed.

image Beryllium powder: prod < cons

image Holmium powder: prod < cons ( a bit, maybe )

image Iridium: powder: prod < cons

image Sand: prod < cons

image image We may have a new problem.

image Steam: prod > cons

Wiwiweb commented 1 year ago

I'll be taking a look at each point in a bit.

BurninSun commented 1 year ago

I know fluids inside assembly machines get deleted on spaceship launch/landing. That might be where the steam is going.

spiralpower commented 1 year ago

I see, interesting story, but Internal turbine steam is prod = cons. Is it consistent?

Wiwiweb commented 1 year ago

Beryllium powder: prod < cons

Can't be fixed. It's from the naquium-refined recipe which gives beryllium powder. We don't want the powder result to be affected by productivity here, and there's no way to say "not affected by productivity, but appears in production stats".

Holmium powder: prod < cons

Same story but for the naquium-powder recipe.

Sand: prod < cons

Same story, for a couple different recipes that output sand as a catalyst.

Steam: prod > cons

Same story, probably from cryonite-crystal.

Antimatter canisters

I'm gonna call that one intentional because we're copying the vanilla behaviour with barrels. You can't actually have a "water barrel" in your production graph. Similarily you won't be seeing antimatter canisters in production graph anymore. What's really produced is the antimatter.

spiralpower commented 1 year ago

catalyst issue

https://forums.factorio.com/viewtopic.php?f=23&t=90157

I understand that this may be due to this problem, but as it is with the current factorio api, it is not possible to fix it with only mod-side implementation. Therefore, if possible, I hope to encourage improvements to the factorio api. At least for me, statistical information is much, much more important and valuable than detailed assembly machine placement and the like.

Antimatter canisters

I see, the Amtimatter stream used to match the left and right sides, but now they are different. However, there is something wrong with the canister gap not matching.

35M ≠ 4.7 * 1k

image image image

Wiwiweb commented 1 year ago

Sorry I have to put this under "needs better API" too :D

Logically when a recipe consumes an antimatter canister and returns an empty canister, we should say "1000 antimatter was consumed" but there's no way to have a recipe give production/consumption for an unrelated item/fluid.

spiralpower commented 1 year ago

I see, I guess it means that there is no appropriate factorio api for antimatter at this time.

InappropriatePenguin commented 1 year ago

Are there any outstanding fixable issues or can this be closed?

spiralpower commented 1 year ago

I would like it to remain open as there are still unresolved issues, but what are your plans for future fixes?

InappropriatePenguin commented 1 year ago

If all of the unresolved issues require base-game changes, then there's no reason to keep this issue open. It's not like it will disappear. If Wube add functionality that allows them to be fixed (or other fixable issues are found), then it can be re-opened.

spiralpower commented 1 year ago

ok, thank you.