Train Simulator Classic 2024

Train Simulator Classic 2024

Not enough ratings
Block the advertising (and make a custom loading screen)
By Ewo
The loading screen and main menu show ads. It's possible to block these. Afterwards, you can replace the loading screen with an image of your own choosing.
   
Award
Favorite
Favorited
Unfavorite
Introduction
The loading screens in this game show advertising. I found out it's possible to block these ads from appearing. Once you've done that, you can also create your own custom loading screen.

There are a two methods to achieve this.

The main menu shows "offers" which can be blocked too.

As always with modding, make backups beforehand and be careful.

If you don't fully understand what's going on in this guide, you probably shouldn't be doing this. I take no responsibility if you break something.

Updates

20 September 2019: Minor text changes regarding recently released TS20 update. This guide can be applied to Train Sim 2020 without problems.
28 October 2018: Minor text changes regarding recently released TS19 update. Notably new .exe filename to block in firewall.
29 October 2018: Added example loading screen picture.
Traffic Analysis
NB: This analysis was done with TS2018 and may be different now.

I've used Wireshark to see which servers Train Simulator is connecting to, and see what data is being exchanged. Most of it is unencrypted so it's easy.

This request stood out (I've censored what is probably a personal identifier):

http://www.railsimdownloads.com/cdn/slideshow_v1.php?routeid=3ed129c1-62b1-4a18-96de-b1d3a2030a5f&language=en&u=(censored)

This is the game sending a request for the loading screen slideshow. One of the arguments is the ID of the route you're loading.

It seems DTG is keeping track of all routes you play. All of them: Steam, workshop, third party and freeware. This data is sent in unencrypted form. Not sure about GDPR compliance because I can't find an opt-out anywhere ¯\_(ツ)_/¯

Some XML is returned which eventually tells the game to load http://storage.googleapis.com/ts1-slideshow-feed/en

This is an RSS feed file with a bunch of JPGs in it. Those JPGs are the advertising images you see on the loading screen.

I've also noticed the game connecting to these other servers:


The last one is pretty neat, this was the request it sent: http://ts16dlc.railsimdev.com/dlc?cc=NL&l=en

(The NL argument is because I'm in the Netherlands, it might be something else on your system.)

This is a .json file containing a long list of available addons and news. I think this data is used for the "Store" screen, and to show a little popup next to the "Community" button in the top left of the screen.
Method 1: Block railworks.exe in Windows Firewall
This is the simplest method. By denying the Train Simulator application internet access, it cannot load anything from the internet, including the ads. It will then fall back to its default loading screen.

We can use the default firewall that comes with Windows to achieve this.

Click start and type "firewall" to start "Windows Defender Firewall With Advanced Security". It is included in Windows 10 and should be there unless you've installed a third party firewall solution.

Click on "Outbound rules" (on the left of the window). Then click on "New Rule" (on the right of the window).

Choose "Program"

In the field "This Program Path", find the railworks.exe file. It's probably
C:\Program Files (x86)\Steam\Steamapps\common\railworks\railworks.exe
unless you've installed Steam in a different folder than the default.

If you play the x64 version of Train Simulator, pick railworks64.exe instead of railworks.exe.

Choose "Block the Connection"

Choose on which types of networks this rule should be active: all of them.

Finally, give the connection a descriptive name, such as "Railworks.exe adblock"

Done!

You may need to restart the game for this to take effect.
Method 2: Edit your hosts file
Warning: This section is pretty technical. If you don't understand what I mean in this section, I think it's best that you don't attempt this.

In the previous section I've described what domains the game is connecting to. if we now add www.railsimdownloads.com to our hosts file, we can make this series of requests fail and we should not see the adverts:


The effect may not be immediate due to DNS caching (try the old ipconfig /flushdns). As a free bonus, DTG can now no longer see what routes you're loading either.

Similarly, I assumed you could block the little news popups that appear next to the "Community" button, and the main menu ads by adding the following to the hosts file:


But that doesn't work for reasons unclear to me.
Extra: Disable the Steam Overlay to kill the main menu ads
Denying railworks.exe all internet access didn't seem to get rid of the advertising in the main menu. It's being cached in the file
C:\Program Files (x86)\Steam\Steamapps\common\railworks\data\steam\database.json
but deleting that has no effect either.

Oddly, what will work is disabling the Steam overlay. The "Store" button will be greyed out and disabled too.

You can disable the overlay like this: right click the game in your Library, go to Properties and and untick the box next to "Enable the Steam Overlay in-game".

But in doing so, you lose the Steam overlay functionality (the shift-tab screen). F12 will also no longer take screenshots. Ctrl+S will still work, but only when actually driving a train.
Bonus: Create your own loading screen
If Train Simulator is unable to pull adverts from the Internet, it will fall back to a default loading screen.

You can edit the file for this default screen with a graphics program, and just change it into whatever you like.

The file you need to change is
C:\Program Files (x86)\Steam\Steamapps\common\railworks\data\textures\frontend\loading_external.jpg

If your Train Simulator and/or Steam are installed elsewhere, the path will be slightly different.

It should have a resolution of 1920x1080. This is an example of one I've made:

You can save this image and directly use it for yourself, if you'd like.
Side-effects
I've noticed some additional things that changed after blocking the ads. This may or may not be a problem for you.

First, the "Store" button in the main menu may become grayed out and disabled. I've never used it, I just go directly through Steam.

Comparing high scores for career scenarios may fail, as the game cannot pull your friends' scores from the server.

I find neither of these get in the way of driving trains, but if they matter to you, then you'll have to take the ads for granted.

Some pointless nonsense
This is absolutely pointless, but also absolutely possible: Using your own web server to host a custom .json file, and some DNS shenanigans like hosts file editing, you can control what the "Community" button popup says:


Similarly you can also fully manipulate what the "Latest Offer" on the main menu displays, and probably also the entire in-game store.

I could go into detail on how to do this, but considering how pointless this is, I'm not gonna bother. :D
Conclusion
Enjoy your new ad-free Train Sim and custom loading screen!


This text is licensed as Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)[creativecommons.org].


This guide is not licensed for training an AI or to be minted as NFT.

Feel free to link to this guide.

If you have any feedback, additions, corrections, suggestions, etc., please leave a comment below and help make this guide even better.