Mining Drones

by Klonan

Adds mining drones and mining depots

Content
3 years ago
0.17 - 1.1
85.6K
Mining

b Game chugging and crash with lots of bots

4 years ago

I've got a game crash with this report:

Mining_Drones::on_script_path_request_finished (ID 112)
Mining_Drones/script/mining_depot.lua:891: attempt to call method 'handle_path_request_finished' (a nil value)
stack traceback:
Mining_Drones/script/mining_depot.lua:891: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

I'm on game version 0.18.17 and mod version 0.3.16 and I can send the save game if it helps.

The mining drones have recently been eating a lot of UPS - up to 50ms per tick, maybe because I recently increased the number that I was using up to ~2000. When I restarted the game, I received this error report.

I accept that I probably need to turn them off for a base this large, but I'm sending this in in case it's just something which is fixable.

4 years ago

Same result when running mod version 0.3.17

Error while running event Mining_Drones::on_script_path_request_finished (ID 112)
Mining_Drones/script/mining_depot.lua:891: attempt to call method 'handle_path_request_finished' (a nil value)
stack traceback:
Mining_Drones/script/mining_depot.lua:891: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

4 years ago

Can you provide a save game?

4 years ago

I fixed the crash.

As for the slowdown, it looks like you removed and readded all the depots on the map, so they are all starting to send out units to start mining.

The lag is processing all the path requests.
After a few minutes the path requests are all processed and as the depots refill their buffer, and the script usage goes back down to normal levels:

4 years ago

Thank you very much :)

I didn't deliberately readd the depots, but I might have done it accidentally somehow. I did notice that when I initially placed the depots in the far west, they kept oscillating between sending and recalling all units. The buffer was slightly too small to keep up with the rate that the loaders were removing the ore (525 per second) with that many capacity upgrades, so it would empty for a short time before the first units returned, then when they all returned it would build the buffer up over 1 stack and recall all units. This may have been causing the pathing issues? I think it settled down once the belts were backed up, but I had recently added new copper depots in the west. If that's a problem, it can easily be worked around by putting less loaders on each depot!

4 years ago

The lag seems to have been caused by the iron depot at the west side of the main smelting area - lots of units lagged out there. Maybe because I used cut+paste?

4 years ago

The lag seems to have been caused by the iron depot at the west side of the main smelting area - lots of units lagged out there. Maybe because I used cut+paste?

New response