Where to find the production time of each product

Place to get help with not working mods / modding interface.
Panderturtle
Inserter
Inserter
Posts: 20
Joined: Wed Dec 13, 2017 2:32 pm
Contact:

Where to find the production time of each product

Post 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. :? )
Hiladdar
Fast Inserter
Fast Inserter
Posts: 214
Joined: Mon May 14, 2018 6:47 pm
Contact:

Re: Where to find the production time of each product

Post 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
Panderturtle
Inserter
Inserter
Posts: 20
Joined: Wed Dec 13, 2017 2:32 pm
Contact:

Re: Where to find the production time of each product

Post 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.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1726
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Where to find the production time of each product

Post 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.
:-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Modding help”