Removing power pole collision doesn't change biter pathing?
Posted: Fri Aug 03, 2018 3:34 pm
I'm trying to write a mod to prevent biters from attacking big power poles, specifically so that they stop killing random big poles that go to my mining outposts. The only reason they appear to kill the poles is they get stuck on them walking to my main base, and as you probably know, they attack when they get stuck.
So I created a simple mod to remove the collision box from the power poles, however, in my testing, they still seem to run into the poles and attack them same as before, despite the fact that I can run and drive through the poles myself with no problem. I'm assuming it's because the pathing algorithm doesn't actually care about collision and is just looking for placed items? Any insight on this?
The lua code for my mod is just:
So I created a simple mod to remove the collision box from the power poles, however, in my testing, they still seem to run into the poles and attack them same as before, despite the fact that I can run and drive through the poles myself with no problem. I'm assuming it's because the pathing algorithm doesn't actually care about collision and is just looking for placed items? Any insight on this?
The lua code for my mod is just:
Code: Select all
for _, pole in pairs(data.raw["electric-pole"]) do
pole.collision_box = {{0,0}, {0,0}}
end