Dynamically change trainstop names richtext icons with circuit signals

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

M1k3y
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Dec 18, 2019 9:14 pm
Contact:

Dynamically change trainstop names richtext icons with circuit signals

Post by M1k3y »

TL;DR
Enable changing a train stop name dynamically from a circuit signal, overriding one (or more) placeholder richtext icons with a circuit signal.

What?
The idea is to use a setup similar to the train schedule interrupts with circuit signal.
The train station name would be set to something like "[virtual-signal=circuit-placeholder] unload", maybe with an additional toggle in the train stop configuration to enable the dynamic renaming feature.
If this placeholder is used (and the function is enabled), the rich-text icon should be replaced with the signal of the highest value (or by a signal with a value specified in the trainstop configuration) that is applied to the trainstop.

The trainstop name should only be considered by a train when planning a new path. Once the station is selected as the next destination, changes to the dynamic part of the name should be ignored to prevent excessive checks and repaths.

Optionally allow for multiple placeholder icons to be defined which will be replaced in order from left to right with the highest signal value first. Though in this case it should also be considered to allow regex-like wildcards in train schedules.
See also:
viewtopic.php?f=6&t=121367
viewtopic.php?f=6&t=119162
Why?
Having this feature alongside the new train interrupt system with parametric stations would allow for much more powerful multi purpose stations to be created.
The setup I'm thinking about allows for generic requester stations, that could dynamically rename themselves to request a specific item from the train network. When combined with a smart dispatching system or appropriately designed train network. one could basically implement a generic unloading station, that will request whatever items are currently needed, like a supersized bot network with requests set by the circuit network.
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 397
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by AileTheAlien »

M1k3y wrote: Fri Nov 22, 2024 2:38 pmOptionally allow for multiple placeholder icons to be defined which will be replaced in order from left to right with the highest signal value first.
IMO it should just use any existing (non-zero) signals, in order from left to right. :arrow: You can already add, remove, sort, and filter signals with other combinators, so this behavior should be dead simple to explain in a tooltip. (And to implement. Train pathing's already a somewhat costly chunk of code, from what I've read in older Friday blogs.)
M1k3y wrote: Fri Nov 22, 2024 2:38 pmThough in this case it should also be considered to allow regex-like wildcards in train schedules.
:idea: What do you mean by "regex-like wildcards" here? That sounds 1) expensive, and 2) complex to explain in a tiny tooltip. IMO, the placeholder icon(s) should just be substituted with the first available signal(s).
Last edited by AileTheAlien on Sat Nov 23, 2024 4:16 am, edited 1 time in total.
robot256
Smart Inserter
Smart Inserter
Posts: 1032
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by robot256 »

FYI this has roughly been tried before with the Stringy Train Stops mod. I wonder how that mod would interact with schedule interrupts now...
arl85
Fast Inserter
Fast Inserter
Posts: 182
Joined: Tue Jun 10, 2014 7:08 am
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by arl85 »

or if not any signal, at least the new wildcard ones, so you could have a generic liquid/item unloading station
immagine.png
immagine.png (50.28 KiB) Viewed 616 times
right now it is considered verbatim and no station is found with that name
immagine.png
immagine.png (162.89 KiB) Viewed 617 times
mergele
Fast Inserter
Fast Inserter
Posts: 198
Joined: Sat Aug 20, 2016 5:45 am
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by mergele »

This would be very useful
Asynchron
Inserter
Inserter
Posts: 22
Joined: Fri Dec 02, 2022 9:10 pm
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by Asynchron »

+1. Would be quite useful for malls receiving intermediate items through trains.
Muche
Filter Inserter
Filter Inserter
Posts: 512
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by Muche »

I think there should be at least two virtual signals - [virtual-signal=circuit-placeholder-1] & [virtual-signal=circuit-placeholder-2].
Then it'll be possible (albeit a little impractical) to use one of the signals as cargo type and the other as operation type, e.g.ImageImage and ImageImage.
k1ng440
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Nov 06, 2024 2:36 pm
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by k1ng440 »

Yes please.
Torquai
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Jul 03, 2014 6:57 pm
Contact:

Use the wildcard signal parameter to change the name of the train stop

Post by Torquai »

TL;DR
When a trainstation is connected to a circuit network, let the wildcard signal parameter be replaced by the first circuit input, thereby changing the actual station name.

What?
Factorio circuit name.png
Factorio circuit name.png (1.3 MiB) Viewed 411 times
If we send in both 'iron-plate', and 'copper-plate', then only the first input will be taken into consideration.
Or maybe if we use two wildcards, multiple inputs can be taking into consideration? like '<iron-plate><copper-plate>DROPOFF'
Why?
By implementing this change, I can now create a single stop that can handle multiple trains and items.
I am building a city-block pattern and I don't have unlimited space for train stops, and for my shop I need almost every item in the game. By using some combinators I can create a list of items I need more of, and have my station just change name to reflect what I need.

This matches perfectly with the use of train interrupts and the item parameter used in trains.
Koub
Global Moderator
Global Moderator
Posts: 7949
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by Koub »

[Koub] Merged two threads with the same or very similar suggestions, and removed the posts pointing from each thread to the other + the duplicate thread discussion.
Koub - Please consider English is not my native language.
arl85
Fast Inserter
Fast Inserter
Posts: 182
Joined: Tue Jun 10, 2014 7:08 am
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by arl85 »

I just found a mod that implements this.
User avatar
Yodo
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat Dec 30, 2023 4:27 pm
Contact:

Re: Dynamically change trainstop names richtext icons with circuit signals

Post by Yodo »

In addition to the aforementioned mod, there's also Progammable Train Stop Naming which is based on it. I'm not sure what the difference is, except that the "first signal" option is gone.
Have you considered using flow routers instead of balancers?
Roboport + Land mines > Behemoth Worm > (Legendary) Flamethrower turret
Post Reply

Return to “Ideas and Suggestions”