PC [app] - Tsw Route Annotations

Discussion in 'TSW General Discussion' started by Winzarten, Aug 8, 2025.

  1. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    This is a little app I've been working on, and I think (hope :-D) it is ready for public release. The goal is to mimic the overlay you see in Cab videos, showing the current location and possibly other interesting facts.

    upload_2025-8-8_18-20-35.jpeg

    It works by using the Lat/Long coordinates provided by the TSW API. Using them you can use the app to mark various locations on the route, which then will be shown as a overlay when you pass near them.

    Prerequisites
    • TSW needs to be run in Windowed Fullscreen or in windowed mode (Exclusive Fullscreen doesn't work).
    • TSW needs to be run with its HTTP API Enabled
    upload_2025-8-8_18-27-53.png
    Installer, instruction, as well as the source code can be found on the projects Gitlab page:
    https://gitlab.com/winzarten/tsw-route-annotations

    This will currently work only for Steam version, and possibly Epic (not tested). To support windows store version I need to know what's the user directory where i.e. engine.ini is kept (for steam it's My Games\TrainSimWorld5\)

    Hopefuly someone will find it usefull, question, ideas are welcomed.
    And note, it is first version, so.. there will be bugs ;-)
     
    • Like Like x 7
  2. roysto25

    roysto25 Well-Known Member

    Joined:
    May 1, 2019
    Messages:
    377
    Likes Received:
    394
    If engine.ini location is important, you may wish to note that not all machines store it in the regular My Games location. For instance, for some reason known only (maybe) to Microsoft, on my machine (Steam) the location is OneDrive\Documents\My Games\TrainSimWorld5\Saved\Config\WindowsNoEditor
     
  3. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Thankfully this is already solved by using the OS to provide the location of 'my games' folder. The only thing that I need to handle are the various suffixes DTG uses for each version location.
     
  4. roysto25

    roysto25 Well-Known Member

    Joined:
    May 1, 2019
    Messages:
    377
    Likes Received:
    394
    The problem is that my system, for example, has multiple instances of 'My Games' and I have not discovered what rules it is using to decide which folder to use. The OneDrive location seems, with some exceptions, to be mainly various editions of TSW. I would add that the main installations of TSW are on a completely different drive in the usual SteamLibrary folder.
     
  5. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    I've pushed a new version, here - https://gitlab.com/winzarten/tsw-route-annotations/-/releases/1.2.0
    I've added icons for the various location types, as well as autoupdate functionality, so there will be a notification when a new version is released.

    I'm also attaching some of the routes I've so far been able to annotate. Just extract the .zip and use the import functionality from within the app to import the TSWRoute file.

    i.e. One of the files contains Kassel - Würzburg, with all tunnel names and most of the viaduct names, with both the Frankfurth routes and Pfälzische Ludwigsbahn (all these routes share the same origin).
     

    Attached Files:

  6. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Anybody wants live weather? :)
    I've been experiment with the API little more, mainly with the Weather part and was able to do not only do live weather based on the train position, but also historic data, meaning that weather is exactly as it was at the in-game time.
    upload_2025-10-11_14-46-10.png

    Still needs some testing and improvements. But all you would require after it is done is a account on https://openweathermap.org/
    The free tier allows 1000 API calls per day, which should be more than enough ;)
     
    • Like Like x 8
  7. robsinnit

    robsinnit New Member

    Joined:
    Nov 26, 2020
    Messages:
    16
    Likes Received:
    10
    Yes please to the live weather sir . I have created a account from the link you kindly put up . This is really something to look forward to .
    Good luck with the testing and thank you for creating this much need API
     
  8. Train Sim Society

    Train Sim Society Well-Known Member

    Joined:
    Aug 22, 2021
    Messages:
    525
    Likes Received:
    1,013
    Yes, please! :D If this updates live or dynamically, my most important request is that it doesn't instantly update, but gradually changes (maybe with a minute or two transition) for immersion. :)
     
    • Like Like x 1
  9. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    It's periodic, based on what you set in settings (default is 5 minutes). The app will also autoupdate the weather if your location / local time changes too much (which most likely means you loaded into another timetable).

    First version will be instantly, so it can be out asap ;) The weather shouldn't change that much in 5 minutes, so it should be usable.

    But in later versions, yes, it is planned. As few other features, like if it is snowing, then check previous weather reports for how long it has been snowing, and set the ground snow / pilled snow according to that... and simulate snow grow from that point. Avoiding the extreme fast rate that snow appears / dissapears in TSW.

    Also one main goal is to have it customizable, so peole can choose for themselves stuff like 'how much fog is too much fog'. ;)
     
    • Like Like x 3
    • Helpful Helpful x 1
  10. Train Sim Society

    Train Sim Society Well-Known Member

    Joined:
    Aug 22, 2021
    Messages:
    525
    Likes Received:
    1,013
    Such wonderful news, thank you! The fog option is gonna be VERY helpful. Sometimes it’s way too much and not reflective of how the fog looks in the real world haha! Cannot wait! :)
     
    • Like Like x 2
  11. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Well, I have attempted twice to set up an account with Open Weather and both times get "we're sorry something went wrong".
     
    • Like Like x 2
  12. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    I get the same when I try to create an account ATM, hopefully it is just something temporal. Sadly nothing I can affect.
     
    • Like Like x 2
  13. Semor276

    Semor276 New Member

    Joined:
    Aug 16, 2025
    Messages:
    6
    Likes Received:
    0
    Same here.
     
  14. robsinnit

    robsinnit New Member

    Joined:
    Nov 26, 2020
    Messages:
    16
    Likes Received:
    10
    I had the same problem when I tried to become a member but it worked when I subscribed to this !
    One Call API 3.0
    subscription!
     
  15. Semor276

    Semor276 New Member

    Joined:
    Aug 16, 2025
    Messages:
    6
    Likes Received:
    0
    From the Homepage:
    First 1000 API calls per day are FREE
    Each additional call costs 0.0014 EUR

    "Please note that the subscription requires your bank card details"

    LooL...No, thanks.

    @ the TO: Are there alternatives for the Weather API? IIRC there was some similar offers for free for the Flight Simmers, but I can't remember the name (s) of that companys.
     
  16. Emmy_MAN

    Emmy_MAN Well-Known Member

    Joined:
    Apr 9, 2022
    Messages:
    225
    Likes Received:
    367
    Your idea is really great, and I would also like to use it.

    Unfortunately, however, you cannot pay with PayPal at openweathermap.org, nor can you add PayPal as a payment method.

    I think this certainly makes it difficult for other users as well.
     
  17. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Some good news, I've moved the app to https://open-meteo.com/ which provides free non-commercial api access (so no API keys, no registration required).
    And, there is a preview build for those who would like to try (wip, there might be bugs ;)

    https://1drv.ms/u/c/6b07c2e12e3f7b36/EWgS9Axvb4VComZwHry50QcBhM806Y_TD8U-sbJ4NG7pfg?e=VcrEQI

    Download the installer, run.
    It requires TSW to have the HTTP api enabled
    check: https://gitlab.com/winzarten/tsw-route-annotations/-/wikis/Tutorial
    the app should auto detect the API key, if not, enter the key manually.
    Go to Documents\My Games\TrainSimWorld6\Saved\Config\
    You can find CommAPIKey.txt there, and pasting the code from the file into the setting window of the app should make it work with TSW 6.

    The overlay functionality of the app (if you're not interested in that) can be simply disabled using this checkbox.
    upload_2025-10-12_15-57-40.png

    For Weather:
    In TSW use Custom Weather, set any weather, it will get overriden. In Dynamic Weather the app might be (not 100% sure) fighting the TSW build-in weather patterns, resulting in weird behavior.
    upload_2025-10-12_15-58-0.png

    On the left is the in-game weather, on the right is the last downloaded weather snapshot from open-meteo
    There a 3 modes,:
    • Manual - self explanatory, set the sliders. Press Apply. Those marked Readonly cannot be changed ATM, as setting them disables the TSW automatic Wetness/GroundSnow/PiledSnow progression. I have yet to find a way how to reset the progression.
    • Live - The app downloads and applies the current weather for current train location.
    • Historic - The app downloads and applies weather for the in game date time and location. You get the weather as it was at the day and hour of the timetable service.
    Few notes:
    • Live weather (both current and historic) updates automatically every 5 minuts, or if your ingame location/ingame time changes too much.
    • Open-meteo current weather is based on weather prediction. So it might be little bit off. Nothing I can do about that.
    • Historic weather doesn't contain visiblity - so fog is not applied.. But it contains Snow Depth.. so running historing weather you also get proper Snow Cover. You can also manually add fog using the manual mode (you don't need to switch, just change the Fog Density, and Apply to TSW).
    :)

    Big thanks to DTG for providing the API (it is seriously much much better than I expected). And to Matt for throwing the "I'm surprised noone has done it yet" gauntlet the last roadmap stream :-D
     
    Last edited: Oct 12, 2025 at 3:14 PM
    • Like Like x 4
    • Helpful Helpful x 1
  18. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,507
    Likes Received:
    20,479
    I'm confused: I can't find anywhere in the App Settings window to paste it
     
  19. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    To open the settings window:
    upload_2025-10-12_16-46-55.png

    And here:
    upload_2025-10-12_16-46-27.png
    The automatic API key detection needs to be disabled. Then click apply on the bottom of the settings window.
     
  20. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,507
    Likes Received:
    20,479
    I'm not seeing that "TSW API Key" window at all!
     
  21. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    And what do you see, when you open the settings?
     
  22. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    I am right with you here. I do see a file called CommAPIKey
     
  23. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Are we talking about the in game settings or one within the files you get to via File Explorer?
     
  24. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Just to be clear, you don't need to paste the code anywhere in TSW. Just running TSW with the -HTTPAPI argument is enough.
    You only need to past it into my app, into the app settings window, if the automatic key detection is not working.
     
  25. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Winzarten This is what I am seeing. When I open you file link.
    bandicam 2025-10-12 11-13-00-946.jpg
    And this is the config folder.
    bandicam 2025-10-12 11-15-56-298.jpg
    These are my launch options in Steam.
    bandicam 2025-10-12 11-20-53-085.jpg
     
    Last edited: Oct 12, 2025 at 4:21 PM
  26. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
  27. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Winzarten Here is my dl folder and you can see what I got via your link is not an installer.
    bandicam 2025-10-12 11-23-09-642.jpg
    Clicking on it gives me this.
    bandicam 2025-10-12 11-25-54-164.jpg
     
  28. Semor276

    Semor276 New Member

    Joined:
    Aug 16, 2025
    Messages:
    6
    Likes Received:
    0
    thx. Works perfect now.
     
  29. robsinnit

    robsinnit New Member

    Joined:
    Nov 26, 2020
    Messages:
    16
    Likes Received:
    10
    All running great here . Thanks for the work you have done on this thus far . Looking forward to see where this goes .
     
    • Like Like x 1
  30. Emmy_MAN

    Emmy_MAN Well-Known Member

    Joined:
    Apr 9, 2022
    Messages:
    225
    Likes Received:
    367
    Hi Winzarten

    The first link works fine for me, and the .msi file is downloaded.

    So there must be something else causing the problem for Sharon E, as the .msi file is not downloading for him when he clicks on the first link.
    Windows also displayed a message stating that it did not want to download it, so I had to manually click to continue the download and then download the file again.

    Therefore, in my opinion, there are no issues with the first link.
     
    • Like Like x 1
  31. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Emmy_MAN I guess my issue is I have this msi file, you can see it in one of my posts above, but don't know what to do at this point.
     
  32. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Thanks for the info. So it might be some overzealous av which doesn't like an usigned installer for some reason.
     
  33. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    You don't. You only have partially downloaded file, which is the crdwonloaded extension.
    .msi files shouls be automatically recognized by windows as installers.
     
    • Like Like x 1
  34. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    When I have this window,
    bandicam 2025-10-12 12-01-35-428.jpg
    and click on open. A msi file appears briefly in the list and then goes away before I can click on it. As far as Antivirus, I am using the stock Windows Defender. I am then left with what you see in my post above.
     
    Last edited: Oct 12, 2025 at 5:05 PM
  35. Emmy_MAN

    Emmy_MAN Well-Known Member

    Joined:
    Apr 9, 2022
    Messages:
    225
    Likes Received:
    367
    Sharon E, why are you clicking on Open there?
    I would click on Download there so that the programme is downloaded.

    And when I click on the second link from Winzarten, the download starts automatically.
     
    Last edited: Oct 12, 2025 at 5:09 PM
  36. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    Emmy_MAN as Winzarten noted above, I am not getting the full msi file but a partial CRDOWNLOAD file that is not an installer. For now, I am going to just move away from this.
     
  37. Emmy_MAN

    Emmy_MAN Well-Known Member

    Joined:
    Apr 9, 2022
    Messages:
    225
    Likes Received:
    367
    Hello Winzarten,

    Which is the better choice for you, openweathermap.org or open-meteo.com?

    I've just noticed something.

    I entered my details to register with openweathermap.org and then clicked on “Continue”. Then I was taken to the page where you have to select your payment method.
    And that's where I closed the page.

    And now I just checked my emails and found one from openweathermap.org with my login details. Then I logged in to openweathermap.org and was able to click on My API at the top of my account, where I found my personal API key.
     
  38. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,507
    Likes Received:
    20,479
    OK, solved my problem. I had installed the new version without deleting the old one, and it was the old one that was still running. Straightened out, works GREAT!

    Tell me, does the weather routine work out of the box on all TSW routes, or only the ones for which annotation files exist?

    _______________________________I can see a busy evening (or weekend) ahead, with a freeroam loco and a copy of a Buchfahrplan.....
     
  39. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Open meteo looks better to me, more data available (stuff like snow depth is imho very valuable for TSW purposes, I just had a Semmering run in light snow, and the snow slowly build up as I climbed the pass), and mainly no hassle to the user.

    Don't know how it compares in accuracy - as the current weather is still based on forecast data, but I don't think it is that much of an issue as long, as the weather patterns are sensible. And imho, Historic Weather is the to-use mode, as you get season correct real weather.

    Great you have it sorted :) It works for all routes and doesn't require the annotation stuff, just the lat-lon coordinates + ingame time, provided by the sim. So it will also work automatically for new routes :)

    Honestly, it is a single app just becasue it is much easier for me to manage that way (single repo, single build chain, single update path..).
     
    • Like Like x 2
  40. Jpantera

    Jpantera Well-Known Member

    Joined:
    Apr 6, 2019
    Messages:
    1,456
    Likes Received:
    3,166
    This is great! Game changer literally!
     
    • Like Like x 2
  41. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,507
    Likes Received:
    20,479
    That's great! With one blow you have solved TSW's dynamic weather weirdness, simply by making it conform to actual real weather. What a game-changer!
     
    • Like Like x 3
  42. Thorgred

    Thorgred Well-Known Member

    Joined:
    Jun 8, 2018
    Messages:
    924
    Likes Received:
    537
    definitely will try this out soon :)
     
  43. parishl

    parishl Member

    Joined:
    Aug 1, 2025
    Messages:
    14
    Likes Received:
    47
    Gave this a whirl today on Edinburgh to Glasgow. Was really good, although fog still seems a bit on the thick side, so I might have to play around with the settings a bit. I did find the overlay to mess with Lossless Scaling, so I turned it off and just used the live weather, but it breathes new life into the game and reminds me of flight sims. One suggestion would be to choose how many days/weeks/months etc. historical weather uses. I'd love a setting to use the weather from exactly 24 hours earlier for example.

    Nice to do a whole run without it going from clear blue sky, to fog, to thunderstorm and back to clear blue sky within half an hour, though!

    Keep up the great work!
     
    • Like Like x 2
  44. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    Live weather is imho a must for sims, it is so complex and nuanced and it is just hard to 'randomize' it naturally. And if done wrong it just breaks the immersion.

    For the fog I plan to change the progresssion curve. Currently it is linear, which doesn't work very well. Exponential might be better, where there is slow growth for most part, and then fog would only ramp up if very low visibility is reported.

    The historic weather isn't aggregate, it is really taking the ingame datetime and asking the weather api what was that weather at that location, at that time. So if it is 16th of March 1989 ingame, you get the weather that was at that place, at 16th of March 1989. The data go back to 1940 :-D In app it is currently clamped to 1979, as I need to examine if really all data is available from that time.

    What I plan to do is to be able to override the in-game year. So for your case, you would set the year to 2025, and then pick 12th October in TSW when selecting service, and you would get the weather for 12th of October 2025.
     
    • Like Like x 1
  45. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,507
    Likes Received:
    20,479
    I played around with it and found that I put it at the top, just high enough that the doubled text was up and out of the frame, it works nicely.
     
    • Like Like x 1
  46. Thorgred

    Thorgred Well-Known Member

    Joined:
    Jun 8, 2018
    Messages:
    924
    Likes Received:
    537
    yeah it is working great
     
    • Like Like x 2
  47. Scorpion71

    Scorpion71 Well-Known Member

    Joined:
    Oct 24, 2017
    Messages:
    1,144
    Likes Received:
    2,558
    Live weather is an excellent addition, don't know why DTG never implemented this themselves as an option in TSW as the Dynamic Weather is useless and has never worked properly
     
    • Like Like x 3
  48. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    521
    Likes Received:
    1,009
    I've adjusted the fog function, works much better with the exponentional function. In next version I will also expose parameters of the function, so it can be finetuned by personal preference.

    I've pushed it as a proper app update, so you should get an update request next time you run the app. :)
     
  49. Thorgred

    Thorgred Well-Known Member

    Joined:
    Jun 8, 2018
    Messages:
    924
    Likes Received:
    537
    yes i just received an update from your app :)
     
    • Like Like x 1
  50. Sharon E

    Sharon E Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    2,234
    Likes Received:
    2,202
    OK, issue of getting this file solved. It was Windows Defender and how it works inside Edge. I switched over to Chrome and had no problems.
    OK, it is installed, but, even reading the above instructions several times I am unable to figure out how to get it going. Sorry, but guess this 80 y/o mind needs some help.
     
    Last edited: Oct 13, 2025 at 7:14 PM
    • Like Like x 1

Share This Page