Enemy Spiders


This mod adds in enemy spidertrons that spawn at enemy nests and will evolve their equipment grid as evolution rises.

Content
5 months ago
1.1
1.40K
Enemies

g Bug (pun intended)

1 year, 7 months ago
(updated 1 year, 7 months ago)

Excellent idea, has tons of possibilities, but leave it to be to find a way to break it.
I installed the 100% Biter Evolution Start mod and set a new map to Peaceful mode, and after a little running around with the friendly spidertrons:

The mod Enemy Spiders (2.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event EnemySpiders::on_spider_command_completed (ID 171)
__EnemySpiders__/AISpiders.lua:181: attempt to index global 'spiderData' (a nil value)
stack traceback:
__EnemySpiders__/AISpiders.lua:181: in function 'findNext_chasing'
__EnemySpiders__/AISpiders.lua:236: in function 'AISpiders_findNextPosition'
__EnemySpiders__/AISpiders.lua:457: in function <__EnemySpiders__/AISpiders.lua:453>

Not sure if this is a bug, but when not in Peaceful mode (no errors encountered), the spidertrons did not fire lasers at my character, as I had expected. Or possibly the lasers have short range and my personal defense lasers destroyed them first? (Using my own armor/equipment mod).

1 year, 7 months ago

Oh that's such a silly bug.. :skull:

The issue is the spider was checking "spiderData" when it never existed. The reason peaceful had no issues was because there was nothing to chase.
Also, could you please explain more what you mean with the lasers?

1 year, 7 months ago

I have an idea what might have happened, your lasers DO reach slightly farther than the spiders I believe. Btw, late game they are not intended to handle lasers very well. I am considering upping their laser resistances. (I can do that now with 2.0.0 as they are 4 custom entities to change speed, so I can also set their resistances)

1 year, 7 months ago

Ok, that non-recoverable error was just be missing it I guess, but forget my reasoning on the second reply. Turns out, they weren't getting an equipment grid on evolution 100. They get it at 95%, 98% ect. just not EXACTLY 100. Newest patch fixes this! Let me know if there are any more issues!

1 year, 7 months ago
(updated 1 year, 7 months ago)

Hmm, after little more testing, this time with no lasers equipped. It seems the enemy spidertrons do not attack me, they only chase me. If I stop running, they simply stand over me. I was thinking this only happened in peaceful mode, but it occurs in regular mode also. My first tests were in combat mode and my lasers were killing them, so I did not realize they were only chasing.

After a quick look at the code, I noticed for example the health 2000... lasers are equipped, so I was expecting them to fire at me once I was in range.

Edit: I was typing this when you replied... I will try the new version and report my findings.

1 year, 7 months ago

With version 2.0.2, I have not encountered the above error, thank you.

However, the spidertrons do not attack, they only chase my character... you can see a screenshot here:
https://drive.google.com/file/d/1E2fWL3cgr-PuWF9KYXrJu2PJwvVK4mCV/view?usp=sharing

1 year, 7 months ago

Is that the same world as you have previously tried?

1 year, 7 months ago

Ok, well I'm going to ahead and assume this is the same world as before. If it is, then you will have to find freshly generated chunks. The update won't change the existing spiders' grids. It will only affect new ones that spawn in your world.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Yup, you were correct, it was the same world and after generating a new one, they do indeed attack, excellent!

Would it be possible to have them destroyed when biters are destroyed, with a mod like Toggle Peaceful mode that the clears biters in active chunks to reset the combat mode of the active biters?

Also, the spidertron rocket damage kills/damages the biters and nests. I was able to run around a patch of biters and the rocket explosions would kill/damage the biters.

1 year, 7 months ago

Not sure if I can really fix that last bit, I could switch to normal rockets maybe? With the "Toggle Peaceful" thing, not really sure how to implement something like that, or really what that mod is. So I might need to see that mod you mentioned, but I don't really know how that would work.

1 year, 7 months ago
(updated 1 year, 7 months ago)

There might be other similar mods, not sure. The one I am using: https://mods.factorio.com/mod/TogglePeacefulMode
Integrating with the mod is not necessary, but maybe there could be a setting to toggle/reset their mode?

1 year, 7 months ago
(updated 1 year, 7 months ago)

In the code of the toggle mode mod, is this bit:

 --[[ Some mods introduce biter factions. Kill'm! ]]--
  for _, force in pairs(game.forces) do
    if force.name:find("biter_faction_") == 1 then
      force.kill_all_units()
    end
  end

I wonder if the spidertrons could be a biter faction? Not sure if that would/could be used to address the biter damage? I think no damage occurs to same force, but not sure.

1 year, 7 months ago

Well see, I believe that is simply killing all Units, units only being biters/spitters. The spidertrons cannot be classified as "units" so I don't know what you mean by this. The spiders don't get angry though so I don't see a use? They only patrol/chase/escort really. They only really copy the actions of the biters around them.

1 year, 7 months ago

I'm just going to go ahead and lock this for now at least, I will unlock if needed. I think it will be better if you make a separate forum under the suggestions or ideas category. And in the future, put this as a Bug instead of general, I didn't see it at first either though.

This thread has been locked.