Page 1 of 1

Where to find the production time of each product

Posted: Sat May 02, 2020 3:59 pm
by Panderturtle
Where do I find the production time of each product in the game files of Factorio?

I want to make a ratio calculator myself and need the production time of the items, but can't find them. I've found in recipe.lua the ingredients and the amount each item needs, the time is neither in item.lua nor any other file I looked up.

(I'm not sure if this is the right sub forum, if so, I'll move it to the right one. :? )

Re: Where to find the production time of each product

Posted: Sat May 02, 2020 6:16 pm
by Hiladdar
In summery, it is the energy_required parameter. If there is no value defined, then it defaults to 1. In an ideal world, this field would of been called time required, and energy_required would of been a separate field defining multiple of how much power this item took to manufacture.

Code: Select all

{
    type = "recipe",
    name = "speed-module-2",
    enabled = false,
    ingredients =
    {
      {"speed-module", 4},
      {"advanced-circuit", 5},
      {"processing-unit", 5}
    },
    energy_required = 30,     -- This is the line of code which defines how many seconds it takes to assemble this item.
    result = "speed-module-2"
  },
The above is a small extract from ..\data\base\prototype\recipe.lua.

Hiladdar

Re: Where to find the production time of each product

Posted: Sat May 02, 2020 6:55 pm
by Panderturtle
Thank you!

Now it totally makes sense. I've allready read the energy/work thread in the Wiki, but forgot about it. Nevermind, thank you for your quick response.

Re: Where to find the production time of each product

Posted: Sun May 03, 2020 12:31 pm
by Pi-C
Hiladdar wrote:
Sat May 02, 2020 6:16 pm
In summery, it is the energy_required parameter. If there is no value defined, then it defaults to 1.
Sorry, but you've got a tiny detail wrong! See the wiki:
energy_required

Type: double
Default: 0.5
Optional. The amount of time it takes to make this recipe.

This is the number of seconds it takes to craft at crafting speed 1.
:-)