Page 1 of 1
Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 12:39 pm
by Jelmergu
I made a
small and simple mod which adds 4 extra recipes. It works fine on its own, but when used with, for example Bob's mods, my recipes get used instead of the base recipes.
For example:
My mod makes a recipe to convert a burner inserter to an electric inserter with the ingredients: 1 burner inserter, 1 electronic ciruit
Bob's mods changes the electronic circuit to a more expensive version. I don't have a problem with that.
When I'd want a fast inserter and I don't have a electric inserter in my inventory, the game will auto craft the electric inserter, using my converter recipe(which is a lot more expensive).
What I would like to do is to prevent the game to use my recipes for auto crafting
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 2:08 pm
by mrvn
you mean you have multiple ways to build X, one of them using your recipe as intermediary and you want the game to default to the other, cheaper, way?
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 2:26 pm
by Jelmergu
mrvn wrote:you mean you have multiple ways to build X, one of them using your recipe as intermediary and you want the game to default to the other, cheaper, way?
Exactly that
But if possible, just make my recipe not able to be autocrafted
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 4:59 pm
by darkfrei
Jelmergu wrote:mrvn wrote:you mean you have multiple ways to build X, one of them using your recipe as intermediary and you want the game to default to the other, cheaper, way?
Exactly that
But if possible, just make my recipe not able to be autocrafted
https://wiki.factorio.com/Prototype/Recipe
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 5:36 pm
by Jelmergu
Tried it, didn't work. To be sure I even tried it using true(even though I knew it wouldn't work)
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 7:51 pm
by darkfrei
Jelmergu wrote:
Tried it, didn't work. To be sure I even tried it using true(even though I knew it wouldn't work)
Move it to advanced crafting like engines?
Code: Select all
{
type = "recipe",
name = "engine-unit",
energy_required = 10,
category = "advanced-crafting",
ingredients =
{
{"steel-plate", 1},
{"iron-gear-wheel", 1},
{"pipe", 2}
},
result = "engine-unit",
enabled = false
},
Re: Prevent a recipe from being used in a different recipe
Posted: Mon Oct 09, 2017 9:55 pm
by eradicator
If i had to take a random guess i'd say there's a good chance the game uses the .order='string' to choose which recipe is prefered. So either you try fiddling with that - it's just a string so try 'zzz-something' to make sure it's sorted last. Or, like suggested above, make your recipe machine-only. Btw is your recipe faster? Total-time it takes to get the final result might also be something the game considers when choosing recipe.
As for a magic "don't allow recursive handcrafting for this"-flag, i don't think one exists.