Display train's ID number on scheduler UI

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Display train's ID number on scheduler UI

Post by JasonC »

I would like to see the currently selected train's ID number on the train schedule UI (or anywhere else that's accessible from the map).

More generally, I would like to be able to determine the ID number of a train without having to be near the train. The schedule UI seems like a reasonable place to put the ID (maybe in the title bar or up top somewhere):
blueprints.png
blueprints.png (916.72 KiB) Viewed 4533 times
The train stop UI would also work as an alternative:
abc.png
abc.png (340.21 KiB) Viewed 4533 times
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by ssilk »

Frankly I don't understand the usage case, why everyone wants to use the train-id. :) Because when I play my trains are often eaten by biters. If I would set to usage of train-Id I would have many problems in such cases (cause I need to redefine how stations work in such a case). I can redefine the trains name, but not it's ID.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 141
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Display train's ID number on scheduler UI

Post by picklock »

+1

To see the train ID in the train UIs would be helpful for me, too.

In areas with radars you can zoom in the map and hover over the train. Then you see the train tool tip with the train ID. But to see it direct in the train UI would be faster and easier.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters

User avatar
leadraven
Filter Inserter
Filter Inserter
Posts: 354
Joined: Fri Jan 18, 2019 7:23 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by leadraven »

Trains have IDs?) Never noticed. And what is the use of them to the player?

User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 141
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Display train's ID number on scheduler UI

Post by picklock »

You can read out the train IDs on train stations und work with them with combinators. For example you can make a circuit to load / unload items depending on the train ID.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Display train's ID number on scheduler UI

Post by JasonC »

leadraven wrote:
Tue Jan 28, 2020 6:30 am
Trains have IDs?) Never noticed. And what is the use of them to the player?
They're useful for taking train specific actions at a train station. For example, one time I had to modify a stop to accept two bi-directional trains of different lengths, which meant the location of the rear car for refueling depended on the train. The train ID was handy for that. I also once had a stop that loaded copper and oil but then I added a train that stopped there had a sometimes-empty tanker for petro gas instead of oil in the same position as the oil tankers on other trains; so I used the ID to prevent putting oil in the car since it was easier than splitting up the stops.

I'm pretty sure in the majority of situations where you can use the ID you can come up with a pretty straightforward solution that doesn't require IDs (e.g. add additional stops, inserter tricks, inventory slot filters in train cars, etc.) but they definitely come in handy in more situations than I expect.

When you set a train stop to "read train", the value of the signal it outputs is the current train's ID.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Display train's ID number on scheduler UI

Post by JasonC »

ssilk wrote:
Mon Jan 27, 2020 11:21 pm
Frankly I don't understand the usage case, why everyone wants to use the train-id. :) Because when I play my trains are often eaten by biters. If I would set to usage of train-Id I would have many problems in such cases (cause I need to redefine how stations work in such a case). I can redefine the trains name, but not it's ID.
Well, two things, lol:

1. Maybe you need to protect your tracks better or add some artillery cars :lol:

2. That's a nice case for allowing trains to emit a configurable signal that can be read by stations, which would be awesome, but is a separate feature request (and something I'd really like to have but I haven't made an actual post about it and it's different from this).
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by ssilk »

to 1: IMHO too much effort for low effect and a lot of complications. Can transport less, train is longer, longer train stations, more locomotives...

to 2: using an ID for anything else than internal game design is from information view nothing, which can be generalized. I guess this could work well for 20, 30 maybe 40 trains, or some freak it out more. Sooner or later it’s not longer manageable. Hm. The “right way” to do this is in my opinion some kind of constant combinator which can be installed/configured on the locomotive.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Display train's ID number on scheduler UI

Post by Pi-C »

JasonC wrote:
Tue Jan 28, 2020 10:01 pm
2. That's a nice case for allowing trains to emit a configurable signal that can be read by stations, which would be awesome, but is a separate feature request (and something I'd really like to have but I haven't made an actual post about it and it's different from this).
Check out TrainsSignalSender! I'm using it for the same purpose (marking train types etc. with signals).
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Display train's ID number on scheduler UI

Post by Tekky »

The Train ID would be a lot more useful if it were possible for the user to supply his own Train ID, maybe even encode properties of the train in the Train ID (for example whether it is an iron or copper train), which can then be read by the circuit network. This has been suggested in the following thread:

viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
Last edited by Tekky on Fri Jan 31, 2020 10:40 pm, edited 1 time in total.

Olacken
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Wed Apr 17, 2019 1:37 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by Olacken »

Tekky wrote:
Fri Jan 31, 2020 2:55 am
The Train ID would be a lot more useful if it were possible for the user to supply his own Train ID.
You only think that because they chosed to show the train Id.
I bet the train Id is not just something they show but somthing that is used internally and if you alllow user to change the value it would introduce a lot of problem of for exemple a user using the same Id twice even though the Ids are supposed to be unique
Or a user using the same id twice even though it break things internally
Or a user using the same id twice to simplify his circuit logic to realise that he can't because devs thought about the fact that it would break things and go complain on the forum that you can't put the same Id twice.

Id are generated by the machine and should stay that way (For any application whatsoever)
If for any reason you want to let your users edit it then it is no longer an id and shouldn't be treated as one or it's bad design and it will break things.
Worst an Id shouldn't be modified in any circumstance (There may be exception for that but they are very specific and very rare) or you risk breaking everething.

Showing an id to the user is also in most case a bad idea the reason why factorio does it is probably because player asked to be able to diferenciate between train and internally there was already an id so they let player read it.

What you want is tags or a user id (I now realise that is probably what you meant but I already wrote my book and I don't wan't to flush it) and I think I would like it too

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Display train's ID number on scheduler UI

Post by Tekky »

Olacken wrote:
Fri Jan 31, 2020 3:16 am
I bet the train Id is not just something they show but somthing that is used internally and if you alllow user to change the value it would introduce a lot of problem of for exemple a user using the same Id twice even though the Ids are supposed to be unique
I don't consider this a problem, but rather a feature. If I want my circuit network to treat both trains exactly the same way, then I will set both trains to emit exactly the same signal(s).
Olacken wrote:
Fri Jan 31, 2020 3:16 am
Or a user using the same id twice even though it break things internally
Of course, the internal train ID would have to remain unique. However, this internal train ID only has to be visibile to the game engine and to mods, but not the player. The signals (Train IDs or whatever you want to call it) the player sees a train emit don't have to be the same as the game's internal Train ID. So a player changing a Train ID would not cause the game's internal Train ID to be changed.
Olacken wrote:
Fri Jan 31, 2020 3:16 am
What you want is tags or a user id (I now realise that is probably what you meant but I already wrote my book and I don't wan't to flush it) and I think I would like it too
The suggestion that I linked to actually goes further than a mere user id. It was suggested that every locomotive should have a constant combinator. That way, a train would not only be able to emit one single signal (Train ID), but several signals, just like any other constant combinator. A sub-suggestion of that thread even went further, stating that the signal the train emits should be dependant on the train's current order.

Olacken
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Wed Apr 17, 2019 1:37 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by Olacken »

A user defined Id why not but not an antire combinator it would add too much complexity to an entity that is in my opinion already the most complexe entity of the game, in the number of feature it as.

I would be fine with a constant combinator cargo though that could do the same thing just not on the locomotive.(I only have basing knowledge of the mod API but it should be easly doable as a mod.)

User avatar
Mifczu
Inserter
Inserter
Posts: 29
Joined: Wed Feb 01, 2017 7:01 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by Mifczu »

+1 for this idea

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Display train's ID number on scheduler UI

Post by ssilk »

A user defined ID is a name. (Seen from informatic aspect)

We already have train names, we just need a hash function that maps names to integers.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Display train's ID number on scheduler UI

Post by JasonC »

ssilk wrote:
Mon Feb 03, 2020 7:44 am
A user defined ID is a name. (Seen from informatic aspect)

We already have train names, we just need a hash function that maps names to integers.
I just want to see the current ID on the map. This feature request wasn't really for an expanded feature set.

That said, on the subject of user-defined IDs: That seems clunky and also a little off-theme as far as the current circuit networks go. What I would much rather see, which I think would be both useful and game-appropriate, would be:

- Give each train one (or more, dunno) signal slots (with values or just 1/0), just like a constant combinator.
- Add a "read train's signal" option to stations (note this isn't a functional replacement for current "read train presence", since this outputs a train-specific signal not a station-specific signal).
- When the train is present at the station if the stations option is checked it outputs the trains defined signal.

Basically just give trains a built in constant combinator that the station can read.

Since were thinking about it.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Post Reply

Return to “Ideas and Suggestions”