Transport Fever 2

Transport Fever 2

View Stats:
VacuumTube Feb 25, 2024 @ 9:14am
OSM-TPF2 Importer
Many players want to rebuild a real world place in Transport Fever 2. Some have started such a "Replication" project, but often motivation runs out quickly because of the huge number of elements to reconstruct.

I developed a tool to import OpenStreetMap (OSM) data into TPF2. The tool can automatically build streets, tracks, forests and more.

Demonstration Video:
https://www.youtube.com/watch?v=V_L-CaPWk1Y

Find the code, documentation and tutorial here: https://github.com/Vacuum-Tube/OSM-TPF2-Importer

However, a replication project is still a lot of work because not everything can be automated. This topic is barely explored and good tutorials are missing. The use of OSM Importer expects a prepared map with heightmap and overlay. For these basics I created an overview article in german - I try to create a guide here soon. ***Update:*** have a look at my Guide "Rebuilding real-world areas in TPF 2" here:
https://steamcommunity.com/sharedfiles/filedetails/?id=3283539648
Last edited by VacuumTube; Sep 21, 2024 @ 4:13am
< >
Showing 1-15 of 20 comments
RadiKyle Feb 25, 2024 @ 11:50am 
Wow that's crazy!!! 🤯

Just this morning a multiplayer/AI discussion thread had me thinking that pretty soon the entire real world will exist in every game engine and we will just play "in" them without having to build anything... and now I see you bring us one step closer haha!

Wow watching it populate the map in the video was amazing!

Is it possible to filter out certain elements based on OSM tags? For example if we only want highways and major roads, but not small residential streets, we could exclude those based on the OSM tag/category/whatever?
Tsubame ⭐ Feb 25, 2024 @ 12:25pm 
Great work, as usual, thanks for your guide.

Cities Skylines has a mod that can do that there, always waited for the day this could be done here in Transport Fever 2 as well.
numbat Feb 25, 2024 @ 12:45pm 
that is awesome.
VacuumTube Feb 25, 2024 @ 1:25pm 
I considered the different street types and this can easily be adjusted. In OSM they are called highways https://wiki.openstreetmap.org/wiki/Key:highway and this can be everything: motorway, rural street, urban street, footpath.

During the import ingame, there is the option to build only car streets or footpaths. More specifically the highway types can be adjusted here (in the Converter): https://github.com/Vacuum-Tube/OSM-TPF2-Importer/blob/main/python/sort_edges.py
Last edited by VacuumTube; Feb 25, 2024 @ 1:26pm
mongolteiko Feb 26, 2024 @ 10:51am 
Excellent idea and amazing watching the map unfurl.
The possibilities are endless.
Great job as I prefer doing maps based on the real thing [Clapham Junction & Central London and Köln].
Last edited by mongolteiko; Feb 26, 2024 @ 11:00am
mike059 Feb 27, 2024 @ 7:23am 
OMG, this is map porn! LoL
It's stunning

Do you have any maps already made to download?
N0neGiv3N Feb 27, 2024 @ 8:05am 
Can this be used on a pre-existing save? I will use this if I can implement in my current world. If I have to start from scratch then maybe I'll try it in 8 months or more; whenever I finish building out my current world.
mongolteiko Feb 27, 2024 @ 10:56am 
Originally posted by N0neGiv3N:
Can this be used on a pre-existing save? I will use this if I can implement in my current world. If I have to start from scratch then maybe I'll try it in 8 months or more; whenever I finish building out my current world.

I very much doubt that you can implement this in an existing save as you have to have mods loaded for the roads/track/buildings etc. to be laid and may cause crashes over existing structures.

As a 62yo, it may be a bit difficult for me [and maybe others] to implement, so would be great if people did designer maps.
VacuumTube Feb 27, 2024 @ 11:50am 
I am working on my Frankfurt Map and could provide the first result of the full map import when I am done.

I doubt it makes sense to use this tool for existing saves. It would only be possible if you are building on an overlay and have defined coordinate bounds. Then still the question is what you have already built and if it fits to the imported things.
N0neGiv3N Feb 27, 2024 @ 3:17pm 
Originally posted by VacuumTube:
I am working on my Frankfurt Map and could provide the first result of the full map import when I am done.

I doubt it makes sense to use this tool for existing saves. It would only be possible if you are building on an overlay and have defined coordinate bounds. Then still the question is what you have already built and if it fits to the imported things.
Everything I built in my current world is underground besides one city as im mostly constructing a subway. If this would help me create an above ground world with roads and such to complement the subway then this would come in handy, however if it erases everything i built underground in the process then I guess i won't be using it.

At the end of the day you created something priceless for this game. You should be proud of your accomplishment.
Last edited by N0neGiv3N; Feb 27, 2024 @ 3:18pm
steve silent Mar 3, 2024 @ 4:57am 
This is amazing but it also needs a UI that works for Non Coders to use easily.
radek_kekw Mar 3, 2024 @ 7:20am 
I cant get osmdata.lua , i done everything in the github tutorial
radek_kekw Mar 3, 2024 @ 7:21am 
I send u friend request, could you help me on dm?
VacuumTube Sep 21, 2024 @ 4:23am 
Recently, I added a workaround so that CommonAPI is not required anymore (since there won't be a patched version for the upcoming game update soon).

Find the latest version here: https://github.com/Vacuum-Tube/OSM-TPF2-Importer

A demonstration savegame: https://steamcommunity.com/sharedfiles/filedetails/?id=3273019567

Also if you've missed it, I created a general guide on the topic of rebuilding real-world areas in TPF 2:
https://steamcommunity.com/sharedfiles/filedetails/?id=3283539648
mongolteiko Sep 21, 2024 @ 5:08am 
Good news as I've had problems with CommonAPI in the past and haven't used it since.
Might give this a try once the update has arrived and settled down [any problems that comes with it].
Thanks again for your hard work on your mods.
< >
Showing 1-15 of 20 comments
Per page: 1530 50