Heavy Trucks (Vanilla+)


Half-track heavy trucks in the vanilla style. The Heavy Truck hauls cargo and is the base of the others: the Tanker Truck loads and unloads fluids at ordinary pumps like a fluid wagon, the Artillery Truck deploys on its stabilizers and fires artillery shells in a forward cone, and the Logistic Truck carries a roboport and the five logistic chests, a mobile logistics hub powered by its own solar panels.

Content
2 days ago
2.0
1.48K
Transportation Logistics Combat Storage

g Pathing and Roads

8 days ago
(updated 8 days ago)

So I have an 11 tile wide road that is marked with hazard yellow line concrete on the outside, following the rules specified in the tooltip. Having issues getting the trucks to use the roads, even when detour is set to 10x. Wondering if the author could possibly join my game a take a quick look. I understand the game's pathing for AI is horrendous so it may just be how it is. Hoping this can be resolved though, makes the truck stops hard to use when the trucks are offroading lol

8 days ago

any tips and tricks for roads and pathing is appreciated! tia!

8 days ago
(updated 8 days ago)

Thanks for the detailed report! A few things that usually cause this:

  • Distance to the road: a truck only takes a road if there's one within about 30 tiles of the truck and within about 30 tiles of its destination stop. If your stops sit further away than that, the truck drives straight there. Bringing the stops right next to the road usually fixes it.
  • Short trips: trips shorter than about 40 tiles always go straight.
  • Shape: roads must be straight along x or y (diagonals aren't recognised) and at least 16 tiles long. Your 11-wide road with hazard lines on the outside is fine (5 to 12 tiles between the lines).
  • Junctions: gaps in the lines of up to 16 tiles (crossings) are bridged, and stretches that meet must end within about 10 tiles of each other.
    The truck's own setting: each truck has a "Use roads" checkbox in its window, so make sure it's on.

I can't join games, but if it still doesn't work, you can upload a screenshot of the road and the stops (Imgur works) or your save (Google Drive, Mega...) and post the link here, and I'll take a look.

8 days ago

I've just released 1.0.7, which should fix this: trucks with "Use roads" on now always prefer roads. If there's a way along them, they take it even if it's a detour, and they look for a road up to about 100 tiles away from the truck and from its destination (it was 30, which is probably what you ran into). The "Longest detour" setting is gone since there's no limit any more.

A few tips: roads must be straight along x or y (diagonals aren't recognised), 5 to 12 tiles between the lines (your 11-wide road is fine), and at least 16 tiles long. Trips shorter than about 40 tiles still go straight.

8 days ago
(updated 8 days ago)

Very nice!! That update helped alot! Posting the two truck stops below. The one where the road exits diagonally works pretty well. Truck pulls in and backs out, immediately connecting to the road. The one with the open entrance gives the truck stop some grief for some reason.

https://imgur.com/a/juOYh4A

On exit the truck might try to exit diagonally, getting stuck in the truck stop. Sometimes it exits straight forward and then drives parallel with the road going north. Sometimes it backs out and follows the road correctly. So again the pathing is pretty rough in this game, right now when it goes off road it still runs parallel with the road which is MUCH better than before where it was taking the straightest path. So at least it's trying and doing well for the most part.

The getting stuck on the truck stop on exit is kind of an issue. I wonder if a quick work around might be to add a toggle on the truck stop letting you control the entrance and exit directions, if that makes sense. If the truck stop forced the truck to leave backing up I may be able to avoid the diagonal turn going forward and getting stuck.

I appreciate the timely response! Thank you for the efforts!

Edit: :/ it appears even reversing out sometimes it tries turning too early and gets stuck.

https://imgur.com/a/ObcmVs3

7 days ago

Glad it helped a lot! Thanks for the screenshots, they make it much easier. I'll look into the trucks getting stuck on the stop when they leave, and into your idea of choosing the entry/exit direction on the stop.

2 days ago

pathing question, it seems trucks have a system that stops them from ploughing into players, would it be possible to add a setting that removes that saftey specifically for players and add a kill counter to them?

New response