Page 1 of 1

[SOLVED] I want to modify the mining_time on trees and rocks

Posted: Tue Oct 31, 2017 7:02 pm
by Guard13007
I figured out how to modify the mining_time on resources (which it seems applies to ores, stone, crude_oil, but NOT to trees or rocks).

But I am having difficulty finding where trees and rocks are defined so I can modify them. I looked at data.raw.tile, data.raw.resource, data.raw.recipe (even though I know that one doesn't make sense), and I can't figure it out.

Re: I want to modify the mining_time on trees and rocks

Posted: Tue Oct 31, 2017 8:15 pm
by Ghoulish
There's a mod called https://mods.factorio.com/mods/zzcorrod ... ee-cutting Fast Tree Cutting, Have a look to see how they achieved it.

Re: I want to modify the mining_time on trees and rocks

Posted: Tue Oct 31, 2017 8:48 pm
by Guard13007
Ghoulish wrote:There's a mod called https://mods.factorio.com/mods/zzcorrod ... ee-cutting Fast Tree Cutting, Have a look to see how they achieved it.
Thank you. Turns out for trees it is incredibly simple:

Code: Select all

for _, tree in pairs (data.raw.tree) do
	tree.minable.mining_time = 0.1
end
Now for rocks...

Re: I want to modify the mining_time on trees and rocks

Posted: Tue Oct 31, 2017 8:51 pm
by Guard13007
Figured out rocks:

Code: Select all

for name, entity in pairs(data.raw['simple-entity']) do
  if name:find('rock') and entity.minable and entity.minable.mining_time then
    entity.minable.mining_time = entity.minable.mining_time / 2
  end
end