Page 1 of 1

Add train conditions for filtered slots

Posted: Sat May 18, 2024 1:05 am
by mikelat
TL;DR
Add a filter for train conditions that checks for "filtered item slot of x type is full"
What ?
I really enjoy direct train-to-building insert builds in factorio, its a really unique way of building factories where trains navigate to all the materials they need and bring everything to a building stop to use up their inventory, like this:
img1.png
img1.png (4.36 MiB) Viewed 525 times
As fun as it is, the repetitive part for it is despite the fact that I set up filters, I have to calculate and setup conditions for every type of item when all I really want is to see if the filters I setup for all the wagons for my train are full:
img2.png
img2.png (105.21 KiB) Viewed 525 times
This gets especially a little tedious when dealing with different stack sizes and slot configurations.
Why ?
One could argue that's what inactivity is for, however inactivity doesn't account for when it may be at a stop and not receiving items (item shortage or logistical mistake), which is why I prefer to always wait for its filter slots of a certain type to be full. Also given that these trains are supposed to making x item of a particular type, its important they're full.

Additionally circuits and/or the new contaminator in 2.0 wouldn't help either as I have wagons that accept varying numbers of slots (depending upon the product). What I really need is some way to detect that all the slots for a specified filter are completely full.

It would be super cool if we can get a "filtered item slot of x type is full". Would make my life so much easier with these builds I love to do. It can also maybe only appear when you're modifying a train that uses filtered wagon slots, as to not add too much confusion for new players learning trains.

Re: Add train conditions for filtered slots

Posted: Sat May 18, 2024 7:49 am
by Illiander42
Aren't we getting formulae resolution in number fields in 2.0? (So you'll be able to type 100*8 in the field and it will fill it in as 800 for you)

The one thing to add to that would be "If you've already set the item somehow, you can type 'stack*8' and it will fill in the stack size as well"

---

Edit: I'm on a complete tangent because I didn't finish reading, sorry.

Re: Add train conditions for filtered slots

Posted: Mon May 20, 2024 6:21 pm
by mikelat
Formula will help but you still have to manually count and type in "slots * stack size * wagons", and it wont update if you change the slots obvs. If you set filters in your train wagons I think that shows intent to mix items in it.

Re: Add train conditions for filtered slots

Posted: Thu May 23, 2024 5:16 am
by mikelat
https://mods.factorio.com/mod/TrainAutofill

I had inspiration to make it into a mod instead.