Lock Recipe Technology effect

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Lock Recipe Technology effect

Post by protocol_1903 »

As in title, I would like an inverse to the 'unlock-recipe' technology research effect that instead locks the linked recipe. If implemented, this brings up the question of if it should lock the recipe if it was from multiple sources or was always available: I posit that it should lock the recipe, regardless of if/how it was previously unlocked. This makes the most sense from a simple perspective, is the easiest to implement, and is easiest to understand from the player perspective.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Quorken
Inserter
Inserter
Posts: 41
Joined: Mon Aug 18, 2025 3:53 pm
Contact:

Re: Lock Recipe Technology effect

Post by Quorken »

Hmm. I suppose this could be used when researching a "better understanding" of iron casting, unlocking a more efficient recipe, and locking the existing one?
Or to have "alternate" recipes, where you can only have one active at a time - each alternate's technology would lock the other alternates' recipes. And maybe it would also automatically "un-research" the other alternates' technologies (would be likely be a separate interface request, for a "un-research other technology" technology effect.).
Would this reset any machines with the now-locked recipe set?
eugenekay
Filter Inserter
Filter Inserter
Posts: 995
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: Lock Recipe Technology effect

Post by eugenekay »

I think you can already do this via the on_research_finished event, and then setting recipe enabled=false.

Good Luck!
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Lock Recipe Technology effect

Post by protocol_1903 »

eugenekay wrote: Sun Feb 08, 2026 3:57 am I think you can already do this via the on_research_finished event, and then setting recipe enabled=false.

Good Luck!
The point is to not need to run scripts like that, and having proper support for this 'feature' is always better than scripting it manually. Additionally, script locking recipes is not respected when the technology tree is refreshed and enabled recipes are checked again.
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
protocol_1903
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Lock Recipe Technology effect

Post by protocol_1903 »

Quorken wrote: Sun Feb 08, 2026 3:40 am Would this reset any machines with the now-locked recipe set?
I assume so, similar to how surface conditions lock recipes.
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Post Reply

Return to “Modding interface requests”