Page 1 of 1

Chemical Plant with a fixed recipe ?

Posted: Wed May 11, 2016 4:41 pm
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 ?

Re: Chemical Plant with a fixed recipe ?

Posted: Thu May 12, 2016 7:56 am
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.

Re: Chemical Plant with a fixed recipe ?

Posted: Thu May 12, 2016 11:35 am
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 ?

Re: Chemical Plant with a fixed recipe ?

Posted: Thu May 12, 2016 1:45 pm
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.

Re: Chemical Plant with a fixed recipe ?

Posted: Thu May 12, 2016 2:02 pm
by DevilXD
A furnace can work with fluids ?

Re: Chemical Plant with a fixed recipe ?

Posted: Thu May 12, 2016 2:41 pm
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...

Re: Chemical Plant with a fixed recipe ?

Posted: Fri May 13, 2016 8:12 am
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.