no_intermediate flag on recipes

Post Reply
Jelmergu
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Mon Apr 04, 2016 8:49 am
Contact:

no_intermediate flag on recipes

Post by Jelmergu » Wed Jan 17, 2018 10:16 pm

I would suggest a flag that can be set on a recipe which prevents it from being used as an intermediate for other recipes. I know that this might seem a bit selfish but I have a mod that adds some recipes with the same raw ingredients as an vanilla item. My item gets used as intermediate for some recipes, but the total crafting time for my recipe is twice that of the vanilla recipe. It would be usefull if there were a flag that prevents my recipe from being used in any other recipe.

I have asked fellow modders if something like this existed. Sadly there appeared to not be said way, and all other options mentioned there didn't work

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1951
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: no_intermediate flag on recipes

Post by darkfrei » Wed Jan 17, 2018 10:27 pm

May be something like by "kovarex-enrichment-process"?

Code: Select all

    main_product = "",
    results =
    {
      {
        name = "uranium-235",
        amount = 41
      },
      {
        name = "uranium-238",
        amount = 2
      }
    },
    allow_decomposition = false

EntropySpark
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jan 31, 2018 7:06 am
Contact:

Re: no_intermediate flag on recipes

Post by EntropySpark » Wed Jan 31, 2018 8:24 am

This may be slightly inconvenient, but perhaps you could make your recipes assembly-machine-only, by adding

Code: Select all

category = "advanced-crafting"
, which currently only seems to be used by the engine unit.

Jelmergu
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Mon Apr 04, 2016 8:49 am
Contact:

Re: no_intermediate flag on recipes

Post by Jelmergu » Thu Feb 01, 2018 3:42 pm

EntropySpark wrote:This may be slightly inconvenient, but perhaps you could make your recipes assembly-machine-only, by adding

Code: Select all

category = "advanced-crafting"
, which currently only seems to be used by the engine unit.
Not the intention to do that. It would not be usefull to have to plonck down a assembler just to change one item to another
darkfrei wrote:May be something like by "kovarex-enrichment-process"?

Code: Select all

    main_product = "",
    ...
    allow_decomposition = false
Tried, but didn't work

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6658
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: no_intermediate flag on recipes

Post by bobingabout » Thu Feb 01, 2018 4:37 pm

I've seen strange bugs like this come up before....

when my mod featured synthetic wood, some recipes had an alternative recipe to use synthetic wood instead. Hand crafting wanted to use synthetic wood versions rather than standard wood versions, which meant that even if you had an inventory full of wood, you couldn't craft anything because it was trying to use synthetic wood.

In this specific case, auto detecting multiple routes and using the one that you can actually use would be better (because you might have an inventory full of synthetic wood instead).


More on this line, when trying to hand craft a MK8 (or anything about 2 really) merged module, it will automatically try to select the MK7, using the "Make this from the 2 unmerged MK6 items" recipe, rather than the "Make this from the MK6 merged item" recipe. putting a "no_intermediate" flag on the recipe of all these merging recipes would be useful.


And finally... There's a mod that adds recipes to upgrade dead end entities to their alternate forms, such as a burner miner drill into an electric miner drill. it returns a furnace. this then becomes the default recipe for crafting furnaces, so when you try to build a burner mining drill, it wants to upgrade a burner miner drill into an electric miner drill to get a stone furnace back to use it in making a burner miner drill... which you probably don't have because that's what you're trying to build. If this recipe had no intermediate set, it would just use the stone you have to craft a stone furnace.


So... although in my opinion, it would be better if the game wasn't dumb, and actually chose the cheapest recipe path, or the path that used materials you have in your hand.... I can see a tag like this being useful.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9179
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: no_intermediate flag on recipes

Post by Rseding91 » Thu Feb 01, 2018 8:03 pm

Can someone give me a small mod that shows the issue on a limited 50x50 map so I can tinker with it?
If you want to get ahold of me I'm almost always on Discord.

Jelmergu
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Mon Apr 04, 2016 8:49 am
Contact:

Re: no_intermediate flag on recipes

Post by Jelmergu » Thu Feb 01, 2018 9:11 pm

I linked a mod in the OP. It will add some recipes to convert burner stage to electric stage. Using that mod and attempting to make a fast inserter will craft the following intermediates: burner inserter -> burner to electric inserter(mod recipe) -> fast inserter
That path for the recipe costs the same materials, but will take a second longer, which was (obvliously) not the intention

https://mods.factorio.com/mod/upgrade-machines

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6658
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: no_intermediate flag on recipes

Post by bobingabout » Thu Feb 01, 2018 9:38 pm

Jelmergu wrote:I linked a mod in the OP. It will add some recipes to convert burner stage to electric stage. Using that mod and attempting to make a fast inserter will craft the following intermediates: burner inserter -> burner to electric inserter(mod recipe) -> fast inserter
That path for the recipe costs the same materials, but will take a second longer, which was (obvliously) not the intention

https://mods.factorio.com/mod/upgrade-machines
that's the mod I was thinking about with the burner miner drill -> electric miner drill + stone furnace -> burner miner drill issue, isn't it?

I'd link you some of mine, but... if you can fix his mod, the same solution should fix mine too.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9179
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: no_intermediate flag on recipes

Post by Rseding91 » Fri Feb 02, 2018 1:19 am

Ok, for the next version of 0.16. I added a boolean to recipes that when set tells the game to skip them for intermediate-item hand crafting purposes. "allow_as_intermediate". It defaults to true.
If you want to get ahold of me I'm almost always on Discord.

Jelmergu
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Mon Apr 04, 2016 8:49 am
Contact:

Re: no_intermediate flag on recipes

Post by Jelmergu » Fri Feb 02, 2018 8:52 am

bobingabout wrote:
Jelmergu wrote:I linked a mod in the OP. It will add some recipes to convert burner stage to electric stage. Using that mod and attempting to make a fast inserter will craft the following intermediates: burner inserter -> burner to electric inserter(mod recipe) -> fast inserter
That path for the recipe costs the same materials, but will take a second longer, which was (obvliously) not the intention

https://mods.factorio.com/mod/upgrade-machines
that's the mod I was thinking about with the burner miner drill -> electric miner drill + stone furnace -> burner miner drill issue, isn't it?

I'd link you some of mine, but... if you can fix his mod, the same solution should fix mine too.
Yes it was, fixed that issue though
Rseding91 wrote:Ok, for the next version of 0.16. I added a boolean to recipes that when set tells the game to skip them for intermediate-item hand crafting purposes. "allow_as_intermediate". It defaults to true.
Thanks

Post Reply

Return to “Implemented mod requests”

Who is online

Users browsing this forum: No registered users