Page 1 of 1

Define Primary Recipe on Item / Fluid

Posted: Sun May 25, 2025 9:52 am
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 1075 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 1075 times

Related (but different) requests:
viewtopic.php?p=639621
viewtopic.php?p=633024

Re: Define Primary Recipe on Item / Fluid

Posted: Sun May 25, 2025 10:28 am
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

Re: Define Primary Recipe on Item / Fluid

Posted: Sun May 25, 2025 11:56 am
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).

Re: Define Primary Recipe on Item / Fluid

Posted: Sun May 25, 2025 4:09 pm
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

Re: Define Primary Recipe on Item / Fluid

Posted: Mon Jun 09, 2025 6:27 pm
by protocol_1903
+1, automatic merging by default is appreciated but the ability to override those defaults should be possible

Re: Define Primary Recipe on Item / Fluid

Posted: Thu Jul 31, 2025 10:39 am
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 391 times
07-31-2025, 22-38-00.png
07-31-2025, 22-38-00.png (41.64 KiB) Viewed 391 times

Re: Define Primary Recipe on Item / Fluid

Posted: Fri Aug 01, 2025 3:26 am
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.