Page 1 of 1

new building

Posted: Tue May 21, 2013 12:42 am
by Egorka
please tell me what to do to the material prepared from nothing only spending energy?

sorry for my english!

Re: new building

Posted: Tue May 21, 2013 2:08 am
by kovarex
Hello,
it is an interesting idea.
This is not possible in this version as if you specify empty ingredients in recipe it crashes.
But we might fix it for 0.5.0.

Re: new building

Posted: Tue May 21, 2013 3:02 am
by FreeER
kovarex wrote:Hello,
it is an interesting idea.
This is not possible in this version as if you specify empty ingredients in recipe it crashes.
Actually I noticed that drs9999 did this quite a while ago :)
simply use

Code: Select all

ingredients = {},
in an assembling machine recipe. True Factorio crashes if you leave it as a player-craftable recipe (probably do to factorio trying to detect the raw resources or just an inability to display nil as the ingredients) but you asked about a building anyways so :D

If you are not sure how to make it an assembling machine recipe it's something like this

Code: Select all

    {
      type = "recipe-category",
      name = "your-crafting-category" --whatever name you want to give your crafting category
    },
    {
        type = "recipe",
        name = "material", --recipe name, typically the same name of material the building will be producing
        category = "your-crafting-category", --the name you gave the crafting category above
        energy_required = 10,
        ingredients = {},
        result = "material", --name of the material produced
        result_count = 10 --number of 'material' that will be produced in one 'turn'
    },
Then just create an assembling machine entity and add your-crafting-category to the crafting_categories list (I didn't want to spam the post with the code for an assembling machine), don't forget to add a recipe for the assembling machine though.