⚠️ SearchlightAssault ⚠️


Adds a game map and searchlights which sweep for foes at great range, alerting you while directing adjacent turrets to snipe spotted foes. Designed to dovetail with the early-mid game, searchlights provide: - Circuit network interfaces for search & detection I/O - Incentive to automate lamp & combinator production in the early game - New tactics to assault biter bases without leap-frogging turrets!

Content
7 days ago
1.1 - 2.0
12.8K
Combat

b Crash bug + minor bug

2 years ago

I've been getting an error recently ever since I put in more than one searchlight in the same range area, which is causing game crashes. It may also be due to a vastly increased attack size since I started, I am uncertain. Unfortunately, I can't give a mod list, as I am using over a hundred mods. - error message: https://cdn.discordapp.com/attachments/267052416132710411/958834732320297050/unknown.png

A less harmful bug: the searchlight appears to be able to target things just outside its range due to the light 'snapping' to nearby targets. This leads to it despawning itself and putting itself back where it started, just to snap back again. This ties up the searchlight, keeping it from scanning for anything else, as well as repeatedly swapping out the turrets nearby it every second or so.

I haven't found any other problems so far, and have been using it for over a day ingame, so I think you've done a great job error-proofing it so far, as the crash issue only cropped up recently. Thanks again for the mod, its been a huge help to keeping my mining outposts worm-free without needing artillery.

2 years ago

Thanks for your report, I'll try to get out a fix for the crash tonight.

Sadly, the repeated 'snapping' is due to a larger, more complicated problem with how I had to implement the searchlight. There so many work-arounds I had to do just to keep the hidden entity the searchlight actually tracks from wandering out of range...
I intend to keep working on a more reliable solution, but there's no chance of me making an improvements for tracking entities at the farthest-reach of a searchlight anytime soon.

2 years ago
(updated 2 years ago)

I have released version 1.2.5 to attempt to fix the crash.
The new version should start to appear in the mod portal shortly.
If you don't see it in-game you can download it manually here: https://mods.factorio.com/mod/SearchlightAssault/downloads

I was not able to replicate the crash you saw though.
If the crash still persists, you can try to send me a copy of your saved game & mods via dropbox or google files or email (bolderbrush10@gmail.com), however works for you.

2 years ago

Damn, I go to take a nap and already an attempted fix? Nice work, I'll try it out later and let you know. And I figured the snapping issue may have been pretty complex as well, so no worries, as mentioned it is more annoying rather than a serious problem.

That said, you did remind me of another minor issue that is also likely too troublesome to try to fix, but might as well report -- if you have the searchlight set to, for example, min range 65, 270 degree arc, the light will path through the center where it is told not to check in order to get to the other side rather than pathing through the allowed range. This annoyed me quite a bit, and was why I switched to using multiple searchlights. Unsure if you were aware of that or not. Might be worth mentioning on the instructions you have if you don't have an easy fix for it.

2 years ago

Yeah that's another non-trivial issue. The searchlight basically just picks random points within the search area and travels straight between them. Changing that would involve a fair amount of work so it's far on the backburner.

2 years ago

I figured that was the case. Might just want to drop a note about that in the instructions so it doesn't surprise people.

I was able to play for about an hour without any crashes, where it was previously happening every 10m or so, but then I got a new crash error. - https://cdn.discordapp.com/attachments/267052416132710411/958940983121305650/unknown.png

This one occurred about a second after I had a construction bot replace a max rank hero turrets laser tower with a new one at the top left corner of that formation.

2 years ago

Interesting. I can't remember if I anticipated a turret being fast-replaced with.. itself, basically.

I happen to have hero turrets installed right now, so I'll take a look.
If I don't make an update in the next couple hours, that means I'll have to keep working when I get home from my day job.

2 years ago

Thanks a lot for your quick response time. And on the exact same note, sorry for breaking your mod so often. I swear I'm not trying to, I just enjoy the mod and use it lots :P

But yeah, I try to farm up high level turrets, so I keep replacing the best with fresh ones, and it bit me in the ass this time. I've reproduced this bug three times now with the exact same situation, if I replace a turret, it dies when it attempts to boost it. As long as I manually remove it first, it doesn't crash. Might be specifically limited to bot replacement, I am unsure, as I quit testing after a few attempts with bots.

2 years ago

Was able to replicate it, I think.

Turns out, the player fast-replacing turrets triggers the "on_pre_mined" event, but robots doing a fast replace doesn't trigger "on_robot_pre_mined".
Luckily, they still do make a callback for the "on_robot_mined_entity" event, so I attached a hook for that, which should hopefully fix this.
(I might have to make a bug report about this. Having to check on_mined could cause more lag during mass-builds than checking on_pre_mined...)

I have released version 1.2.6 to attempt to fix this.
The new version should start to appear in the mod portal shortly.
If you don't see it in-game you can download it manually here: https://mods.factorio.com/mod/SearchlightAssault/downloads

Please let me know if this works, because there might be some other corner-case I missed.
(In which case, your save & mods would be appreciated)

2 years ago

No worries about breaking my mod! I really do appreciate the reports, fixing bugs and learning about the game's api is fun for me =)

2 years ago

Can confirm that it works, played for several hours and both replaced and removed turrets via bots without seeing a single error.

Thanks a lot for the rapid patches, as well as the great mod.

2 years ago

You're welcome, thank you for playing!

New response