EarendelDevelopers / factorio-mods

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

Ion Canister/Magnetic Canister does not count in Production Statistics #288

Closed darkshark007 closed 1 year ago

darkshark007 commented 1 year ago

It seems like the Ion Canister recipe is not included in Factory Production Stats (P-button).

This seems to clearly manifest in at least 2 very noticeable problems:

1) There is a huge discrepancy between Ion Canister Production/Consumption. It appears to suggest I've consumed ~2k canisters despite producing 0. Since this recipe doesn't appear in Production stats, it's hard to evaluate throughput/consumption issues, as this critical data is missing.

Screen Shot 2023-03-30 at 11 18 22 AM

2) There is a huge discrepancy between Ion Stream Production/Consumption. According to the stats, It appears that over the last 10h I have produced 1,700,000 Ion Stream but have only consumed 636,000, so I should have over 1mil in excess but actually my Ion Stream tanks and lines are completely empty, supply is not keeping up with demand (which is why I started digging into Production Stats and discovered this issue). I'm hypothesizing that if the Ion Canister recipe isn't counted in stats, the items the recipe consumes also aren't counted in stats? If that is the case, it would explain the huge Ion Stream discrepancy; presumably, that excess has gone into producing ~1000 Ion Canisters and I just can't see it in the stats. So this issue is likely also impacting the production/consuption statistics of other constituent parts for these recipes as well.

Screen Shot 2023-03-30 at 11 18 35 AM

(These examples focus on Ion Canister, but they apply to Magnetic Canister as well, which also doesn't seem to appear on the Production graph)

Wiwiweb commented 1 year ago

Originally I made it this way just from mimicking what vanilla does with barrels (barrels don't count in production).

I think I've changed my mind since then though, the fact that we use canisters directly as ingredients of recipes makes it different than barrels. It causes some pretty ugly graph issues as you've noticed.

I wish we could say "this recipe consumes an ion canister, but actually counts as 1000 ion consumed for production graph purposes" but that's not possible.

I think I will just have the canister/uncanister recipes count for production again, and if players want to make a loop to inflate their graphs for no reason then whatever.

darkshark007 commented 1 year ago

Update, I just noticed the Anti-Matter Canister doesn't count either, but it sounds like many of them don't count and it was a known/intentional issue, so presumably the Anti-matter is known too.

That's interesting, I never noticed that barrels didn't count in vanilla. I suppose that could also cause some weird graph problems, but the caveat there is that as you point out the barrels are never consumed directly, meaning they will always need to be un-barreled eventually in order to consume the fluid, meaning the graphs will be off but never by more than the fluid volume of the total number of barrels currently in existence. 🤔

I think it made sense to follow the precedent set by fluid barreling, but it definitely seems to have some wonky side-effects. In this case, the fluid isn't trapped temporarily in some sort of barrel-escrow that's hard-bound to balance out naturally and be accounted for, nor is the gap limited to the total current volume of canisters, it's just consumed permanently with no accounting step ever done. I think it makes the most sense for them to just count towards production stats. 👍

and if players want to make a loop to inflate their graphs for no reason then whatever.

Is this why barreling doesn't count towards production in vanilla? That seems silly, both for a player to do, and for the devs to go out of their way to factor out. 😆

Brickcaster commented 1 year ago

What ultimately matters is the quality of information. Like in vanilla barreling, barreling and unbarreling can skew the data and make the graph less useful.

Canisters should be treated differently because they can be consumed directly. Extracting the items from the canister should still be excluded from stats because nothing new is produced. If the player creates a canister/uncanister loop, this would skew fluid consumption and make it look like more is being consumed than produced, but if I recall there aren't many reasons to uncanister at all.

darkshark007 commented 1 year ago

In my playthrough, at least, I can testify that I have un-canistered Ion Stream in order to fuel up brand new Spaceships that i'm prototyping, and I could see un-canistering Antimatter for similar reasons being plausible, but I've never needed to uncanister anything for any other reason.

However, I have observed that the storage density of the canistered fluids is incredibly high; 1k fluid per canister, 50k per stack, a 9x9 grid of chests can store 21,600,000 fluid in the space of one 25k storage tank/booster tank. So, if one is transporting large quantities of these fluids from one location to another, such as by Spaceship, then canistering/uncanistering would be a very appealing/efficient strategy. Hell, for high-end ships with a lot of engines that need a lot of stored fuel (or which desire to operate for a long time without needing refueling), a single steel chest of canisters would replace/refill 240x Ion Booster Tanks, or 48x Antimatter tanks. The Particle Accelerator to uncanister would take up space/stress, but much less so than the equivalent tanks.

I've personally not found cause to do much uncanistering (yet), but it has a lot of potential utility so I would be surprised if there aren't some players doing it, and it might be hard to rule it out as improbable.

Brickcaster commented 1 year ago

Again, it's about quality of information. The graph has no gameplay effect so it's just a design decision. Ultimately whether to count bottling in stats or not is a minor style choice. While you have highlighted some reasons to unbottle these fluids, they're still fairly minor, which is on top of an already minor gameplay element.

Because the primary purpose of canisters is for them to be consumed directly, it makes sense for the bottling recipe to be tracked. The unbottling recipe doesn't produce anything so that can remain untracked. Some of the consumed fluid will get double-tracked for exploiting unbottling for its density, but doesn't seem to be a big deal.

Wiwiweb commented 1 year ago

In either option it introduces some inconsistency.

1) If both bottling and unbottling count for stats, then fluid and canister production will match fluid and canister consumption, but the amount of both may be inflated from bottling and unbottling the same fluid.

2) If bottling counts for stats but not unbottling, then the consumption of fluid and the production of canisters may be inflated, but not the production of fluid or the consumption of canisters.

In both cases something gets inflated, but the second case also creates a mismatch between production and consumption, which seems to be something that players are looking for (https://github.com/EarendelDevelopers/factorio-mods/issues/205). I also think the first option would be easier to explain if players ask.

Thoughts?