unit type entity flag to ignore belts

Post Reply
User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

unit type entity flag to ignore belts

Post 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.

buckplug
Burner Inserter
Burner Inserter
Posts: 10
Joined: Wed Oct 04, 2017 1:24 pm
Contact:

Re: unit type entity flag to ignore belts

Post 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?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: unit type entity flag to ignore belts

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: unit type entity flag to ignore belts

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: unit type entity flag to ignore belts

Post 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.

Post Reply

Return to “Implemented mod requests”