Separate the 2 functions of "catalyst_amount" into 2 parameters

User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Sat May 08, 2021 2:36 am
Contact:

Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Wiwiweb »

What?
Currently you can add a "catalyst_amount" parameter to ingredients or results of a recipe.
Added on an result, this has two functions:
  • It stops the product from appearing in production stats.
  • It prevents it from being affected by productivity.
I would like have 2 new parameters to individually control these two functions with 2 new booleans: "ignored_by_stats" and "ignored_by_productivity".

In addition, "catalyst_amount" acts on stats in strange ways when the amount products is variable (either via probability or with amount_min/amount_max).
For example if a recipe has 50% chance to output stone, and that product has catalyst_amount = 1 (has to be an int), then when the recipe outputs stone it works as expected (stone does not appear in stats) but when the recipe does not output stone then 1 stone appears in consumption stats. I'm guessing the catalyst amount is subtracted from the actual amount produced, which results in -1 production, which ends up as 1 consumption.

The "ignored_by_stats" boolean proposed would allow variable results to be properly ignored in stats.
Why?
In SE, we have a lot of recipes that output stone or sand as byproduct, which is usually something players want to get rid of. We currently mark those as catalyst because we want to encourage high productivity, and we don't want players to be punished for it by getting more waste. This makes sense thematically too since a more productive machine could get more usable ore and less waste.

But the byproducts end up not showing up in production stats even though it is produced. Sometimes it may even show in consumption stat because of the issue with variable products mentioned above.

Ideally, we would prevent productivity on this product, while still having it show in statistics.

Thanks!

curiosity
Filter Inserter
Filter Inserter
Posts: 441
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by curiosity »

Wiwiweb wrote:
Wed Jan 18, 2023 10:23 pm
For example if a recipe has 50% chance to output stone, and that product has catalyst_amount = 1 (has to be an int), then when the recipe outputs stone it works as expected (stone does not appear in stats) but when the recipe does not output stone then 1 stone appears in consumption stats. I'm guessing the catalyst amount is subtracted from the actual amount produced, which results in -1 production, which ends up as 1 consumption.
This should be submitted as a bug report.

User avatar
spiral_power
Fast Inserter
Fast Inserter
Posts: 176
Joined: Wed Oct 30, 2019 5:17 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by spiral_power »

Cheers!

Here's my earlier post.
viewtopic.php?f=23&t=90157

User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 270
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by KiwiHawk »

Makes sense! The new parameter would only need to be added to products though, not ingredients.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 270
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by KiwiHawk »

Revisiting October 2023

I've once again come across the need for this in Angel's! Any bug reports we get about the production graphs being wrong we just have to call a known issue, outside our control.

Image

Image
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 574
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by raiguard »

This has been implemented for 2.0 as ignored_by_productivity and ignored_by_stats. Additionally, the auto-detection of catalysts has been removed.
Don't forget, you're here forever.

User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 270
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by KiwiHawk »

Has catalyst_amount been removed? If not, is setting catalyst_amount equivalent to setting both of the new properties? What happens if both catalyst_amount and one of the new properties are set but to different numbers?
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.

Buy me a coffee

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

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Bilka »

catalyst_amount is removed in 2.0.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Wiwiweb »

Hell yeah 👍

Mernom
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Jul 15, 2018 10:05 pm
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Mernom »

The whole vanilla case for the catalyst system was to allow the K process to work properly with prod. If the new params are bools, doesn't that break that intent?
Unless they are meant to be used in duplicate results entries? Aka

Code: Select all

local res = {
  { name = "thing", amount = 5, ignore = true },
  { name = "thing", amount = 1, ignore = false }
  ...
}

curiosity
Filter Inserter
Filter Inserter
Posts: 441
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by curiosity »

Mernom wrote:
Fri Aug 02, 2024 6:26 pm
The whole vanilla case for the catalyst system was to allow the K process to work properly with prod. If the new params are bools, doesn't that break that intent?
Unless they are meant to be used in duplicate results entries? Aka

Code: Select all

local res = {
  { name = "thing", amount = 5, ignore = true },
  { name = "thing", amount = 1, ignore = false }
  ...
}
No one said they are booleans. That doesn't even make any sense to assume.

User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Wiwiweb »

It's not a crazy assumption; in the OP I suggested ignored_by_productivity and ignored_by_stats as booleans, and the implementation uses those exact names.
Of course since catalyst_amount is also going away, then it would make sense that those 2 new parameters are actually ints or floats, but it's good to ask to get clarification.

curiosity
Filter Inserter
Filter Inserter
Posts: 441
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by curiosity »

Wiwiweb wrote:
Sat Aug 03, 2024 3:49 pm
It's not a crazy assumption; in the OP I suggested ignored_by_productivity and ignored_by_stats as booleans, and the implementation uses those exact names.
Oh, sorry, my bad. Last time I've read that post was a long time ago.

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

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by Bilka »

Don't worry, the new properties are numbers.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
spiral_power
Fast Inserter
Fast Inserter
Posts: 176
Joined: Wed Oct 30, 2019 5:17 am
Contact:

Re: Separate the 2 functions of "catalyst_amount" into 2 parameters

Post by spiral_power »

Thank you for your efforts.

Post Reply

Return to “Implemented mod requests”