Chemical Plant with a fixed recipe ?

Place to get help with not working mods / modding interface.
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Chemical Plant with a fixed recipe ?

Post by DevilXD »

Is it possible to create something like this ? Or do I need to create a separate crafting_group and put only my recipe in there ?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by bobingabout »

I suppose the easiest way would be to create a new crafting_category for the new machine, and it's recipe.

If it is a recipe with only a single ingredient, you could also make the factory a furnace instead of an assembling machine(Chemical plant is an assembling machine with a unique recipe list), there is a the slight difference in how choosing a recipe works. The Assembling machine allows you to choose a recipe, where the Furnace auto-selects a recipe, but only works with single ingredient recipes.

If there's only one recipe, and it has a single ingredient, then using furnace would give more of the feel that it can only do this one job, rather than having to select the single recipe each time.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by DevilXD »

I want to create a "water filter" entity. I set the chemical plant, to have one fluid input and one fluid output, so it looks similarly to a small pump. Then, I want it to have this recipe:

Code: Select all

{
    type = "recipe",
    name = "water-filtering",
    energy_required = 0.5,
    ingredients =
    {
      {type="fluid", name="water", amount=20},
    },
    results=
    {
      {type="fluid", name="filtered-water", amount=20}
    },
  },
..., so it's going to "filter" water very fast.

Is there a better way of doing what I want to do ?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by bobingabout »

I think you've pretty much got it figured out already.

The only suggestion I have as said before is to use a Furnace instead of an Assembling machine, then the recipe will be chosen automatically.

Though it does have the one issue when used with fluids that it can be filled with a fluid it doesn't have a recipe for, and requires deconstruction and reconstruction to clear.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
DevilXD
Fast Inserter
Fast Inserter
Posts: 213
Joined: Tue Aug 12, 2014 10:47 am
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by DevilXD »

A furnace can work with fluids ?
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by Sean Mirrsen »

Well, it can have a fluidbox and can work with a recipe, and a recipe can include fluids, so on the most basic level I don't see why not.

Then again I also thought I could just give a lamp a "burner" type energy source like everything else, but that does not work, so...
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Chemical Plant with a fixed recipe ?

Post by bobingabout »

DevilXD wrote:A furnace can work with fluids ?
Yes.
Sean Mirrsen wrote:Well, it can have a fluidbox and can work with a recipe, and a recipe can include fluids, so on the most basic level I don't see why not.

Then again I also thought I could just give a lamp a "burner" type energy source like everything else, but that does not work, so...
I have an entity in my mod, the void pump, or gas release valve, whatever I renamed it to, that automatically disposes of certain gasses (fluids to the game) that enter it.

As for Burner power, the power sources of the game are a bit more hard-coded as to what works where, the main reason why the furnace works with a fluid box is because most of the internal workings are actually just the assembling machine. It's effectively just an auto-recipe assembling machine.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Modding help”