How does the train identification number work?
- brunzenstein
- Smart Inserter
- Posts: 1063
- Joined: Tue Mar 01, 2016 2:27 pm
- Contact:
How does the train identification number work?
and how to set this up / use it correct?
Re: How does the train identification number work?
When you connect a train station to a circuit network, you can set the checkbox to transmit train ID and decide what signal to use ("T" by default).brunzenstein wrote:and how to set this up / use it correct?
If a train arrives to the station, and the relevant checkbox is set, station generates a circuit signal with non-zero value. This value is generated for as long as the train stays on the station. All other time a zero value is generated. You can use this to detect that the train has arrived and what train specifically.
Each train is assigned a unique numeric ID which is always a positive integer. You cannot change train's ID unfortunately, so you have to read the assigned train ID's and work with them.
Re: How does the train identification number work?
I'll add that each substantial change of the train (adding or removing a wagon/locomotive) changes this ID; schedule changes are okay though.
Re: How does the train identification number work?
The current system of Train-IDs is only a half-baked feature that was introduced in 0.15.11 in order to fix this bug.
I hope that in version 0.16, it will be possible to assign Train-IDs yourself, as has been suggested in the following thread:
viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
I hope that in version 0.16, it will be possible to assign Train-IDs yourself, as has been suggested in the following thread:
viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive