Page 1 of 1

SlowMining 0.0.1 (11.16)

Posted: Sat Mar 07, 2015 7:56 pm
by Flux Faraday
This tiny mod changes the electric drill to reduce mining speed and power consumption by a factor of ten. It leads to an interesting playthrough. Rather than mining an area out and moving on, you have to keep expanding to provide a rate of resource production that is what you need. Most resource deposits (on normal settings) will still be producing at end-game, and you'll have a thousand-ish drills running at end game (I had 840 and it wasn't enough). Have fun!
The main code for this mod is simply:

Code: Select all

-- Adjust mining drills
print(data.raw["mining-drill"]["basic-mining-drill"].mining_speed)
data.raw["mining-drill"]["basic-mining-drill"].mining_speed = 0.05
data.raw["mining-drill"]["basic-mining-drill"].energy_usage = "9kW"
print(data.raw["mining-drill"]["burner-mining-drill"].mining_speed)
data.raw["mining-drill"]["burner-mining-drill"].mining_speed = 0.035
data.raw["mining-drill"]["burner-mining-drill"].energy_usage = "30kW"
So it's easy to change if 10x is too much or too little.
FYI: here is the original thread in game balance: https://forums.factorio.com/forum/vie ... =16&t=8983

Re: SlowMining 0.0.1 (11.16)

Posted: Sat Mar 07, 2015 8:53 pm
by L0771
or more compatible with all mods

Code: Select all

for _,v in pairs(data.raw["mining-drill"]) do
   v.mining_speed = v.mining_speed * 0.1
   v.energy_usage = (tonumber(string.sub(v.energy_usage, 1, -3))) * 0.1 .. " kW"
end
easy to change and work with all mining drills, maybe if you want a list of excluded entities try with

Code: Select all

local exclude =
{
	["pumpjack"] = 1
}
for _,v in pairs(data.raw["mining-drill"]) do
	if not exclude[v.name] then
		v.mining_speed = v.mining_speed * 0.1
		v.energy_usage = (tonumber(string.sub(v.energy_usage, 1, -3))) * 0.1 .. " kW"
	end
end
Or maybe excluded with a list

Code: Select all

local exclude =
{
	["pumpjack"] = 0.9
	["burner-mining-drill"] = 0.2
}
for _,v in pairs(data.raw["mining-drill"]) do
	if exclude[v.name] then
		v.mining_speed = v.mining_speed * exclude[v.name]
		v.energy_usage = (tonumber(string.sub(v.energy_usage, 1, -3))) * exclude[v.name] .. " kW"
	else
		v.mining_speed = v.mining_speed * 0.1
		v.energy_usage = (tonumber(string.sub(v.energy_usage, 1, -3))) * 0.1 .. " kW"
	end
end
I like the idea, but i think 10% is too hard :|

Re: SlowMining 0.0.1 (11.16)

Posted: Sun Mar 08, 2015 6:30 pm
by Flux Faraday
L0771 wrote:or more compatible with all mods
Thanks for the tips. I'll incorporate them if I do an update of if there are requests.

Re: SlowMining 0.0.1 (11.16)

Posted: Tue Mar 10, 2015 6:44 pm
by waduk
How about the polution ? Is it also reduced ? I hope it should as well...
I might give this a try and give you and the your other thread a feedback.

Re: SlowMining 0.0.1 (11.16)

Posted: Wed Mar 11, 2015 3:57 am
by L0771
The pollution is proportional to energy used.

Re: SlowMining 0.0.1 (11.16)

Posted: Wed Mar 11, 2015 11:26 pm
by Flux Faraday
waduk wrote:How about the polution ? Is it also reduced ?
Yep, it's designed to be energy/pollution neutral. I'll be happy to hear what you think :)