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. )
Where to find the production time of each product
-
- Inserter
- Posts: 20
- Joined: Wed Dec 13, 2017 2:32 pm
- Contact:
Re: Where to find the production time of each product
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.
The above is a small extract from ..\data\base\prototype\recipe.lua.
Hiladdar
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"
},
Hiladdar
-
- Inserter
- Posts: 20
- Joined: Wed Dec 13, 2017 2:32 pm
- Contact:
Re: Where to find the production time of each product
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.
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
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!