Jump to content

SRTD - SimRail Train Describer


Angelo

Recommended Posts

Hi everyone!

A while ago, I started making a vintage-looking train describer for SimRail. I still have to work on the track diagram and on placing the trains where they belong in the Łazy area, but for now, here's what it looks like:

https://tplmilano.altervista.org/E/SRTD/

The code can be easily found at https://tplmilano.altervista.org/E/SRTD/c.js , in case you want to mess around with it 🙂

Will write here as soon as I update the track diagram. For now it works from KO to most of DG and part of DGZ.

Edited by Angelo
fixed broken link
  • Like 6
  • Thanks 4
Link to comment
Share on other sites

Updated - now the train describer should work on the whole line from Katowice to Zawiercie. I'm sure there are many mistakes, though, especially on left SBL signals.

You may need to hit Ctrl+F5 to force a cacheupdate.

  • Like 1
Link to comment
Share on other sites

Updated - you may need to refresh the page with Ctrl+F5.

It is now possible to press S to change some settings, including the game server.

The settings are saved in the URL, so if you're used to play on, e.g., the DE1 server and prefer a black and white style with no scanlines, just save the following URL:
https://tplmilano.altervista.org/E/SRTD/#de1_1_1

For now there's only one map, which you can select by pressing 1. More will come.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

Hey there 🙂

For now, it only works with the keyboard. I could also make it work with the mouse, though, so it could be used from a phone or tablet. Btw you're not missing anything for now, as line 62 doesn't show trains at the moment.

Link to comment
Share on other sites

Updated:

  • included line 62;
  • if a train is at >5km from the next signal, SimRail won't tell me the name of that signal, and the train describer won't be able to know where that train is; however, if SRTD sees that a train has departed and gone nowhere, and there's a long block ahead, it will assume that it has departed on the right track;
  • minor fixes here and there;
  • this should be the last time that you need to use Ctrl+F5 to load the new version. I'm sorry, I'm still learning HTML 😅
  • Like 2
Link to comment
Share on other sites

Quote

if a train is at >5km from the next signal, SimRail won't tell me the name of that signal, and the train describer won't be able to know where that train is; however, if SRTD sees that a train has departed and gone nowhere, and there's a long block ahead, it will assume that it has departed on the right track;

Since sometimes the SimRail API loses track of the next signal not only if it is at >5km, but also just randomly, I made the system more reliable: when it receives no info of what the next signal will be, it will assume that the last signal has been passed and also assume that we're running on the right track, BUT ALSO, it will do so only if the last time it checked the signal was, at most, within 500m from the train, otherwise it will assume that the train did not pass that signal and the API is just being funny.

Quote

this should be the last time that you need to use Ctrl+F5 to load the new version.

It was not.

This time, though, it is! 🙃

Also, I drew the CMK; no train will show up, for now - work in progress! Besides, I fixed some details here and there.

P.s.: I also managed the case where more than one train stands within the same block section - now SRTD will always show the one train closer to the signal, instead of randomly picking one. Or, at least, it should: I haven't tested it yet. I could simulate the input data from the API to do a proper test, but it'd be more fun to just wait for the next time Sosnowiec is stuck 😋

Edited by Angelo
Added p.s.
  • Thanks 5
Link to comment
Share on other sites

Quote

Also, I drew the CMK; no train will show up, for now - work in progress!

Added (working) CMK.

Also, fixed Gajówka - thanks to @Moooritz for noticing I had the signals backwards.

Please do let me know if you find anything that doesn't look right.

  • Like 3
Link to comment
Share on other sites

Thank you! I'd like to; but it will be more useful when we'll have other stations in the area, so I'm going to take my time 🙂

Edited by Angelo
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello Angelo, your website is a very useful tool and it also looks very cool.

I noticed a small mistake when playing at Lazy La signal box, track 224 between Lazy Lc and La is mislabelled as track 324.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Very nice and helpfull tool you´ve build there.

A nice to have feature would be the ability to change the colour with hex codes, so you can pick an individual color. That´s mostly for accessibility reasons.

Edited by Friedjof
  • Like 1
Link to comment
Share on other sites

Am 17.2.2024 um 17:23 schrieb jeroezie:

I noticed a small mistake when playing at Lazy La signal box, track 224 between Lazy Lc and La is mislabelled as track 324.

Technically track 324 is correct, you also see it on the signal name H324. But currently there are issues with such high track numbers, that's why it is track 224 instead of track 324.

Link to comment
Share on other sites

On 2/17/2024 at 5:23 PM, jeroezie said:

Hello Angelo, your website is a very useful tool and it also looks very cool.

I noticed a small mistake when playing at Lazy La signal box, track 224 between Lazy Lc and La is mislabelled as track 324.

Thank you very much!

Is it 224, though? Or perhaps it's like in some boxes here in Italy, where the first digit is related to which box the track belongs to? (track circuits 1xx for box A, 2xx for B, etc.)

Maybe it could be 324 inside Ła and 224 in Łb? Does that make any sense? I don't know, please do tell me.

18 hours ago, Friedjof said:

Very nice and helpfull tool you´ve build there.

A nice to have feature would be the ability to change the colour with hex codes, so you can pick an individual color. That´s mostly for accessibility reasons.

Thanks! I could try to see what I can do, but in the meantime, do you have any suggestions for some hex codes I could add as premade combinations? I can easily change the main colour and the background.

18 hours ago, Moooritz said:

Technically track 324 is correct, you also see it on the signal name H324. But currently there are issues with such high track numbers, that's why it is track 224 instead of track 324.

Never heard of these issues: is it just a minor mistake in how Łazy has been made for SimRail or is it something about SR itself?

Link to comment
Share on other sites

vor 12 Stunden schrieb Angelo:

Never heard of these issues: is it just a minor mistake in how Łazy has been made for SimRail or is it something about SR itself?

Yeah, that was a thing which was not really told in public. The server currently does not support numbers bigger than 255, because it's only 1 byte 😄

It has to be track 324

Link to comment
Share on other sites

vor 20 Stunden schrieb Angelo:

Thanks! I could try to see what I can do, but in the meantime, do you have any suggestions for some hex codes I could add as premade combinations? I can easily change the main colour and the background.

I have made up these three combinations.

Rot.png

Invertiert.png

Blau.png

Link to comment
Share on other sites

9 hours ago, Moooritz said:

The server currently does not support numbers bigger than 255, because it's only 1 byte 😄

How quaint! Reminds me of the Swiss railways rule that doesn't allow trains with more than 255 axles 🙃

2 hours ago, Friedjof said:

I have made up these three combinations.

Done!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Our servers

    • Drivers | Maszyniści Drivers | Maszyniści
      • PL2
      • pl2
      • 9 / 77
          • Percentage filling 12%
          • Most players 90
      • PL3
      • pl3
      • 0 / 78
          • Percentage filling 0%
          • Most players 76
      • PL4
      • pl4
      • 0 / 77
          • Percentage filling 0%
          • Most players 84
      • PL8
      • pl8
      • 0 / 29
          • Percentage filling 0%
          • Most players 84
      • EN1
      • en1
      • 2 / 77
          • Percentage filling 3%
          • Most players 80
      • EN2
      • en2
      • 1 / 77
          • Percentage filling 1%
          • Most players 60
      • EN3
      • en3
      • 0 / 27
          • Percentage filling 0%
          • Most players 60
      • DE1
      • de1
      • 4 / 78
          • Percentage filling 5%
          • Most players 87
      • DE3
      • de3
      • 0 / 75
          • Percentage filling 0%
          • Most players 66
      • DE4
      • de4
      • 0 / 78
          • Percentage filling 0%
          • Most players 65
      • FR1
      • fr1
      • 2 / 78
          • Percentage filling 3%
          • Most players 49
      • UA1
      • ua1
      • 0 / 74
          • Percentage filling 0%
          • Most players 27
      • CN1
      • cn1
      • 0 / 0
          • Percentage filling 0%
          • Most players 28
      • CZ1
      • cz1
      • 1 / 75
          • Percentage filling 1%
          • Most players 61
      • ES1
      • es1
      • 0 / 75
          • Percentage filling 0%
          • Most players 23
    • Dispatchers | Dyżurni ruchu Dispatchers | Dyżurni ruchu
      • PL2
      • pl2
      • 6 / 27
          • Percentage filling 22%
          • Most players 27
      • PL3
      • pl3
      • 0 / 27
          • Percentage filling 0%
          • Most players 27
      • PL4
      • pl4
      • 1 / 27
          • Percentage filling 4%
          • Most players 27
      • PL8
      • pl8
      • 0 / 27
          • Percentage filling 0%
          • Most players 27
      • EN1
      • en1
      • 2 / 27
          • Percentage filling 7%
          • Most players 27
      • EN2
      • en2
      • 0 / 27
          • Percentage filling 0%
          • Most players 21
      • EN3
      • en3
      • 0 / 27
          • Percentage filling 0%
          • Most players 13
      • DE1
      • de1
      • 4 / 27
          • Percentage filling 15%
          • Most players 27
      • DE3
      • de3
      • 1 / 27
          • Percentage filling 4%
          • Most players 27
      • DE4
      • de4
      • 0 / 27
          • Percentage filling 0%
          • Most players 24
      • UA1
      • ua1
      • 0 / 27
          • Percentage filling 0%
          • Most players 17
      • FR1
      • fr1
      • 0 / 27
          • Percentage filling 0%
          • Most players 23
      • ES1
      • es1
      • 1 / 27
          • Percentage filling 4%
          • Most players 15
      • CZ1
      • cz1
      • 3 / 27
          • Percentage filling 11%
          • Most players 27
      • CN1
      • cn1
      • 0 / 0
          • Percentage filling 0%
          • Most players 19
    • 30 Total servers
    • 37 / 1353 Total players
    • 3% Filled servers
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy