Feature request: refresh target if vehicle remains stuck for too long

Logistics
pyrolitic [github] · 4 years ago

Describe the issue
When a vehicle cannot reach its current destination, it remains stuck despite there being other valid targets. This needlessly disables a vehicle that could be doing other useful things. While a notification is displayed, in a busy enough game this feels like an annoyance and vehicles could be smarter.

To Reproduce
The clearest example of this issue is a fuel truck en route to an excavator. If the path to the excavator is suddenly blocked (e.g. by a landslide of soil next to the exacavator), it stops and remains stuck. Without manual action, there is no way to remedy the situation and the fuel truck will stall despite there being a dozen other excavators that could be refueled.

Another example is dumping trucks refusing to pick a different dumping target if their current target is unreachable. For example if you have a quarry whose entrance was blocked (likely due to a landslide), and the dumping truck already picked a target outside the quarry, it will refuse to dump its load to a new and reachable dumping designation until you unassign it from the mining tower, at which point the new target will be picked.

Expected behavior
The request is to tweak the vehicle logic to time out if the current destination is unavailable for a long time (perhaps two minutes) and try to pick another target. Maybe in the unreachable excavator case we could have a notification attached to the excavator and not the fuel truck, e.g. "Refuel attempt failed as is unreachable" and clicking it would focus on the vehicle that couldn't be refueled.

Additional context

  • Game version: Beta 0.3.11f
JamieRCHI [github] · 4 years ago

I have had this issue with the tree harvesters getting stuck because they can't get to the tree. There should be a timeout and the harvester should either move on, or ignore the trees it can't reach.

mzhaase [github] · 3 years ago

My suggestion is that every vehicle object should get a blacklist. After a vehicle has received a target, if it cannot reach that target, the target should be added to the blacklist for that vehicle for a number of ticks. Targets on the blacklist will not be considered if there are other targets available. Every time a vehicle finishes a job, it could go through the blacklist and remove all items for which the time to live has expired.

44 Showing 1–3 of 3