Page 1 of 1

unit type entity flag to ignore belts

Posted: Fri Oct 06, 2017 12:03 am
by withers
Currently the AI pathfinding works great unless there's a belt. Then it's awful. Biters units can't figure out how to get across a belt if their life depended on it. Some of us have made mods that allow some sort of control over units. (example: https://mods.factorio.com/mods/withers/Followers)

These mods work wonderfully, until you try to get the unit to navigate it's way across a belt. Then unit gets lost and confused. The unit would rather try to travel all the way down the length of the belt, even if it's a mile away, then just move .5 tiles to get across the belt.

I've asked in a previous request to give "simple pathfinding" to fix this. But alas, that request as gone unanswered. So here's another request. Just give us a flag to assign unit-type entities to be immune to belts.

I know someone has already written code for this. How do I know? Because the following is in the base game's equipment.lua file:
belt immunity
Although this equipment is not craftable, if you mod it in to the game, it makes the player immune to belts.

So all I'm really asking is for a flag that we can to assign to unit type entities that does the same thing as this equipment. Thanks in advance for your kind attention and response to this request.

Re: unit type entity flag to ignore belts

Posted: Fri Oct 06, 2017 2:02 pm
by buckplug
From an immersion perspective, it's understandable that critters don't know what conveyor belts are or how they behave.

What if critters attacked belts when they stand on them?

Re: unit type entity flag to ignore belts

Posted: Fri Oct 06, 2017 4:36 pm
by Rseding91
buckplug wrote:What if critters attacked belts when they stand on them?
They're supposed to :P I think it has been broken for quite some time.

Supposed to if they get stuck apparently. Not sure what that means but that's what Oxyd said.

Re: unit type entity flag to ignore belts

Posted: Fri Oct 06, 2017 6:16 pm
by eradicator
A generic "immune-to-belt" flag would still be kinda nice though. It could be used for example for vehicles like the helicopter from Helicopters.

Re: unit type entity flag to ignore belts

Posted: Fri Oct 06, 2017 7:14 pm
by withers
buckplug wrote:From an immersion perspective, it's understandable that critters don't know what conveyor belts are or how they behave.

What if critters attacked belts when they stand on them?
They do attack belts, which is why this is a modding interface request and not a bug report.

As I noted above, some of us have mods which give the player control of units. Currently I've had to work around the problem by having it constantly check to see if a unit is on a belt and then "push" the unit off to prevent it from getting stuck. (Which they always do) It kinda works, but is glitchy and costly in terms of UPI.