Custom Interrupt subsitution parameters / Post Posting interupts

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
angellus
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Apr 21, 2026 12:35 pm
Contact:

Custom Interrupt subsitution parameters / Post Posting interupts

Post by angellus »

I have been looking at how a few logistics train system works (mostly vanilla based) and one thing that is hard to handle is different train lengths.

A train of length 1-1 or 1-2 can easily go to a station designed for a train of length 1-2, 1-3, or 1-4. But there is not a good way to parameterize this right now in blueprints without figuring all of these cases and they exponentially grow with more possible train lengths.

One new API interface that would let modders solve this within the "vanilla" train/interrupt system is some interface to pre/post process train interrupts.

Two possible examples:

An interface for adding new parameters could allow a mod to add a "number symbol station parameter" (or any kind of simple "subsitution" parameter). The parameter would check for any station reachable by the train that has number symbols in the name and try to substitute the parameter with that symbol. This would let you make stations like "Pickup 4 Iron Ore", Pickup 2 Iron Ore", "Drop off 2 Iron Ore" and a train could use interrupts to match all 3 stations with a single interrupt with "Pickup {symbol parameter} {circuit parameter}" and "Drop off {symbol parameter} {circuit parameter}"

Another possible interface is a processible event that lets mods post process an interrupt. It would be given a list of the stops (with name and conditions) and then the event handler could change any of the stops or conditions. A similar example to above, you could have an interrupt that done some kind of basic pattern matching/regex to look for stations that match. It the interrupt might look like: "Pickup (2|4) {circuit parameter}" and "Drop off (2|4) {circuit parameter}"
Post Reply

Return to “Modding interface requests”