Define Primary Recipe on Item / Fluid

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 297
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Define Primary Recipe on Item / Fluid

Post by KiwiHawk »

Currently Item / Fluid entries will merge with a recipe prototype if they have the same internal name. Can we please have a way of overriding this? Allow us to (optionally) specify the name of a recipe on the item / fluid prototype. This is the recipe that will be merged.

Being able to manually control this will make mod compatibility much simpler! In Angel's we often have a basic smelting recipe (which will have the same name as the resulting plate item) as well as multiple higher tier recipes. However depending on which combination of mods and settings you have enabled (e.g. having some of Bob's mods enabled) then the basic recipe is disabled. Currently to make the merging work we would need to nil the basic recipe and rename one of our other recipes. Also updating the technology prototypes to match.

05-25-2025, 21-50-04.png
05-25-2025, 21-50-04.png (266.54 KiB) Viewed 869 times

A potential side benefit is this change might allow multiple items / fluids to define the same recipe as their primary source. However this is not what I am requesting here.

Example: In Angel's, this recipe is the first source you get access to for both Saline water and Purified water. Later on, players can unlock specialized recipes that will produce just one of these fluids. However this is the relevant recipe early game - the time when players are most likely to be looking up how to make these fluids.

05-25-2025, 21-47-53.png
05-25-2025, 21-47-53.png (72.42 KiB) Viewed 869 times

Related (but different) requests:
viewtopic.php?p=639621
viewtopic.php?p=633024
Last edited by KiwiHawk on Thu Jul 31, 2025 5:02 pm, edited 2 times in total.
Dev for Bob's mods, Angel's mods, Sea Block, Circuit Processing, Science Cost Tweaker. Contributor to Helmod.

Buy me a coffee
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 137
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by MrSmoothieHuman »

+1 dealing with alternative recipes on the factoriopedia is a massive chore at best, so any way to control it would be super appreciated
coder? i hardly know her!
curiosity
Filter Inserter
Filter Inserter
Posts: 669
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by curiosity »

This is how the recipe/product merging should have been done from the start, not via mystic relation between prototype names (which only causes problems).
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 137
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by MrSmoothieHuman »

the automatic merging is nice (although it fucked me up because i didnt have synced names), but i agree that it should have 100% came with a way to force factoriopedia to merge with a specified recipe - it feels like such an obvious feature
coder? i hardly know her!
protocol_1903
Filter Inserter
Filter Inserter
Posts: 286
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by protocol_1903 »

+1, automatic merging by default is appreciated but the ability to override those defaults should be possible
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
User avatar
KiwiHawk
Filter Inserter
Filter Inserter
Posts: 297
Joined: Thu Jul 05, 2018 9:48 am
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by KiwiHawk »

I've just merged a massive PR in Angel's mods, renaming a ton of recipes so they do merge with their main product. There are a still a lot that I can't fix though. These fall into three categories:
  • Recipe is making a vanilla item. I don't want to name Angel's recipe the same as a vanilla item as the chance of the recipe being overwritten by another mod are too high. E.g. Wood, Stone, Fish.
  • Angel's has multiple tiers of recipe for a particular item. With particular combinations of mods and settings enabled, the item isn't required until later game so the lower tier recipes are disabled. I would like to mark the lowest tier available recipe as the primary.
  • When Bob's mods are enabled, some of Angel's recipes are updated to make Bob's item rather than Angel's. Bob's recipe for this item is hidden. I would like to mark Angel's recipe as primary.
07-31-2025, 22-36-58.png
07-31-2025, 22-36-58.png (159.95 KiB) Viewed 185 times
07-31-2025, 22-38-00.png
07-31-2025, 22-38-00.png (41.64 KiB) Viewed 185 times
Dev for Bob's mods, Angel's mods, Sea Block, Circuit Processing, Science Cost Tweaker. Contributor to Helmod.

Buy me a coffee
protocol_1903
Filter Inserter
Filter Inserter
Posts: 286
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Define Primary Recipe on Item / Fluid

Post by protocol_1903 »

A couple of relevant issues with pYmods have been loosely connected. Circuit signals in 2.0 can act strangely, at least to the uninformed user. Currently, the recipe and item signals are only merged IF they have the same name internally. I don't know if there are other requirements, but that seems to be the lowest common denominator that I've found. In vanilla, and even SA, there is rarely more than one recipe for an item, two at most. However, in overhauls, this is not always the case. It may also be so that the 'original' recipe is overridden or completely removed, such that some alternative recipe is the only way/default way of obtaining that item. In this case it is highly abnormal that the two signals (and by extension factoriopedia pages) do not overlap. For this example, see Air Core Inductors from pY (link) where the recipe of the same name is not the primary one from an engine perspective, so the signals and factoriopedia pages are not merged.



Also: Related request (link) that may be useful so that, in parameters, any recipe signal can be used and the appropriate item signal is used where required. I propose that the item signal is the default, and if it requires specifically a recipe signal then that signal should be used.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”