by dorfl
Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, radio control, enemy targeting, and gate control. Requires a vehicle grid mod.
a month ago
0.17 - 0.18
Owner: dorfl
Source: N/A
License: MIT
Created: 6 months ago
Latest Version: 0.2.0 (a month ago)
Factorio version: 0.17 - 0.18
Downloaded: 2183 times

Requires one of the vehicle grid mods! Most should work if they allow regular armor equipment. Or consider Vehicle Grid as an optional dependency.


Autodrive started as a mash-up of ideas for making cars smarter using grid equipment sensors, mix-and-match style:

  • Train sensor: Car will sense a nearby moving train and brake automatically, or accelerate hard if already crossing rails. Does nothing useful if you're driving along rails!
  • Enemy sensor: Car will sense and target nearby enemies within range of its guns. Does nothing if vehicle is unarmed.
  • Fuel sensor: Car will refuel from its inventory.
  • Ammo sensor: Car will reload ammunition from its inventory.
  • Gate sensor: Car will open gates without a driver. Enables path finding through gates (see below).
  • Logistic network sensor: Car will interact with the logistic network when parked. Filtered trunk slots are refilled like a requester chest, and unfiltered slots are exported like an active provider chest. Grew out of my old Logiquipment mod.
  • Circuit network sensor: Car will interact with the circuit network via a Shortwave channel. Use the radio control to select a car and a radio to associate the two. Send X and Y signals to the shortwave channel to direct the car.

All work when driving a vehicle manually, when a vehicle is parked, and when it's under remote control.


The train sensor is your friend... but it's not perfect. For high-traffic train areas, block off the rails with walls to force cars to path to gates. When RC driving all the way across the map, quickly scan the dashed yellow path and ensure there are no long segments where a car will be driving along rails.

The train sensor will accelerate a car very hard to get it off the rails in time to avoid a fast train, so don't stand in front of your car because it might kill you to save itself! :-)

Logistic Network

  1. Put a logistic network sensor into a car grid.
  2. Set some trunk filtered slots (middle mouse btn). These will be treated like logistic request slots.
  3. Park the car inside a logistics zone with robots -- mod won't activate if a car is moving.
  4. Robots should arrive...

Note that:

  • Sensor only ticks every few seconds, so be patient! :)
  • Filtered trunk slots are used to set the request slots of a hidden requester chest.
  • Unfiltered trunk slots are considered trash and put into a hidden active provider chest.
  • If the current fuel is requested in a slot, fuel tank will be filled up first.
  • Entering and starting the car is fine -- items still in hidden chests will be reclaimed.

Remote Control

Autodrive includes a remote-control automatic pathing tool. The RC is similar to the one in AAI Programmable Vehicles. Fine to run both mods in a game, but the sensors only work when AAI vehicle AI is turned off and the Autodrive remote-control is used. Sensors will not work for programmed vehicles because the tick handlers will fight for control.

Vehicle Roboports

One long-time problem with AAI and vehicle grids is losing robots and some types of grid equipment inventory contents. Autodrive is designed to solve those bugs, so for example, it's fine to kit out a Hauler with a personal roboport and a burner grid generator, and send it off to build remote mining outposts.


Cars request paths with clearance max(width, height) x 1.6 which avoids crashes and getting stuck on other entities. Mostly. The Factorio path-finding API exposed in 0.17 sometimes returns strange paths.

Bounce Crashing

Cars bounce backward a bit after a crash which usually leaves enough clearance to re-path. You might have seen this behaviour in other RTS games. They also auto-heal themselves and the other entity a bit. :-)


A car driving with the RC will try to path between trees, bounce-crashing and removing any tree it actually hits. The Hauler can bulldoze its way, albeit very slowly, through any forest.

Circuit Network

The circuit network can be used to emulate the remote control:

  1. Build and place a circuit sensor in a car grid.
  2. Build a shortwave radio and set the channel (instructions in that mod) to something, say Car(17).
  3. Use the remote control tool to drag-select both the car and the radio at the same time. Car will bind to the chosen channel and display it as a yellow caption while selected, eg car:17.
  4. Send X and Y signals to the radio I/O port to direct the car to a drive to a map location.
  5. Car will check for a signal change once per second.

There's a Markers mod to help choose and track map coordinates. I guess these become something like waypoints, except they're just informational; you still have to explicitly send X,Y signals.

Cars report back on the same channel once per second:

  • V: current X co-ordinate
  • W: current Y co-ordinate
  • A: duration since arrival at current map location in ticks
  • B: duration since arrival at current map location in seconds (floor(A/60))
  • D: duration since departure in ticks
  • E: duration since departure in seconds (floor(B/60))

A and D are mutually exclusive.

Note that X=0, Y=0 doesn't work, due to Factorio's convention of treating 0 as no-signal.


The biggest UPS hits are:

  • Cars actively driving because it's Lua and on-tick. Having lots of vehicles is fine, just not all pathing and driving at once...
  • Cars with a logistic sensor left parked in a logistic network zone for no reason. Remove the sensor or park cars outside the yellow zone once they've finished logistics requests.

AAI Programmable Vehicles compatibility

Yes, except the RC and AI notes above. AAI stand-alone vehicles like the Hauler, Warden and Chaingunner work with both mods.

Logistic Carts compatibility

Yes, both mods can run together, but sensors don't work on carts.

Gizmos Car Keys (improved) compatibility

As contributor to Autodrive and author of GCKI, I recommend using this mod because GCKI and Autodrive complement each other: Claim a vehicle using the keys from GCKI to make it your own. If you summon it to a location near you later on, it will be there immediately. Hop in and use the Remote Control from Autodrive to drive wherever you want to.

Autodrive has no optional dependency on this mod because GCKI must depend on Autodrive (patches fixing Autodrive bugs have been disabled in GCKI as they are now implemented in Autodrive), and adding dependencies to both mods would result in a circular dependency error.