Drills of Drills

by Braxbro

Adds new, larger variants of drills that are equivalent to multiple of their smaller counterparts.

Content
11 months ago
1.1
586
Mining

b Crash on adding mod to existing game

1 year, 1 month ago

I just tried to install this mod on an existing game and got this crash on loading the game. I don't have any modded drills, but I do have other mods installed.

The mod Drills of Drills (1.0.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event drills-of-drills::on_nth_tick(150)
drills-of-drills/control.lua:75: attempt to compare nil with number
stack traceback:
drills-of-drills/control.lua:75: in function 'restrictSpeed'
drills-of-drills/control.lua:276: in function <drills-of-drills/control.lua:276>

1 year, 1 month ago
(updated 1 year, 1 month ago)

My bad. Forgot to set it to refresh the speed limits before calling restrictSpeed in startup. I'll try that and test to see if it fixes the issue.

Also this is a really strange issue.

1 year, 1 month ago

Should be fixed now. Added a check to refresh speed limits when it can't find one, rather than crashing. This shouldn't cause a crash anymore.

1 year, 1 month ago

The load time crash is fixed.
I was able to load, and craft one of the drill, but it crashed again before I even put it down.
Seems like the same failure?


The mod Drills of Drills (1.0.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event drills-of-drills::on_nth_tick(150)
drills-of-drills/control.lua:78: attempt to compare nil with number
stack traceback:
drills-of-drills/control.lua:78: in function 'restrictSpeed'
drills-of-drills/control.lua:289: in function <drills-of-drills/control.lua:288>

1 year, 1 month ago
(updated 1 year, 1 month ago)

Hm. Is this in singleplayer?

And how big is the save? Can you send it to me?

1 year, 1 month ago

It's a single player game.
Here's the save file: https://drive.google.com/file/d/1gOmBMC9W7-2qbvb9ZETPQNpAX0FJxAde/view

What I did was load with the mod on, hand craft the largest drill, and a few seconds later it crashed.

1 year, 1 month ago

Crafting the drill has no effect on that. The code that's crashing is for restricting the speed of placed Drills of Drills.

1 year, 1 month ago
(updated 1 year, 1 month ago)

Would you happen to have been walking near drills during the crash? I got a matching crash out of walking next to your mining patches, as though I was about to use the Drill of Drills I'd just crafted. Standing still and crafting caused no crash.

1 year, 1 month ago

1.0.7 contains a fix for this particular crash. Give it a try.

1 year, 1 month ago

Yes, I was walking towards one of the existing patches to replace the vanilla drills with a huge one.
The latest patch fixed the issue =)
Thanks!

1 year, 1 month ago
(updated 1 year, 1 month ago)

Yeah. So, what was happening was that every 150 ticks, (2.5s) Drills of Drills runs its speed cap check in priority-only mode, so that drills within the player's reach get updated quicker. (other drills are checked once per 900 ticks (15s))

The problem is that, with how I was assembling the list of priority drills, if you hadn't yet placed a Drill of Drills on the save, the priority drills list would pick up non-Drills of Drills, which obviously don't have a speed cap through my mod. Hence the comparison to nil. This was an API quirk I wasn't aware of and thus didn't ensure against.

How I fixed this was to simply check if the list of previously placed Drill of Drills types was empty, and if it was, then instantly return to break out of the speed check, regardless of whether or not it was a priority speed check or not, to cover for the API quirk I was previously unaware of.

New response