Making a recipe only usable in Assembler

Place to get help with not working mods / modding interface.
Post Reply
Murlocking
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Thu Mar 10, 2016 11:41 pm
Contact:

Making a recipe only usable in Assembler

Post by Murlocking »

I downloaded Bob's Enemies and I wanted to modify a recipe for personal use.

The current recipe is 25 small artifacts for 1 Alien Artifact but I wanted to change the recipe so it can only be made in an Assembler to make it a bit less OP.
Using some power to convert the Artifacts only seems logical too me.

Do you guys know how to make a recipe only usable in an Assembler and maybe also increase the energy (time) required to craft an item in an assembler.


Thanks :)

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Making a recipe only usable in Assembler

Post by keyboardhack »

It's possible to limit a recipe to only an assemebler 2 or 3 which is close enough to what you want to do. By looking at some of the recipes that have this restriction we can see what makes them special.
Lets take an engine as an example as it has to be made in an assembler.

Code: Select all

{
    type = "recipe",
    name = "engine-unit",
    energy_required = 20,
    category = "advanced-crafting",
    ingredients =
    {
      {"steel-plate", 1},
      {"iron-gear-wheel", 1},
      {"pipe", 2}
    },
    result = "engine-unit",
    enabled = false
}
If we compare it to other recipes then we can see that this one is different because it has the line

Code: Select all

category = "advanced-crafting",
So adding that line to the alien artifact recipe should limit it to be made in an assembler.
Now to mess with the power usage i assume you can add or modify the line below in the same recipe.

Code: Select all

energy_required = 20,
You can find the code for the recipe inside the mod by unpacking the mod. Now where the code is located inside the mod i can't help you with but a quick search in the mod should find it.
Waste of bytes : P

Murlocking
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Thu Mar 10, 2016 11:41 pm
Contact:

Re: Making a recipe only usable in Assembler

Post by Murlocking »

Thank you so much!

That's exactly what I needed and I love the way you explain it to me :)

Cheers! :lol:

Post Reply

Return to “Modding help”