SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Factorio

Autodrive

PBy Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Description

Autodrive was originally made by dorfl, who later transferred ownership of the mod to me. When dorfl made the mod, the game was still in development (Factorio 0.17) and spidertrons didn't exist yet. So it started as a mash-up of ideas for making cars smarter by installing *sensors* in its *equipment grid*. As of version 1.1.3, vehicles based on a spider-vehicle prototype are finally supported as well.

Grids

Not all vehicles come with an equipment grid. Therefore, Autodrive will add a minimal grid with just enough slots to place one sensor of each type to vehicles without a grid. Only Autodrive's sensors can be put into this grid. Mod authors can tell Autodrive to extend their grids if they are concerned that its sensors consume too much of the available space (see below).

Sensors

  • *Train sensor*: Vehicles 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*: Vehicles will sense and target nearby enemies within range of its guns. If the vehicle is unarmed or has run out of ammo, it will enter panic mode and accelerate when it senses enemies.
  • *Fuel sensor*: Vehicles will refuel from the trunk inventory. If the vehicle's equipment grid contains some burner equipment, this will be refueled as well.
  • *Ammo sensor*: If a vehicle weapon runs out of ammo, Autodrive will switch to the next weapon which still has ammo. When no weapon has any ammo left, Autodrive will check the vehicle trunk for usable ammo and try to reload all weapons.
  • *Repair sensor*: Vehicles will be automatically repaired as long as there are vanilla repair-packs or modded repair tools in the trunk. The recipe for the repair sensors requires construction bots. There are 3 tiers of this sensor. The recipes for the higher tiers require more bots, but these will work together and therefore repair the vehicle faster.
  • *Gate sensor*: Vehicles will be able to open gates when they have no human driver. Enables path finding through gates (see below).
  • *Follow sensor*: Vehicles will follow the player who activated follow mode.
  • *Logistic network sensor*: Vehicle 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 (i.e. dorfl) old Logiquipment mod.
  • *Circuit network sensor*: Vehicles will interact with the circuit network via a Shortwave channel. Use the radio control to select a vehicle and a radio to associate the two. Send X and Y signals to the shortwave channel to direct the vehicle.

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

Trains

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 button). 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, the 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. You can 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.

Pathing

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. :-)

Trees

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 d

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.