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: 392
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
Filter Inserter
Filter Inserter
Posts: 968
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: 180
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 157 times
right now it is considered verbatim and no station is found with that name
immagine.png
immagine.png (162.89 KiB) Viewed 158 times
mergele
Fast Inserter
Fast Inserter
Posts: 196
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: 306
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.
Post Reply

Return to “Ideas and Suggestions”