Changing the "mining time" of Iron ore

Place to get help with not working mods / modding interface.
lepe
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 06, 2016 9:10 pm
Contact:

Changing the "mining time" of Iron ore

Post by lepe »

I want to change the mining speed of Iron ore so that it can be mined faster (per my understanding of the mining formula).
How can this be accomplished?

I've tried a few things in both data.lua and prototypes/items.lua, but none seem to work.
(Though they did add a yellow label to the Iron ore's tooltip with my mod's name, not sure what's that about.)
Here's everything that I've tried:

Code: Select all

data.raw.resource["iron-ore"].autoplace.mining_speed = 1
data.raw.resource["iron-ore"].autoplace["mining-speed"] = 1]
data.raw.resource["iron-ore"].autoplace.speed = 1
data.raw.resource["iron-ore"].mining_speed= 1
data.raw.resource["iron-ore"]["mining-speed"] = 1
data.raw.resource["iron-ore"].speed = 1
Note: My other things in the mod do work successfully, so it's not a problem with mod not working/activating.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Changing the "mining time" of Iron ore

Post by prg »

You're looking for data.raw.resource["iron-ore"].minable.mining_time
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
lepe
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 06, 2016 9:10 pm
Contact:

Re: Changing the "mining time" of Iron ore

Post by lepe »

prg wrote:You're looking for data.raw.resource["iron-ore"].minable.mining_time
Excellent, that did the trick. Thank you.

Is there a place where I can look up this API?
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Changing the "mining time" of Iron ore

Post by prg »

I just had a look through data/base/prototypes/entity/demo-resources.lua and made a guess.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
lepe
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 06, 2016 9:10 pm
Contact:

Re: Changing the "mining time" of Iron ore

Post by lepe »

prg wrote:I just had a look through data/base/prototypes/entity/demo-resources.lua and made a guess.
I see. Thanks for your help.
Post Reply

Return to “Modding help”