Will-o'-the-Wisps updated deprecated


A glowing enigmatic life form was found to inhabit alien forests at night. Based on the original mod by Betep3akata. Probably won't work in multiplayer.

Content
1 year, 8 months ago
0.16 - 1.1
2.43K
Enemies

b [incompatibility] Wisps not vanishing at daytime?

5 years ago

Our game's got a bit of a problem... there's a load of hostile red wisps due to a meteor impact at night, and... they're still hostile. And refuse to despawn at dayreak. They've made part of the map unusable due to just how many they are, and cause any nearby wisps to auto-aggro as well

5 years ago

Edit: Also, the "automated defense" option doesn't seem to work... at all. the turrets always fire on wisps

5 years ago

Edit 2: Base defense option 'seems' to work if you turn it on and back off, and I 'think' the issue is an odd interaction with Swarmageddon. Swarmageddon is activating on Wisps, causing new wisps to spawn when one dies... these seem to lack their light, and are always aggro

5 years ago

Note that "turrets attack wisps" option only has effect on non-hostile wisps, i.e. those that aren't already aggressive towards you.
Turrets should always attack wisps that are attacking them (or your faction in general), regardless of that setting.

Wrt swarmageddon - yeah, it looks like the way that mod works, you will inevitably run into such issues, as its explicit goal stated in the description is to affect entitites from other mods, so it does, to the effect you're observing.
If it doesn't spawn wisps from nothing though, you should be able to still deal with it, I think - just fight them off with UV lamps and clear the areas of trees so that new ones won't spawn there.
You can also decrease spawn rates dramatically for yellow ones to have an easier time, and avoid walking around forests at night in general :)

Daylight should still kill the wisps, and they expire naturally too, but if swarmageddon just makes them insta-respawn, guess that'd be why they essentially live throughout the day, just with lower health levels after each resurrection.
As a quick and dirty workaround, I'd suggest going into lua of swarmageddon and limiting it to only affect "enemy" force (vanilla enemies), as that seem to be what you essentially want.

5 years ago
(updated 5 years ago)

As a quick and dirty workaround, I'd suggest going into lua of swarmageddon and limiting it to only affect "enemy" force

I think you should be able to do that like this:

  • Go to factorio mods directory, which should be "mods" under Application Directory.
  • Find "Swarmageddon_1.0.4.zip" file there, unpack its contents ("Swarmageddon_1.0.4" directory) to the same dir, remove the zip file jic, so you'd just have "Swarmageddon_1.0.4" dir instead of "Swarmageddon_1.0.4.zip" file there.
  • Open "control.lua" file in that dir with Notepad++ (good text editor for Windows), and add if deadUnit.force ~= "enemy" then return end line at the top of "queueEnemiesOnDeath" function, so it'd look like this:
-- Add enemies to the queue to be spawned
function queueEnemiesOnDeath(deadUnit, cause)
    if deadUnit.force ~= "enemy" then return end

    local evoFactor = game.forces["enemy"].evolution_factor
    local name = deadUnit.name

    if (deadUnit.type == "unit-spawner") then ...

That should disable all effects of swarmageddon mod on anything but units in "enemy" force (i.e. biters).

Don't think unpacked mods will get auto-updated via in-game mod manager, but if it'll prompt you to update it, guess you can either uncheck it from updating there or let it update and adjust the new version in a similar way.

5 years ago

using winrar you don't have to unpack the mod at all, I've done a few edits to Space Exploration's meteors without issue... just need to not update, lmao.

And the issue with Swarmageddon isn't that the wisps die and auto-respawn... it's worse than that. Because the meteor aforementioned has a (modified) larger blast radius and works in 4 'phases', yellow wisps at the center are obliterated. Its these wisps that bug out the most, and while the surviving yellow wisps all despawn at daytime the red and green ones that get spawned as a result of the yellow wisp's deaths don't. I don't know if UV lamps will do the trick on those, since they float around midday without being bothered at all.

A theory a friend and I have is because Swarmageddon 'spawns' them outside of the normal expected method (IE: by cutting trees or breaking rocks) it might be bypassing some coded event or something. Thus they become auto-hostile and lack the normal light effect around them.

Anyhow, I'll certainly give the quick fix a try and see if it solves the problem. Thanks for the helpful reply ^^

5 years ago

Yeah, pretty sure your friend is completely right.
When this mod spawns a wisp unit/entity, it also attaches the light effect to it and registers it for later lifecycle tracking (they expire due to daylight or just timeout).

When swarmageddon's on_death hook triggers, it can't do all these things of course, and simply puts entity into a queue to respawn later (with some rate-limits). So it won't have a light or that lifecycle tracking attached to it.
Should be affected by UV lamps though, as they work by getting all entities of particular type within radius.

Swarmageddon respawns units with same "force" value, but I think the moment first wisp gets killed, all others in the area become hostile, and if it happens often enough, they are basically all hostile there all the time, and so are their respawned counterparts.
Think I've added a switch to not count wisps killed by non-player for aggression to options, which might fix this hostility (enables a check in on_death for who the death is attributed to, default is to always assume player, as it can be unclear sometimes), which someone reported wrt meteor-spawning mod as well (maybe same one), though it wasn't confirmed that the check solved the issue.

5 years ago

they are basically all hostile there all the time, and so are their respawned counterparts.

Oh, also, if you don't like them being a nuisance, an option to disable them from attacking (there is also a separate one for damage from purple ones) should work, given how swarmageddon works.
Though it should keep respawning them after being killed by meteors until map is choke-full of them, so it's not a great solution. Proper fix would be not to respawn stuff managed by other mods randomly, I think, but again, that's the goal of that mod, so maybe it should just be highlighted in the description there that it might potentially cause such issues.

5 years ago

Proper fix would be not to respawn stuff managed by other mods randomly

Though thinking about it a bit, guess another good fix would be to add on-entity-spawn hook in this mod and start tracking new wisps there, regardless of which mod decides to spawn them.
I'll look into implementing that, which should fix daylight issue too, not entirely sure if it's easy enough to do, but probably should be.

New response