Page 1 of 1

Separate the 2 functions of "catalyst_amount" into 2 parameters

Posted: Wed Jan 18, 2023 10:23 pm
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!

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

Posted: Thu Jan 19, 2023 6:42 pm
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.

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

Posted: Sat Feb 04, 2023 12:00 am
by spiral_power
Cheers!

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

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

Posted: Mon Mar 13, 2023 8:18 pm
by KiwiHawk
Makes sense! The new parameter would only need to be added to products though, not ingredients.

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

Posted: Mon Oct 02, 2023 7:47 am
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

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

Posted: Thu Aug 01, 2024 4:16 pm
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.

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

Posted: Thu Aug 01, 2024 8:16 pm
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?

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

Posted: Thu Aug 01, 2024 8:55 pm
by Bilka
catalyst_amount is removed in 2.0.

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

Posted: Fri Aug 02, 2024 12:04 pm
by Wiwiweb
Hell yeah 👍

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

Posted: Fri Aug 02, 2024 6:26 pm
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 }
  ...
}

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

Posted: Fri Aug 02, 2024 8:29 pm
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.

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

Posted: Sat Aug 03, 2024 3:49 pm
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.

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

Posted: Sat Aug 03, 2024 7:46 pm
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.

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

Posted: Sat Aug 03, 2024 9:49 pm
by Bilka
Don't worry, the new properties are numbers.

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

Posted: Wed Aug 07, 2024 8:31 pm
by spiral_power
Thank you for your efforts.