This mod introduces live weather synchronization and historical weather to Train Sim World 5.
The mod queries the current position on the map and uses the API from open-meteo.com to retrieve the current weather data based on the position. While driving, the weather is updated every 5 minutes (15 minutes is the shortest interval for weather updates from the API, but changing coordinates while driving make a shorter interval useful).
If you select Live Weather
, the weather will reflect the current real-life conditions, regardless of the date or time used in the simulator. The second mode is Historical Weather
. In this mode, the mod queries the weather based on your selected date and time in the simulator. If you select the historical weather mode and choose a future date, the mod queries the weather based on the current or last year. The month, day, and time will remain the same.
The API may be used free of charge for non-commercial purposes. There is a limit of 10,000 API requests per day, but this should not be exhausted by this mod.
Please install the dependency (UE4SS) before installing this mod.
Important: This is a beta release of the mod. If you have any problems or suggestions for improvement, please use the comment function.
How to use
After installing, you will find two new options in the weather settings menu. Choose Live Weather
or Historical Weather
instead of Dynamic Weather
or Custom Weather
to activate the mod for your journey. After starting, the first synchronization will occur after ~60 seconds.
If you are in historical mode and change the date using the God Mode mod or time-related console commands, the mod will force a weather synchronization.
Known issues
- Sometimes the game crashes after the journey
- After starting a journey, it takes up to 60 seconds for the weather to synchronize.
- At the beginning there is no snow on the ground and it only appears gradually. I will adjust this with historical data in the future.
Roadmap
- Add possibility to keep irl time in sync
- Add more realistic sunset and sunrise behaviour
Changelog
- Version 0.1: Initial release
- Version 0.2: Changed sync interval to 5 minutes, fixed random crash, added historical weather, renamed mod to
TSW Live & Historical Weather
, fixed rain level bug, date changes via god mode mod or command force sync weather - Version 0.3: Fix issue with floating points on different platforms (for some users it was always raining)
Requirements
UE4SS Code Library
Other for Train Sim World · by Luex · 11 Jan 2025Needed for loading C++ and Lua Mods
Installation Instructions
The downloaded ZIP archive must be unpacked into the folder \WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods
.
If you are playing on XBox Games the Mods folder location may differ.
YouTube Tutorial:
Files
TSWWeatherMod0.3.zip 305 KB · Added 19 Jan 2025 · Downloaded 671×v0.3
Previously uploaded files have been downloaded 524 times before being withdrawn.
Comments
Whare do i need to put this for the xbox version of TSW?
I tested it only on the steam edition on PC. Are you playing on console or with XBOX app on PC?
xbox app on pc it not in the xbox folder
Worth nothing that you need to launch & quit the game at least once when installing the mod to get everything to build, after that the mod will work on the next launch.
Yes, the mod does not support hot reloading.
Absolute game changer. Any way to include sunrise/sunset and temperature as well?
Thank you for your feedback. The temperature is already part of this mod and gets updated on every sync. This is already having an impact on some locomotives and their behavior (especially at high temperatures). The BR 101 Expert, for example, the fan reacts to the temperature. I will have a look at sunrise and sunset but shouldn't it depend on the timetable?
I think sunrise and sunset is a global variable, which is why so many problems with regards to daylight savings time and the sun rising and setting too early/late. I could be wrong though.
Oh I see. I'll have a look at that.
This is a really neat idea. Now I wonder if it's possible to adjust the in-game time to the irl time aswell, however that'll surely generate conflicts between AI services along the route if the time is suddenly being changed... Unless, maybe that could still be worked out for loading a timetable on-foot instead of selecting a service via menu 🤔
For the timetable mode, this would be more of a jump at a certain point in the timetable. If you build it in so that it can only be done on foot or in the menu, it should work. I can definitely take a look at it.
Unfortunately, despite correct installation as described here, no real weather is displayed. Do I need to consider anything else for the option to appear?
Do you have Steam, EpicGames or XBOX Games? I will record a short guide for installation soon.
I want to use the mod with Steam version.
Thanks for the documentation, looking forward for this.
I added a short youtube video to the mod description. Perhaps this will make the necessary organizational structure a little clearer.
Amazing! Thanks for this. Two questions, I noticed that the used API website also provides historical data. Would it be thinkable to include this in the future? So, to request data for a special day when selected in the game for a timetable run? Also, how do you deliver the current position from within the game to an outside website?! I was always under the impression that this is not possible at the moment, until DTG provides its own API for the game (just out of interest, really...)?! EDIT: to make the second question more meaningful, is the position actually checked every 15min as well or is it only using the initial starting position to request the data?!
Thank you for your feedback! I used the header dump tool from UE4SS to get the header files for all c++ classes of the game. I then looked for anything with location in the name and found a class called TS2DebugFunctionLibrary
. It has a method called GetActorLatLong
which returns the geo referenced coordinates for any unreal engine actor in game. I am using reflection to get the instance of TS2DebugFunctionLibrary
at runtime. The position gets updated every time the api is called.
The mod is fully implemented with c++ as there is currently no http request blueprint node in the game.
Regarding historical data:
I will add it to my roadmap, this would be a nice addition.
Very interesting indeed! As stated, didnt know this is possible. This may be interesting for other external applications, like an EBuLa, for example... Thanks for sharing this!
And, yes, the historical data would be a really nice addition. Personally I do opt quite often to drive in a different month. However, as said above from others as well, amazing that real weather is now a thing at all:-)
Historical Dates are now implemented :)
I have the same problem like Bahnkaktus
Do you have Steam, EpicGames or XBOX Games? I will record a short guide for installation soon.
I use Steam.
Could you please confirm that you have the correct directory layout and all files are in the correct folder:
\WindowsNoEditor\TS2Prototype\Binaries\Win64\dwmapi.dll
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS.dll
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS-settings.ini
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\TSWWeatherMod\enabled.txt
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\TSWWeatherMod\dlls\main.dll
yes i have all files.
I added a short youtube video to the mod description. Perhaps this will make the necessary organizational structure a little clearer.
Look at my Answer at Bahnkaktus.... It fixed it
Hey I spawned on 4 Routes in different Regions of Germany at the present time. The weather was always not similar compared to the weather online radar. Did I do something or do it use weather data of the previous day? But in all in all really cool mod idea
A request is sent to open-meteo.com approx. 60 seconds after starting a route and then every 15 minutes. There is also a playground on the website to get the current data for coordinates. Does the weather there match?
Does the addon use the 15 minute data or hourly, currently I've got small rain but the 15 min says no rain for half an hour (Blackpool) However an amazing edition to the game, I tried making a similar thing using UE4SS a few months ago and I was completely lost so glad it was done by someone who understands more
Currently it is using 15 minutes data in most areas. open-meteo.com has a fallback to hourly values if no 15 minutes values are available.
Great addition to TSW. Unfortunately, every map and scenario I've tried so far has fine weather (as per the respective locations) but with continual light rain falling.
Thank you for your feedback. Could you please tell me which locations are affected?
Hi, just to let you know i have the same problem. I've tried every route i have, light rain (or snow depending of the temperature) falling everywhere (even in LA with Antelope and San Bernardino routes). I've tried to switch back to dynamic and come back to your mode, but after 1 min or so on the route, it begins to rain (very lightly) again.
Every other conditions seem to work perfectly (either cloudy, sunny, windy...).
I'm sure this mode can be a game changer for me, hope for a fix regarding this bug :) Thanks!
hi, I also have the continual light rain problem, although the sky does change
Thank you for your feedback, the bug is known and i am currently working on a fix.
thank you looking forward to the update
Could you please update and try again? If the issue persists please start the game and wait until it starts raining, then exit the game. After that, send me the WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS.log
file on Discord (@nilsdev1).
How do I get the real weather into TSW 5 (Steam version)?
Despite correct installation, this option does not appear for me, I can choose dynamic and custom weather only.
Hello. Could you please confirm that you have the correct directory layout and all files are in the correct folder:
\WindowsNoEditor\TS2Prototype\Binaries\Win64\dwmapi.dll
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS.dll
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS-settings.ini
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\TSWWeatherMod\enabled.txt
\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\TSWWeatherMod\dlls\main.dll
I have all the files and they are in the right folder.
I also follow your instructions to install the mod correctly (first UE4SS, then real weather).
Do I need to do a little more when installing UE4SS or install more files or programs?
Now I only have your files installed in the Binaries folder and other mods in the DLC folder (pak files).
Have the Same Problem!
But i Fixt it the following:
Open Train Sim World 5\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\mods.txt
and add under "BPModLoaderMod : 1"
TSWWeatherMod : 1
also open Train Sim World 5\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\mods.json
replace the whole Text with mine here:
[
{
"mod_name": "BPML_GenericFunctions",
"mod_enabled": true
},
{
"mod_name": "BPModLoaderMod",
"mod_enabled": true
},
{
"mod_name": "Keybinds",
"mod_enabled": true
},
{
"mod_name": "TSWWeatherMod",
"mod_enabled": true
}
]
Now it should be fixed and work
- Nevermind, for me it works only once... -
I had the weather change to heavy fog and it was inside the cab . Great mod tho and looking forward to the next update !
Absolutely amazing and one of the most requested features IMHO!
Despite all the UE4SS files in the folders, the option to select real weather is still not displayed (TSW 5 Steam version).
What am I doing wrong?
Please take a look at this video: https://www.youtube.com/watch?v=cYHtfsqmYic and verify if your installation aligns with the one demonstrated in the video.
It seems that UE4SS doesn't do his Job!
Have file alignd properly
Love the mod! Works great. I will say though it automatically loads in rain/snow every single time, regardless of the weather conditions (even if its clear skies and sunny) and it won't go away. GodMode will allow you to get rid of the rain but I imagine it's going to add it back every single time it refreshes with a new update every 15 min.
On which route is the problem? It works perfectly for me, but i tested only german routes and the la route.
Both LA Metrolink routes the weather loads in and it always starts raining. And every single time it updates the weather, the rain returns and I have to turn it off again via GodMode.
At the moment it seems that some people have this problem, but others do not. I don't know what the reason is at the moment.
Do you have a US IP address? Maybe the api for us american ip addresses shows inch instead of mm for rain. I'll have to check that with a vpn.
Edit: I have just used a VPN. Even with a us American IP I have no rain in LA currently.
Could you please try again? Wait until it starts raining, then exit the game. After that, send me the WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\UE4SS.log
file on Discord (@nilsdev1).
Sure, give me some time to do this and I will send you the log on Discord later.
For what it’s worth, I am US based.
thank you very much, then I hope that I get this error fixed soon
For everyone who had this wierd Problem, that all Files are on Correct Place but the Mod don't appear in Menu, try this:
Have the Same Problem!
But i Fixt it the following:
Open Train Sim World 5\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\mods.txt
and add under "BPModLoaderMod : 1"
TSWWeatherMod : 1
also open Train Sim World 5\WindowsNoEditor\TS2Prototype\Binaries\Win64\ue4ss\Mods\mods.json
replace the whole Text with mine here:
[
{
"mod_name": "BPML_GenericFunctions",
"mod_enabled": true
},
{
"mod_name": "BPModLoaderMod",
"mod_enabled": true
},
{
"mod_name": "Keybinds",
"mod_enabled": true
},
{
"mod_name": "TSWWeatherMod",
"mod_enabled": true
}
]
Now it should be fixed and work
Thank you for your help. I wonder what the problem is, the .zip file contains an enabled.txt file for the mod activation. I'll add this to the description of the mod. Thanks a lot!
- Nevermind, for me it works only once... -
Shhh....
It seems, that UE4SS does have a Problem...
Tried to start TSW5 as an Administrator.... It showed the Firewall-Promt, but doen't help...
yes
Thanks for the help! Now the live weather works perfectly.
But everytime I start a journey there will be a crash dump written in UE4SS folder. @Luex, I've contacted you on Discord.
This is brilliant, well done!
Thank you for your feedback
This is an amazing mod, I am getting a fatal error for UE4SS when leaving a service back to main menu, I have .DMP file for it if needed, Edit: Occurs every time returning to menu, otherwise works well during the run
Thank you for you feedback, please send me the .dmp file on discord.
I have the same problem. After every journey there is a dump message.
Will do :D
Yes. the v2 update has fixed the continual rain issue for me but, like most people, I get a dump message after every session (and very occasionally on loading a session).
ja toller mod :) aber auch dumpmeldung und irgendwie sehe ich keine wolken mehr....vor dem update war das nicht so aber ich denke, du kriegst das schon hin.heute ist sonntag und da hast du ja bestimmt zeit ;) grĂĽsse
Are you open to posting a git(hub) link? Would love to check it out or contribute.
On a sidenote, I'm running the game on Linux through Proton and this mod seems to cause a fatal error in UE4.
Crash report can be found here
https://limewire.com/d/e29a9683-bdb3-4fb7-ad40-ba04abf41c0b#bGf8heGt6buzZbSyKMUR0j4BHpVZ7ZcL45kFnxzdp6s
Looks like it might be a null ptr violation or something similar, can't get more info without the symbols I don't think
I also play on Proton, the issue exists for both windows and linux
Hm that's odd. My game crashes at startup though - consistently. Don't even get to the main menu. It does not look to be an issue with UE4SS itself since it loads without the TSWeatherMod (and I also tried the latest dev mode of UE4SS from the main repo)
Firstly thanks for a very interesting mod which I fully support. Could you look at stability issues though please? The problem with light rain on startup appears to have disappeared with the latest update. However the program nearly always crashes on exit (not that important) but occasioanally on start up (obviously more of a problem) . I couldn't get Blackpool branches to run with it engaged. However, Cathcart Circle worked great and was thoroughly engaging. I hope that these are teethinhg issues which can be resolved becauser the whole weather experience is much more convincing with the mod.
Thank you for your feedback, i am currently working on an update
Hey there
I was wondering if it might be possible for night driving to set a very small amount of fog (equivalent to 0.001 or 0.002 within GodMode) as default? There is almost always some degree of atmosphere visible at night in the real world and without a fractional fog setting TSW does a terrible job of simulating that
Just a thought :-)
I just tried a run on WCML over shap at 18.30 (January) and it was still showing as sunny and bright wheereas in reality it would be dark.
auf xbox gamepass wenn man ein szenario gespielt hat und wieder ins menü geht crasht das spiel kann man das bitte noch beheben ansonsten sehr schöne mod mach mir sehr viel spaß dankeschön
I wanted to add a note to confirm something I saw up above. The latest update does fix the rain issue however now everytime I exit to the main menu, I almost always get a crash to desktop with a dump file. Occasionally it will happen when using formation designer as well.
This UE4SS seems to be incredibly unstable and is causing regular crashes. We were all finding the same problem with the auto announcer mod which also uses UE4SS. Are the crash logs any use to you?
Yes, I can’t even exit to the main menu without TSW5 immediately crashing. Happens every single time now. I’m going to have to remove this mod until I fix is implemented.
This is great, just one thing I'd suggest, might be doable might not be... I'd suggest making it so rather than the weather changing instantly it could slowly adjust the sliders so it looks more natural, since your polling rate is /15 mins you could make it so that the sliders slowly move to their new values over 7.5 minutes so its not too long and not too short.
If this is something that could be done I think it would really improve the immersion, either way this mod is great!
Love it and with the help of r2d2 it does seem to work. Thanks.
But I do get a fatal error warning, which, when ignored isn't a problem but if I click on OK, the game crashes...
Hi, thanks for this brilliant utility.
Unfortunately my TSW5 crash at each try after the 60 secs in a free scenario.
Any tips?
After the most recent game update the mod seems to be not working anymore (can't set Real/Historical from the selection) :-\
Live weather isn't showing in tsw 5 weather menu. Just the Dynamic and Custom. in the log txt I noticed these 2 lines:
[2025-02-17 21:22:54.6180795] [PS] Failed to find EngineVersion: expected at least one value
[2025-02-17 21:22:54.6180952] [PS] You need to override the engine version in 'UE4SS-settings.ini'.
I have no idea what this means. Could this be causing live weather and historical weather not to show or is it sayingh that because i was in the on foot mode. if so, what can I do to fix this?
I wanted to paste my log and Ini but i could not do so.
Regards
Yes, same here after the TSW update. No option for the real and historical weather selections. I tried reinstalling and redownloading to no avail.
Even after extra editing mods.txt and json files still not showing. One more thing it will be good if you work with author of auto announcer mod.
Fantastic mod! I got it working with UE4SS from the Auto Announcement mod.
One suggestion to enhance immersion—consider making weather transitions more gradual (perhaps a 1-2 minute period of slow transition between weather updates). The sudden shifts in weather can be a bit jarring. Other than that, this is absolutely perfect!
This great mod stopped working a couple of TSW5 updates back, then seemed to work again recently after the last but one TSW5 update, but now appears to not work yet again after the last TSW5 update, for me anyway.
I hope it gets fixed soon. I have the same problem. Was working fine until a few updates ago.
Seems to be working again today 22nd March
Still not working anymore for me. Just curious if there's a fix being worked on or if the project is dead?
I've had a little less time in the last few weeks. Now that this has improved again, I'll take a look at the problems since the last game update.
Not working for me either sadly
I've had a little less time in the last few weeks. Now that this has improved again, I'll take a look at the problems since the last game update.
Add a comment
If you wish to leave a comment, please log in .
About this mod
- Created
- 11 Jan 2025
- Updated
- 19 Jan 2025
- Game
- Train Sim World
- Type of content
- Other
- Train Sim World compatibility
- Train Sim World 5
Have been hoping to get live weather in TSW. Thanks a lot! looking forward to trying it out.
Thank you. If there are any problems just let me know.