⚠️ 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

g Crash with Space Exploration (and Krastorio2)

2 years ago

While testing and making blueprints this repeating error happens.
It crashes whenever a metroid from the mod Space Exploration lands. My best guess is, that it cant handle the asteroid entity (a rock with some random ore) lands. The actual position of the meteor landing is way outside the searchlights range.

Screenshot of the game:
https://imgur.com/a/ubMVPvQ

Here is the log, there are some other mods in the list, but since its consistent crash on metroid seems to clearly point to Space Exploration incompatibility:

508.650 Loading map C:\Users\User\AppData\Roaming\Factorio\saves_autosave3.zip: 6730200 bytes.
508.692 Loading level.dat: 47211456 bytes.
508.694 Info Scenario.cpp:198: Map version 1.1.49-1
509.234 Loading script.dat: 9898725 bytes.
509.236 Checksum for script C:/Users/User/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 118669571
509.238 Checksum for script EvoGUI/control.lua: 759905060
509.238 Checksum for script WireShortcuts/control.lua: 3073304827
509.240 Checksum for script aai-signal-transmission/control.lua: 2864667130
509.242 Checksum for script aai-vehicles-miner/control.lua: 2646572173
509.243 Checksum for script aai-vehicles-warden/control.lua: 3588461482
509.244 Checksum for script aai-zones/control.lua: 1868523975
509.246 Checksum for script AutoDeconstruct/control.lua: 3289808711
509.247 Checksum for script automatic-logistic-chests/control.lua: 3129451948
509.249 Checksum for script bobinserters/control.lua: 1409446246
509.252 Checksum for script crafting_combinator/control.lua: 1180791844
509.253 Script @even-distribution/framework.lua:72: 0 [ED] Initializing framework... DEBUG = false
509.253 Script @even-distribution/framework.lua:72: 0 [ED] Registering custom scripts...
509.253 Script @even-distribution/framework.lua:72: 0 [ED] Script: metatables
509.253 Script @even-distribution/framework.lua:72: 0 [ED] Script: util
509.254 Script @even-distribution/framework.lua:72: 0 [ED] Script: helpers
509.254 Script @even-distribution/framework.lua:72: 0 [ED] Script: setup
509.255 Script @even-distribution/framework.lua:72: 0 [ED] Script: remote
509.255 Script @even-distribution/framework.lua:72: 0 [ED] Script: visuals
509.255 Script @even-distribution/framework.lua:72: 0 [ED] Script: gui-tools
509.256 Script @even-distribution/framework.lua:72: 0 [ED] Script: drag
509.256 Script @even-distribution/framework.lua:72: 0 [ED] Script: cleanup
509.256 Script @even-distribution/framework.lua:72: 0 [ED] GUI-Script: settings-gui
509.257 Script @even-distribution/framework.lua:72: 0 [ED] Registering default event handlers...
509.257 Script @even-distribution/framework.lua:72: 0 [ED] Registering custom inputs...
509.257 Script @even-distribution/framework.lua:72: 0 [ED] Input: inventory-cleanup event: on_inventory_cleanup
509.257 Script @even-distribution/framework.lua:72: 0 [ED] Input: fast-entity-transfer-hook event: on_fast_entity_transfer_hook
509.258 Script @even-distribution/framework.lua:72: 0 [ED] Input: fast-entity-split-hook event: on_fast_entity_split_hook
509.259 Script @even-distribution/framework.lua:72: 0 [ED] Successfully initialized
509.259 Checksum for script even-distribution/control.lua: 850894597
509.266 Checksum for script FNEI/control.lua: 930362669
509.267 Checksum for script grappling-gun/control.lua: 2370778191
509.297 Checksum for script helmod/control.lua: 2350297159
509.299 Checksum for script informatron/control.lua: 791590929
509.300 Checksum for script InserterFuelLeech/control.lua: 3165429039
509.301 Checksum for script Item_Collector_Updated/control.lua: 2836125451
509.303 Checksum for script jetpack/control.lua: 3514443190
509.303 Checksum for script kj_tower/control.lua: 0
509.307 Checksum for script Mining_Drones/control.lua: 4112820248
509.308 Checksum for script robot_attrition/control.lua: 540612876
509.311 Checksum for script SearchlightAssault/control.lua: 814772183
509.313 Checksum for script shield-projector/control.lua: 3360108861
509.317 Checksum for script solar-calc/control.lua: 4191612395
509.317 Checksum for script space-exploration-graphics/control.lua: 17466373
509.318 Checksum for script space-exploration-graphics-4/control.lua: 17466373
509.319 Checksum for script textplates/control.lua: 863327858
509.319 Checksum for script VehicleSnap/control.lua: 1248096782
509.321 Checksum for script aai-industry/control.lua: 2028173134
509.323 Checksum for script aai-programmable-structures/control.lua: 3294962172
509.324 Checksum for script boblogistics/control.lua: 1263717110
509.326 Checksum for script combat-mechanics-overhaul/control.lua: 2424450201
509.327 Checksum for script equipment-gantry/control.lua: 213074401
509.331 Checksum for script LogisticTrainNetwork/control.lua: 883451328
509.334 Checksum for script ModuleInserter/control.lua: 3064918377
509.344 Checksum for script Nanobots/control.lua: 2747626229
509.351 Checksum for script PickerDollies/control.lua: 2554334069
509.358 Checksum for script aai-programmable-vehicles/control.lua: 3645590117
509.363 Checksum for script LTN_Combinator_Modernized/control.lua: 3212023455
509.441 Checksum for script space-exploration/control.lua: 3895801953
509.452 Checksum for script Krastorio2/control.lua: 2107192779
509.456 Checksum for script underground-pipe-pack/control.lua: 2842273367
509.457 Checksum for script aio_se_k2_fluid_permutations/control.lua: 564974066
509.460 Checksum for script miniloader/control.lua: 2709966364
509.467 Checksum for script Transport_Drones/control.lua: 2863824784
509.468 Checksum for script aio-se-k2/control.lua: 2304274337
509.475 Checksum for script EditorExtensions/control.lua: 2213792081
552.315 Error MainLoop.cpp:1283: Exception at tick 3080540: The mod ⚠️ SearchlightAssault ⚠️ (1.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event SearchlightAssault::on_trigger_created_entity (ID 23)
SearchlightAssault/control.lua:219: attempt to index global 'entity' (a nil value)
stack traceback:
SearchlightAssault/control.lua:219: in function <SearchlightAssault/control.lua:215>

2 years ago
(updated 2 years ago)

Thanks for the report!

I believe I've fixed this, please update to the latest version 1.0.2

If you don't see it in the mod portal yet, you can try downloading manually here: https://mods.factorio.com/mod/SearchlightAssault/downloads

2 years ago

yep, I noticed the update you did and I updated the mod and retested it, the asteroid now doesnt crash the game, so it was the same kind of problem as the other post.
Consider this thread closed and fixed. Good job

2 years ago

yep, I noticed the update you did and I updated the mod and retested it, the asteroid now doesnt crash the game, so it was the same kind of problem as the other post.

Edit:
I use this discussion to post further bugs I found, I hope you notice this edit.
I love the idea of this mod, and thats why I started to play with it and try to put it into blueprints I used, but I noticed more bugs as I tried to add it it to more complex mods.

With Krastorio2:
-when the spotlight finds a target, the turret fires at it, but its range is not increased, it wastes its bullets.
-when picking up the spotlight or destroying it, the turrets its influencing get damaged and in some cases the ammo gets removed.
I think both are related to Krastorio editing the turrets devault values, its range and health.

crashes with the mod Editor Extension:
While in the Editor Mode, when on any other Tab that the Default "None" Tab, picking up either turrets or the searchlights crashes the game.

using the King Jo's Watchtower Mod:
The watchtower is influenced by the Spotlight, even when not directly adjecent to the searchlight. I think it suffers from the same range bug as Krastorio Default turrets. https://mods.factorio.com/mod/kj_tower

I've uploaded the savegame (https://anonfiles.com/j90dtbK4v0/Spotlight_test_Gunrange_zip)

I use this space to make a suggestion as well:
I really like the spotlights as a guard thing, but it really needs further, easier settings. With the circuit network we can manipulate its search light, but that freezes it completly onto that spot with a constant signal, doing any custom search patterns requires a extensive signal manipulation.

What I'd like to see is something like this:
- when given either X or Y but not both: make it still sweep on the unset axis.
That way we can make it sweep left&right or up&down on a set distance with a simple constant combinator sending either X or Y.

  • a setting to lock only positive or negative on X and Y separatly (for example y=-1 => only negative Y)
    With this we can make it search only 180° ( X=1, Y unset) or lock it 90° sections (e.g. X=1, Y-1).
    Again, a simple constant combinator sending X/Y with -1 or 1.
2 years ago
(updated 2 years ago)

Thanks for the comprehensive reporting!
I'll try downloading those mods and your saves, and taking a look after work tonight.

I agree it's a little complicated to set up a clock with the combinators to build a search pattern. I'll think about how to implement something like your suggestion as I get more feedback. For example, another player suggested be able to just set a 'cone': https://mods.factorio.com/mod/SearchlightAssault/discussion/61bba99a2d71da38997292dd

2 years ago
(updated 2 years ago)

So, I disabled my mod entirely and experimented a little.

Krastorio has an option for 'realistic combat' that changes most bullets to have a limited range, regardless of what they're put in.

You should be able to observe that the King Jo Watch Tower can't reach its full range with the Rifle magazine ammo, but it can with the Uranium rounds, regardless of my mod being present.

If you load your savegame, and use uranium rounds or immersite rounds in all turrets instead of the rifle magazines, you should see them all able to kill their targets again.

It looks going into the Krastio mod settings and disabling 'More realistic weapons' also removes the range issue.

Not sure what I should do about this, since it looks like it's intended by the mod author that I don't override the range of their various ammo types.
I think I can try to avoid boosting turrets that hold ammo that can't reach their target, but it will take me a little while to figure out how to solve that.

2 years ago

Editor crash:
I think I know what the problem is.

The editor tabs don't fire on_created / destroyed events. This was a known issue before release that I described in my mod's readme file, but I wasn't expecting players to have the game running while editing.

I will add some checks to try to handle this situation, I don't think that will be too hard.

2 years ago

You were exactly right about the Krastorio turrets losing health.

I think I can try changing the order in which my mod builds some data to work around this.

As far as losing ammo, I'm not sure what circumstances cause that. But I did notice that you somehow loaded pistol ammo into some gun turrets and rifle ammo in others, and the turrets are only supposed to accept rifle ammo. I think maybe you somehow did this using the mod editor?

I will have to do more research to figure out how to detect if a turret is holding ammo I won't be able to put back when I'm done boosting that turret.

2 years ago

The default factorio ammo is pistol ammo in Krastorio, thats why some turrets are loaded with that after activating that mod. When enabling Krastorio to test the source of the "short range bug" this happend. It needed manual switching ammo in the box and taking out the wrong ammo, thats why some are still left with pistol ammo. The Ammo lost thing could be because of that, since both the pistol and rifle ammo use the same red ammo icon I probably mixed that up. The ammo lost is probably pistol ammo that couldn't be put back in, which was a bug to begin with. No need to put work into that, its a bug of a bug case.

I didn't think Krastorio had settings like "realistic weapon range". If its intended that bullets only reach further on higher research then so be it.
I never noticed that Krastorios Ammo setup influenced other turrets AI to simply waste bullets on targets it cant reach thoug.,
Some compatibilty to Krastorio would still be nice, to either disable the ammo waste or make its reach increase work. A check for "can the turret actually reach the target, if not dont slave a turret to fire" or something.
Krastorio is a well known mod, and compatibility with modded turret ranges in general should be in your mods interest too.

2 years ago

I've released version 1.0.3 which at least fixes the range-check issue.

It 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 still need to figure out how Krastorio is messing with the turret health, since changing the order in which I load prototypes didn't help.
I also still need to fix the map editor crash.

It might be a few days until I get to that, I'll be visiting family this weekend. Thank you very much for your help!

2 years ago

I just released version 1.0.5 -- it has a (default true) option to allow turrets to boost the max_range on ammo they're using
It seems like most people expect the mod to do this, so if it's too balance-breaking people can just turn the option off.

The modded health on turrets should be fixed in this version.

And it also should have the map editor crashes mostly fixed -- it's not 100% reliable since there's still no events being fired by the map editor, but it should get 99% of them.

You can grab it manually here if you don't see it in-game yet:
https://mods.factorio.com/mod/SearchlightAssault/downloads

Thank you again for your comprehensive reporting, it means a lot to me.

Next thing to work on will be the circuit network integration.

New response