[2.0] Non-consumption Inputs

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 482
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

[2.0] Non-consumption Inputs

Post by BraveCaperCat »

I'd like to be able make a machine that takes in 2 items, a catalyst and another ingredient, then outputs 2 more items, the catalyst back and another result. However, at least in my case, it doesn't make sense for the machine to "output" the catalyst, rather for it to just stay in the input slot without being consumed.
I won't ever need to take the catalyst out of the machine anyway, unlike with Kovarex Enrichment from the base game where the 40 Uranium-235 is the catalyst used to produce a bit of extra Uranium-235 from Uranium-238, which can then be used for other stuff.

My proposal? A new property for ItemIngredientPrototype and FluidIngredientPrototype, perhaps called ignored_by_consumption. What this would do, would be, instead of having the machine consume the input, it would leave it as-is. This could either be a boolean (applies to the entire amount or doesn't apply to any of it) or an integer, (applies to a set portion of the amount or none of it) though for my purposes, it doesn't really matter.

Of course, using this property stops items from being consumed, so it should also be ignored by stats.
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two and enter my username. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 480
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: [2.0] Non-consumption Inputs

Post by Stringweasel »

Can't you just reduce the amount of ingredients required? Basically, what's the difference between:

Code: Select all

{     inputs = { "catalyst" = 10, ignored_by_consumption=true},
      outputs = { "catalyst" = 5}  }
and

Code: Select all

{     inputs = { "catalyst" = 5},
      outputs = {  } }
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 154
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Re: [2.0] Non-consumption Inputs

Post by Brathahn »

maybe take a look at pyanodons mods, production buildings like the moss farm or tree farm.
there are catalyst items but instead of being in the recipe, they are actually modules that increase the crafting speed of the building. without any "catalysts" the building will produce nothing because the crafting speed is effectively 0.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 444
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: [2.0] Non-consumption Inputs

Post by protocol_1903 »

Brathahn wrote: Tue Jan 13, 2026 2:29 pm maybe take a look at pyanodons mods, production buildings like the moss farm or tree farm.
there are catalyst items but instead of being in the recipe, they are actually modules that increase the crafting speed of the building. without any "catalysts" the building will produce nothing because the crafting speed is effectively 0.
While it is effectively zero, we also have scripts running that disable the entities when no modules are found.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 482
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: [2.0] Non-consumption Inputs

Post by BraveCaperCat »

Stringweasel wrote: Tue Jan 13, 2026 2:08 pm Can't you just reduce the amount of ingredients required? Basically, what's the difference between:

Code: Select all

{     inputs = { "catalyst" = 10, ignored_by_consumption=true},
      outputs = { "catalyst" = 5}  }
and

Code: Select all

{     inputs = { "catalyst" = 5},
      outputs = {  } }
I don't understand your argument... ignored_by_consumption would prevent an item from being consumed in a recipe when it's crafted, but the recipe couldn't be crafted without that item.
If you really want to know the difference, the top recipe runs if you put in at least 10 catalyst, does not take the 10 catalyst and gives you 5 catalyst over and over again, (until you take the input catalyst out) where-as the bottom recipe runs if you put in 5 catalyst, takes that 5 catalyst and gives you nothing at all.
Brathahn wrote: Tue Jan 13, 2026 2:29 pm maybe take a look at pyanodons mods, production buildings like the moss farm or tree farm.
there are catalyst items but instead of being in the recipe, they are actually modules that increase the crafting speed of the building. without any "catalysts" the building will produce nothing because the crafting speed is effectively 0.
You may want to be able to put multiple different catalysts into the same machine to do different things, though. You'd need to check if the catalyst is the correct one for the recipe at runtime.
protocol_1903 wrote: Tue Jan 13, 2026 5:25 pm
Brathahn wrote: Tue Jan 13, 2026 2:29 pm maybe take a look at pyanodons mods, production buildings like the moss farm or tree farm.
there are catalyst items but instead of being in the recipe, they are actually modules that increase the crafting speed of the building. without any "catalysts" the building will produce nothing because the crafting speed is effectively 0.
While it is effectively zero, we also have scripts running that disable the entities when no modules are found.
If you only have 1 catalyst per building, that would seem quite performance heavy. That might not be true, though.
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two and enter my username. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
Post Reply

Return to “Modding interface requests”