Train Autofill

by mikelat

Automatically fills in sensible default conditions when you have filters with your cargo wagons. Makes vanilla style train basing and direct train to assembler builds much less tedious.

Utilities
22 days ago
1.1
97
Trains
Owner:
mikelat
Source:
https://gitlab.com/mikelat/train-autofill
Homepage:
https://www.twitch.tv/mikelat
License:
MIT
Created:
23 days ago
Latest Version:
0.0.4 (22 days ago)
Factorio version:
1.1
Downloaded by:
97 users

What it does

Simple helper to help with train bases and vanilla train logic. It does a few things:

  • When adding a station, if your wagons have filters and when adding a "provider" station (by default looks for a provider chest in the station name) to train conditions this mod will automatically add default station conditions based upon those filter slots being filled up.
  • When you have a completely new train without any stations but filters set on it, it'll automatically create a schedule where it picks up all the items it needs from matched provider stops.
  • Great support for TCS - adds a fueling station at the beginning and depot stations in between if you have that installed.
  • If your train is entirely filtered to one type of item, it will use "is full" condition instead, and will also search for a requester stop and add that to the schedule!
  • If you have a stop that provides more than one item, it will combine conditions together.
  • Will fill in stations regardless of surface for your space elevator needs in Space Exploration (it won't add the elevators automatically though).
  • No ongoing ups cost, just uses vanilla train logic.

I highly recommend playing with PickerInventoryTools or another such mod that lets you quickly set many filters on your cargo wagons otherwise you'll be clicking 40 times to set filters. Ouch.

The provider station is detected through a setting (defined at the map level), by default its the provider chest icon in the station name, but you can adjust it to your bases needs.

Also, the search for if a station matches a filter is looking for the image (specifically the [item=*] rich text). I typically use pictures in all of my station names because its cool looking.

Troubleshooting

  • Remember its specifically by default looking for icons in the name of your stations that match with filters you have set already in your wagons, but you can change it in the map settings.
  • The two scenarios where it tries to autofill is 1. when a new station is added or 2. when a train has zero stops in its schedule and the schedule editor is opened.
  • If you update the filters after the schedules are already created, they won't update. You can reset them though (next bullet point)
  • You can trigger it to remake a schedule by deleting all existing orders, closing the window, and reopening it. As far as my mod is concerned it's a fresh train.

Limitations

It probably won't work well with your LTN and Cybersyn type mods, but I won't stop you from trying. I designed it specifically to help vanilla style train bases - the idea being if you uninstall this mod then literally nothing will change in your base.

This mod is sorta tailored to my style of train base, and does about 90% of the grunt work for how I set up my stations. If you like the idea of it and have some thoughts on how I can change it to be compatible with your train base let me know and I'll see what I can do.

Typically my convention with my stop names:

  • Provider chest = this stop outputs a specific item
  • Requester chest = this stop inputs a specific item
  • Buffer chest = this stop creates this item, with direct insertion (this mod currently makes no attempt to add this kind of station, but who knows for the future)

I added a configuration open for switching the default logic to >=, but typically in my bases I'm looking for precise numbers so I fill all filter slots with specific items, and if I don't need some of the slots I set them to deconstruction planners.

Thanks to my boy RedRafe for responding to my 3am factorio modding technical support requests.